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: <d0ac1160-13ae-4753-a4c8-4d78056e923e@kylinos.cn>
Date: Thu, 29 Feb 2024 17:28:53 +0800
From: Kunwu Chan <chentao@...inos.cn>
To: Michael Ellerman <mpe@...erman.id.au>,
 "Aneesh Kumar K.V" <aneesh.kumar@...nel.org>, npiggin@...il.com,
 christophe.leroy@...roup.eu, naveen.n.rao@...ux.ibm.com
Cc: linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] powerpc/mm: Code cleanup for __hash_page_thp

Thanks all for the reply.
On 2024/2/29 14:18, Michael Ellerman wrote:
> Aneesh Kumar K.V <aneesh.kumar@...nel.org> writes:
>> Michael Ellerman <mpe@...erman.id.au> writes:
>>> Kunwu Chan <chentao@...inos.cn> writes:
>>>> On 2024/2/26 18:49, Michael Ellerman wrote:
>>>>> Kunwu Chan <chentao@...inos.cn> writes:
>>>>>> This part was commented from commit 6d492ecc6489
>>>>>> ("powerpc/THP: Add code to handle HPTE faults for hugepages")
>>>>>> in about 11 years before.
>>>>>>
>>>>>> If there are no plans to enable this part code in the future,
>>>>>> we can remove this dead code.
>>>>>
>>>>> I agree the code can go. But I'd like it to be replaced with a comment
>>>>> explaining what the dead code was trying to say.
>>>
>>>> Thanks, i'll update a new patch with the following comment:
>>>>       /*
>>>>       * No CPU has hugepages but lacks no execute, so we
>>>>       * don't need to worry about cpu no CPU_FTR_COHERENT_ICACHE feature case
>>>>       */
>>>
>>> Maybe wait until we can get some input from Aneesh. I'm not sure the
>>> code/comment are really up to date.
>>
>> How about?
>>
>> modified   arch/powerpc/mm/book3s64/hash_hugepage.c
>> @@ -58,17 +58,13 @@ int __hash_page_thp(unsigned long ea, unsigned long access, unsigned long vsid,
>>   		return 0;
>>   
>>   	rflags = htab_convert_pte_flags(new_pmd, flags);
>> +	/*
>> +	 * THPs are only supported on platforms that can do mixed page size
>> +	 * segments (MPSS) and all such platforms have coherent icache. Hence we
>> +	 * don't need to do lazy icache flush (hash_page_do_lazy_icache()) on
>> +	 * noexecute fault.
>> +	 */
> 
I'll use this comment in v2 patch.
And add two Suggested-by: label for you.

> Yeah thanks that looks good.
> 
> It could say "see eg. __hash_page_4K()", but that's probably unnecessary
> as it mentions hash_page_do_lazy_icache(), and anyone interested is just
> going to grep for that anyway.
> 
> cheers
-- 
Thanks,
   Kunwu


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ