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=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED 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 D1C8AC43381 for ; Fri, 1 Mar 2019 13:06:06 +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 9FBF22084F for ; Fri, 1 Mar 2019 13:06:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YKDoPdhZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9FBF22084F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.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:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=o9XqAYsxsMfve9LF8hbzTj0KJgq8kWMf2kXi34rT9as=; b=YKDoPdhZzCGaqP 7LwNNED/YCfzgYDvBGXBm5JZ+d/TmsFR2waX8sQmUIot6abxwFhLwcijqRzj3Gth4CW9btWXOr4f4 tTGEv4SIt79engW1a2ugpS7xhLqIP5EORzJDcP2Tl1qC1YLWfUzQ0CpjVRslZ9di+pQym67fXuYgC ts/YjcrdF1eps+IIOM76c8KAgMbfltoEsYBY8G3XWL5sX2fwfxkZo3WtA4Z3HACrtIZK8fNVaSoPE AhGeL3KlqMMzxP8MLX0VcTDQd9tb+5uVgOgYHrZwFhESZXukQaO7g/xQx9fGM7oddB/yvnDVuxqTp 7ssICipzr1JB4t1f4nCA==; 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 1gzhrZ-0002zX-5H; Fri, 01 Mar 2019 13:06:05 +0000 Received: from szxga07-in.huawei.com ([45.249.212.35] helo=huawei.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gzhmt-00055p-Ip for linux-arm-kernel@lists.infradead.org; Fri, 01 Mar 2019 13:01:17 +0000 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 6D2B3B31C0FC64E1E082; Fri, 1 Mar 2019 21:01:08 +0800 (CST) Received: from [127.0.0.1] (10.177.223.23) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.408.0; Fri, 1 Mar 2019 21:01:02 +0800 Subject: Re: [PATCH] arm64: kpti: Update arm64_kernel_use_ng_mappings() when forced on To: Ard Biesheuvel , Will Deacon 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> From: Hanjun Guo Message-ID: Date: Fri, 1 Mar 2019 20:59:19 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Originating-IP: [10.177.223.23] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190301_050115_848941_95A1B873 X-CRM114-Status: GOOD ( 13.93 ) 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: 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 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? Thanks Hanjun _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel