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: <B851D9FB-3745-4923-B196-C4D0C618DBF5@konsulko.se>
Date: Wed, 30 Jul 2025 19:25:05 +0200
From: Vitaly Wool <vitaly.wool@...sulko.se>
To: Matthew Wilcox <willy@...radead.org>
Cc: linux-mm@...ck.org,
 akpm@...ux-foundation.org,
 linux-kernel@...r.kernel.org,
 Uladzislau Rezki <urezki@...il.com>,
 Danilo Krummrich <dakr@...nel.org>,
 Alice Ryhl <aliceryhl@...gle.com>,
 Vlastimil Babka <vbabka@...e.cz>,
 rust-for-linux@...r.kernel.org,
 Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
 "Liam R . Howlett" <Liam.Howlett@...cle.com>,
 Kent Overstreet <kent.overstreet@...ux.dev>,
 linux-bcachefs@...r.kernel.org,
 bpf@...r.kernel.org,
 Herbert Xu <herbert@...dor.apana.org.au>,
 Jann Horn <jannh@...gle.com>,
 Pedro Falcato <pfalcato@...e.de>
Subject: Re: [PATCH v13 1/4] :mm/vmalloc: allow to set node and align in
 vrealloc



> On Jul 15, 2025, at 4:37 PM, Matthew Wilcox <willy@...radead.org> wrote:
> 
> On Tue, Jul 15, 2025 at 03:57:24PM +0200, Vitaly Wool wrote:
>> +void *__must_check vrealloc_node_align_noprof(const void *p, size_t size,
>> + unsigned long align, gfp_t flags, int nid) __realloc_size(2);
>> +#define vrealloc_node_noprof(_p, _s, _f, _nid) \
>> + vrealloc_node_align_noprof(_p, _s, 1, _f, _nid)
>> +#define vrealloc_noprof(_p, _s, _f) \
>> + vrealloc_node_align_noprof(_p, _s, 1, _f, NUMA_NO_NODE)
>> +#define vrealloc_node_align(...) alloc_hooks(vrealloc_node_align_noprof(__VA_ARGS__))
>> +#define vrealloc_node(...) alloc_hooks(vrealloc_node_noprof(__VA_ARGS__))
>> +#define vrealloc(...) alloc_hooks(vrealloc_noprof(__VA_ARGS__))
> 
> I think we can simplify all of this.
> 
> void *__must_check vrealloc_noprof(const void *p, size_t size,
> unsigned long align, gfp_t flags, int nid) __realloc_size(2);
> #define vrealloc_node_align(...) \
> alloc_hooks(vrealloc_noprof(__VA_ARGS__))
> #define vrealloc_node(p, s, f, nid) \
> alloc_hooks(vrealloc_noprof(p, s, 1, f, nid))
> #define vrealloc(p, s, f) \
> alloc_hooks(vrealloc_noprof(p, s, 1, f, NUMA_NO_NODE))
> 
> 

In this case, to keep things buildable an each step we will need to modify slub.c in this patch. Since we change slub.c in the next patch in the series I would suggest that we keep things simple (== as they are now, even if it means some redundant macros have to stay). I can come up with a macro simplification like yours when this series is accepted.

Thanks,
Vitaly


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ