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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 27 Jan 2022 09:46:23 +0530
From:   Anshuman Khandual <anshuman.khandual@....com>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        akpm@...ux-foundation.org
Subject: Re: [RFC V1 01/31] mm/debug_vm_pgtable: Directly use
 vm_get_page_prot()



On 1/26/22 12:45 PM, Christoph Hellwig wrote:
>> +	 *
>> +	 * Protection based vm_flags combinatins are always linear
>> +	 * and increasing i.e VM_NONE ..[VM_SHARED|READ|WRITE|EXEC].
>>  	 */
>> -	for (idx = 0; idx < ARRAY_SIZE(protection_map); idx++) {
>> +	for (i = VM_NONE; i <= (VM_SHARED | VM_READ | VM_WRITE | VM_EXEC); ix++) {
>>  		pte_basic_tests(&args, idx);
>>  		pmd_basic_tests(&args, idx);
>>  		pud_basic_tests(&args, idx);
> 
> This looks rather convoluted.  I'd prefer to add a helper for the body
> of this loop, and then explicitly call it for all the valid
> combinations.  Right now all are valid, so this dosn't change a thing
> except for generating larger code due to the explicit loop unrolling,
> but I think it is much easier to follow and maintain.

IIUC, then will just keep this unchanged.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ