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: <7ca0960f-9d1a-4ba4-b074-a6502578b82e@redhat.com>
Date: Mon, 13 Oct 2025 13:12:20 +0200
From: David Hildenbrand <david@...hat.com>
To: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>, Ye Liu <ye.liu@...ux.dev>
Cc: Andrew Morton <akpm@...ux-foundation.org>, Ye Liu <liuye@...inos.cn>,
 "Liam R. Howlett" <Liam.Howlett@...cle.com>, Vlastimil Babka
 <vbabka@...e.cz>, Mike Rapoport <rppt@...nel.org>,
 Suren Baghdasaryan <surenb@...gle.com>, Michal Hocko <mhocko@...e.com>,
 linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC RFC PATCH] mm: convert VM flags from macros to enum

On 13.10.25 13:04, Lorenzo Stoakes wrote:
> On Sat, Oct 11, 2025 at 05:30:52PM +0800, Ye Liu wrote:
>> From: Ye Liu <liuye@...inos.cn>
>>
>> Hello MM maintainers and drgn community,
>>
>> This RFC proposes to convert VM_* flags from #define macros to enum
>> vm_flags. The motivation comes from recent drgn development where we
>> encountered difficulties in implementing VM flag parsing due to the
>> current macro-based approach.
> 
> This isn't going to work sorry, it's not valid to have flag values as an enum

I don't follow, can you elaborate? IIRC, the compiler will use an 
integer type to back the enum that will fit all values.

> (they're distinct) and also - importantly - I'm going to be making significant
> changes to VMA flags soon (to allow us to have arbitrary number of VMA flags on
> _all_ architectures as recently done with my series doing something similar with
> mm flags).

I guess this patch should not really make a big difference regarding 
your upcoming plans?

I do hate the enum stuff to make these tools happy, though :)

-- 
Cheers

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ