lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a6fff5b6-7e7f-4883-b905-500d55dbf21e@infradead.org>
Date: Thu, 20 Nov 2025 15:25:46 -0800
From: Randy Dunlap <rdunlap@...radead.org>
To: Catalin Marinas <catalin.marinas@....com>
Cc: Conor Dooley <conor@...nel.org>, linux-arm-kernel@...ts.infradead.org,
 Conor Dooley <conor.dooley@...rochip.com>,
 Jonathan Cameron <jonathan.cameron@...wei.com>, Will Deacon
 <will@...nel.org>, linux-kernel@...r.kernel.org,
 Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH v1] arm64, lib: make ARM64 select
 ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION not GENERIC_CPU_CACHE_MAINTENANCE



On 11/20/25 1:40 PM, Catalin Marinas wrote:
> On Thu, Nov 20, 2025 at 12:13:10PM -0800, Randy Dunlap wrote:
>> On 11/20/25 11:29 AM, Conor Dooley wrote:
>>> On Thu, Nov 20, 2025 at 05:30:46PM +0000, Catalin Marinas wrote:
>>>> On Wed, Nov 19, 2025 at 07:08:27PM +0000, Conor Dooley wrote:
>>>>> index 09aec4a1e13f..ac223e627bc5 100644
>>>>> --- a/lib/Kconfig
>>>>> +++ b/lib/Kconfig
>>>>> @@ -544,8 +544,9 @@ config ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION
>>>>>  	bool
>>>>>  
>>>>>  config GENERIC_CPU_CACHE_MAINTENANCE
>>>>> -	bool
>>>>> -	select ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION
>>>>> +	def_bool y
>>>>> +	depends on ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION
>>>>> +	depends on ARM64
>>>>
>>>> That's what we do if GENERIC_CPU_CACHE_MAINTENANCE depends on some arch
>>>> code but that's not the case here. GENERIC_CPU_CACHE_MAINTENANCE is an
>>>> alternative implementation that an arch can select if it does not
>>>> provide its own. I find the current code without the above patch better.
>>>
>>> Right, I am going to leave it as-is for now then. That's both you and I
>>> (and presumably Jonathan) finding the current form more natural. Sorry
>>> Randy!
>>
>> Thanks. I tried.
>>
>> I still say that it makes no sense for something generic
>> (GENERIC_CPU_CACHE_MAINTENANCE in lib/Kconfig) to inform the
>> config system that the config has something $ARCH-specific
>> (ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION).
> 
> Yes, that's not great either but the solution with the GENERIC depending
> on ARCH does work since there's no actual dependency between them.
> 
> As an alternative, I'm happy for arm64 to select both the ARCH and
> GENERIC options if you think that works better.
> 

Yes, I think that would be much better.
Thanks.

-- 
~Randy


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ