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: <aS_8zI1Od2Yl-BpK@google.com>
Date: Wed, 3 Dec 2025 09:03:08 +0000
From: Alice Ryhl <aliceryhl@...gle.com>
To: Boqun Feng <boqun.feng@...il.com>
Cc: rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Vlastimil Babka <vbabka@...e.cz>, Andrew Morton <akpm@...ux-foundation.org>, 
	Christoph Lameter <cl@...two.org>, David Rientjes <rientjes@...gle.com>, 
	Vitaly Wool <vitaly.wool@...sulko.se>, Danilo Krummrich <dakr@...nel.org>
Subject: Re: [PATCH 38/46] rust: slab: add __rust_helper to helpers

On Tue, Dec 02, 2025 at 05:45:34PM -0800, Boqun Feng wrote:
> On Tue, Dec 02, 2025 at 07:38:02PM +0000, Alice Ryhl wrote:
> > This is needed to inline these helpers into Rust code.
> > 
> > Signed-off-by: Alice Ryhl <aliceryhl@...gle.com>
> > ---
> > Cc: Vlastimil Babka <vbabka@...e.cz>
> > Cc: Andrew Morton <akpm@...ux-foundation.org>
> > Cc: Christoph Lameter <cl@...two.org>
> > Cc: David Rientjes <rientjes@...gle.com>
> > Cc: Vitaly Wool <vitaly.wool@...sulko.se>
> > Cc: Danilo Krummrich <dakr@...nel.org>
> > ---
> >  rust/helpers/slab.c | 14 ++++++++------
> >  1 file changed, 8 insertions(+), 6 deletions(-)
> > 
> > diff --git a/rust/helpers/slab.c b/rust/helpers/slab.c
> > index 7fac958907b0a7cbb28ef3a8a56e0cc10d39288f..970161023d8885935f2116fe81949d0ed622f9e9 100644
> > --- a/rust/helpers/slab.c
> > +++ b/rust/helpers/slab.c
> > @@ -2,16 +2,18 @@
> >  
> >  #include <linux/slab.h>
> >  
> > -void * __must_check __realloc_size(2)
> > -rust_helper_krealloc_node_align(const void *objp, size_t new_size, unsigned long align,
> > -				gfp_t flags, int node)
> > +__rust_helper void *__must_check __realloc_size(2)
> > +	rust_helper_krealloc_node_align(const void *objp, size_t new_size,
> 
> Similar here, shouldn't it be:
> 
> 
> __rust_helper void *__must_check __realloc_size(2)
> rust_helper_krealloc_node_align(const void *objp, size_t new_size,
> 				unsigned long align, gfp_t flags,
> 				int node)

This is what I got from ClangFormat, but your suggestion does look
better, so I'll update it.

Alice

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ