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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E545BC4332F for ; Thu, 15 Dec 2022 23:31:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229892AbiLOXb4 (ORCPT ); Thu, 15 Dec 2022 18:31:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229847AbiLOXby (ORCPT ); Thu, 15 Dec 2022 18:31:54 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 441AC511D1; Thu, 15 Dec 2022 15:31:53 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7F9651063; Thu, 15 Dec 2022 15:32:33 -0800 (PST) Received: from [192.168.0.110] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C05C43F73B; Thu, 15 Dec 2022 15:31:50 -0800 (PST) Message-ID: Date: Fri, 16 Dec 2022 05:01:29 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH] arm64: errata: refer to config ARM64_ERRATUM_2645198 to make workaround work Content-Language: en-US To: Will Deacon Cc: Lukas Bulwahn , Catalin Marinas , linux-arm-kernel@lists.infradead.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org References: <20221215094811.23188-1-lukas.bulwahn@gmail.com> <20221215105745.GA7711@willie-the-truck> <20221215194413.GA8094@willie-the-truck> From: Anshuman Khandual In-Reply-To: <20221215194413.GA8094@willie-the-truck> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/16/22 01:14, Will Deacon wrote: > On Thu, Dec 15, 2022 at 04:59:20PM +0530, Anshuman Khandual wrote: >> On 12/15/22 16:27, Will Deacon wrote: >>> On Thu, Dec 15, 2022 at 10:48:11AM +0100, Lukas Bulwahn wrote: >>>> diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c >>>> index cd8d96e1fa1a..95364e8bdc19 100644 >>>> --- a/arch/arm64/mm/hugetlbpage.c >>>> +++ b/arch/arm64/mm/hugetlbpage.c >>>> @@ -562,7 +562,7 @@ bool __init arch_hugetlb_valid_size(unsigned long size) >>>> >>>> pte_t huge_ptep_modify_prot_start(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) >>>> { >>>> - if (IS_ENABLED(CONFIG_ARM64_WORKAROUND_2645198) && >>>> + if (IS_ENABLED(CONFIG_ARM64_ERRATUM_2645198) && >>>> cpus_have_const_cap(ARM64_WORKAROUND_2645198)) { >>>> /* >>>> * Break-before-make (BBM) is required for all user space mappings >>>> diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c >>>> index 12915f379c22..d77c9f56b7b4 100644 >>>> --- a/arch/arm64/mm/mmu.c >>>> +++ b/arch/arm64/mm/mmu.c >>>> @@ -1633,7 +1633,7 @@ early_initcall(prevent_bootmem_remove_init); >>>> >>>> pte_t ptep_modify_prot_start(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) >>>> { >>>> - if (IS_ENABLED(CONFIG_ARM64_WORKAROUND_2645198) && >>>> + if (IS_ENABLED(CONFIG_ARM64_ERRATUM_2645198) && >>>> cpus_have_const_cap(ARM64_WORKAROUND_2645198)) { >>>> /* >>>> * Break-before-make (BBM) is required for all user space mappings >>> >>> Grr, this bug seems to exist in all three versions of the patch reviewed on >>> the list, so I can only draw the conclusion that this code has never been >> >> Ohh, my bad, apologies. I did not have a real system with this erratum, although >> had emulated and tested this workaround path via some other debug changes (which >> might have just forced the first condition to always evaluate true). > > "might have"? > >>> tested. Consequently, I'm more inclined to _revert_ the change for now and >>> we can bring it back as a fix once somebody has checked that it actually >>> works properly. >> Please do not revert this change if possible. > > I've gone ahead with the revert anyway, just because it's the easy thing to > do and we can bring back a fixed version of the patch as a fix in the new > year. So please send a new version with this fix folded in after you've > tested that it doesn't cause regressions for systems without the erratum. Sure, will resend. Again, apologies for this last minute merge window trouble.