From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 212D7C43381 for ; Fri, 1 Mar 2019 13:08:43 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E24412084F for ; Fri, 1 Mar 2019 13:08:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QjcN9h4J" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E24412084F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CU8hrrxeu90tFzNMUQMNwxjPhQmF5HUqJz1sfcGoeYA=; b=QjcN9h4JqfhkPd 2ODirKpqI6TSJmUftjGliCY6Aki7q0GoZj2qtIYcV8nYfl2UUgpmcDvLyrvio4uLaxlE2NB30D7By 7yY72Qef7BmCx5JFb6Wt0zzQSYRjsFeLRuRExXIV+xx/lBsDuTLOoOmlrLXRYF6BJX2Wqcl/C/4wC CwKrc7usfd3PoMMKM49uXoGUxEmOHs2G4qNq613RHd4atw1PnlLFrMxoWGLpItQ1ygns9ZJ9lWZuX edma96tWfZih9tu8NS1bLvkd+uOLEc9ReZhxwaLiMdeHQiZhPCOLzRUb731lBtJxc1XAOvzOR/lPs M8QOn0LhK2XngIKMUPvA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gzhu5-0005tH-84; Fri, 01 Mar 2019 13:08:41 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gzhoL-0006ZO-FX for linux-arm-kernel@lists.infradead.org; Fri, 01 Mar 2019 13:02:47 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 69702165C; Fri, 1 Mar 2019 05:02:44 -0800 (PST) Received: from fuggles.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E33363F5C1; Fri, 1 Mar 2019 05:02:42 -0800 (PST) Date: Fri, 1 Mar 2019 13:02:37 +0000 From: Will Deacon To: Hanjun Guo Subject: Re: [PATCH] arm64: kpti: Update arm64_kernel_use_ng_mappings() when forced on Message-ID: <20190301130237.GA23344@fuggles.cambridge.arm.com> References: <20190115184917.248995-1-james.morse@arm.com> <21310b0b-8a75-1adf-a844-b2f3f520fa2d@huawei.com> <835dc899-578c-d914-4ed3-fa8b3b391ae6@huawei.com> <20190301113512.GA22488@fuggles.cambridge.arm.com> <20190301114515.GA22795@fuggles.cambridge.arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.1+86 (6f28e57d73f2) () X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190301_050245_697682_BFEC2CF7 X-CRM114-Status: GOOD ( 20.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel , Catalin Marinas , John Garry , Linuxarm , James Morse , huangdaode , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Mar 01, 2019 at 08:59:19PM +0800, Hanjun Guo wrote: > On 2019/3/1 19:46, Ard Biesheuvel wrote: > > On Fri, 1 Mar 2019 at 12:45, Will Deacon wrote: > >> > >> On Fri, Mar 01, 2019 at 12:43:01PM +0100, Ard Biesheuvel wrote: > >>> On Fri, 1 Mar 2019 at 12:35, Will Deacon wrote: > >>>> > >>>> On Fri, Mar 01, 2019 at 11:18:21AM +0000, John Garry wrote: > >>>>> On 16/01/2019 09:38, John Garry wrote: > >>>>>> On 15/01/2019 18:49, James Morse wrote: > >>>>>>> Since commit b89d82ef01b3 ("arm64: kpti: Avoid rewriting early page > >>>>>> > >>>>>> About b89d82ef01b3, I got an *unconfirmed* (emphasis on this, I don't > >>>>>> want to cry wolf) report yesterday that the symptom I saw (boot delay) > >>>>>> has been seen on 5.0-rc2 on our D06 board. I could not see it. > >>>>>> > >>>>>> Please note that this would be same board which we saw this on: > >>>>>> https://lkml.org/lkml/2018/6/20/589 > >>>>>> > >>>>>> I only witnessed the issue on the predecessor A72-based D05 board. > >>>>>> > >>>>>> The reporter is very busy, but we'll keep tabs on it. > >>>>>> > >>>>> > >>>>> FYI, this just came in this morning: > >>>> > >>>> This isn't completely surprising, because the kernel doesn't know about > >>>> the CPU in D06: > >>>> > >>>>> [ 0.000000] Booting Linux on physical CPU 0x0000010000 [0x480fd010] > >>>> > >>>> [...] > >>>> > >>>>> [ 0.000000] CPU features: detected: Kernel page table isolation (KPTI) > >>>> > >>>> If the CPU is not affected by meltdown, you can add the MIDR above to the > >>>> kpti_safe_list[] table. If it *is* affected by meltdown, then I'm afraid > >>>> that you're stuck with the delay at boot for !KASLR kernels (which is an > >>>> awful lot better than getting pwned by userspace :) > >>>> > >>>> I think D06 is 8.2, so I would've hoped that you'd implemented > >>>> AA64PFR0_EL1.CSV3, which would make this MIDR-based whitelisting > >>>> unnecessary. > > D06 has the function of AA64PFR0_EL1.CSV3 but didn't set the bit, and > it's not affected by meltdown... > > >>>> > >>> > >>> Note that this is also still tied to the new rodata handling. The new > >>> default is rodata=full, and reverting back to rodata=on (which used to > >>> be the default in prior releases) or rodata=off (not recommended) > >>> should get around this as well. > >> > >> Or, somewhat perversely, enabling CONFIG_RANDOMIZE_BASE and passing a > >> valid kaslr seed. Performance /and/ security! > >> > > > > Yeah but unfortunately, it seems the UEFI on that box does not > > implement EFI_RNG_PROTOCOL. > > Eagle eye :) So if we implement EFI_RNG_PROTOCOL (will take some time) in > firmware and enable CONFIG_RANDOMIZE_BASE, the issue will gone, right? Yup, but you can also update the MIDR whitelist since you're not affected by meltdown. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel