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]
Message-ID: <fc539c61-7a28-42ee-a28a-fef987967958@redhat.com>
Date: Thu, 2 Oct 2025 09:29:37 +0200
From: David Hildenbrand <david@...hat.com>
To: SeongJae Park <sj@...nel.org>, Jakub Acs <acsjakub@...zon.de>
Cc: linux-mm@...ck.org, akpm@...ux-foundation.org, xu.xin16@....com.cn,
 chengming.zhou@...ux.dev, peterx@...hat.com, axelrasmussen@...gle.com,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/2] mm: redefine VM_* flag constants with BIT()

On 01.10.25 18:51, SeongJae Park wrote:
> On Wed, 1 Oct 2025 09:03:53 +0000 Jakub Acs <acsjakub@...zon.de> wrote:
> 
>> Make VM_* flag constant definitions consistent - unify all to use BIT()
>> macro.
>>
>> This is a separete follow-up fix after we changed VM_MERGEABLE
>> separately to isolate bugfix for easier backporting. As suggested by
>> David in [1].
>>
>> [1]: https://lore.kernel.org/all/85f852f9-8577-4230-adc7-c52e7f479454@redhat.com/
>>
>> Signed-off-by: Jakub Acs <acsjakub@...zon.de>
>> Cc: Andrew Morton <akpm@...ux-foundation.org>
>> Cc: David Hildenbrand <david@...hat.com>
>> Cc: Xu Xin <xu.xin16@....com.cn>
>> Cc: Chengming Zhou <chengming.zhou@...ux.dev>
>> Cc: Peter Xu <peterx@...hat.com>
>> Cc: Axel Rasmussen <axelrasmussen@...gle.com>
>> Cc: linux-mm@...ck.org
>> Cc: linux-kernel@...r.kernel.org
>> ---
>>   include/linux/mm.h | 66 +++++++++++++++++++++++-----------------------
>>   1 file changed, 33 insertions(+), 33 deletions(-)
>>
>> diff --git a/include/linux/mm.h b/include/linux/mm.h
>> index c6794d0e24eb..88cab3d7eea2 100644
>> --- a/include/linux/mm.h
>> +++ b/include/linux/mm.h
>> @@ -246,56 +246,56 @@ extern unsigned int kobjsize(const void *objp);
>>    * vm_flags in vm_area_struct, see mm_types.h.
>>    * When changing, update also include/trace/events/mmflags.h
>>    */
>> -#define VM_NONE		0x00000000
>> +#define VM_NONE		0
> 
> I'm wondering if it could be more consistent to use 0UL instead.

Not really required, and if we're switching to BIT already there is not 
a lot of consistency to be had. Would be different if we were avoid 
BIT() is in patch v2.

-- 
Cheers

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ