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: <aHkhVwD7WKm1dSsa@Mac.home>
Date: Thu, 17 Jul 2025 09:14:15 -0700
From: Boqun Feng <boqun.feng@...il.com>
To: Danilo Krummrich <dakr@...nel.org>
Cc: Hui Zhu <hui.zhu@...ux.dev>, Miguel Ojeda <ojeda@...nel.org>,
	Alex Gaynor <alex.gaynor@...il.com>, Gary Guo <gary@...yguo.net>,
	bjorn3_gh@...tonmail.com, Benno Lossin <lossin@...nel.org>,
	Andreas Hindborg <a.hindborg@...nel.org>,
	Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
	linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org,
	Hui Zhu <zhuhui@...inos.cn>, Geliang Tang <geliang@...nel.org>,
	Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
	Vlastimil Babka <vbabka@...e.cz>,
	"Liam R. Howlett" <Liam.Howlett@...cle.com>,
	Uladzislau Rezki <urezki@...il.com>
Subject: Re: [PATCH v2] rust: add a sample alloc usage

On Thu, Jul 17, 2025 at 01:19:05PM +0200, Danilo Krummrich wrote:
> (Cc: Lorenzo, Vlastimil, Liam, Uladzislau)
> 
> On Thu Jul 17, 2025 at 11:50 AM CEST, Hui Zhu wrote:
> > diff --git a/samples/rust/Makefile b/samples/rust/Makefile
> > index bd2faad63b4f..7c3e68d9ada5 100644
> > --- a/samples/rust/Makefile
> > +++ b/samples/rust/Makefile
> > @@ -10,6 +10,7 @@ obj-$(CONFIG_SAMPLE_RUST_DRIVER_PLATFORM)	+= rust_driver_platform.o
> >  obj-$(CONFIG_SAMPLE_RUST_DRIVER_FAUX)		+= rust_driver_faux.o
> >  obj-$(CONFIG_SAMPLE_RUST_DRIVER_AUXILIARY)	+= rust_driver_auxiliary.o
> >  obj-$(CONFIG_SAMPLE_RUST_CONFIGFS)		+= rust_configfs.o
> > +obj-$(CONFIG_SAMPLE_RUST_ALLOC)		+= rust_alloc.o
> 
> I think adding an example for large alignment is fine, but let's do this in a
> doc-test on VBox in rust/kernel/alloc/kbox.rs. I think adding a separate module

I would suggest using #[kunit_tests(..)], which is similar to how
doc-test run, for it if we only use it for test purposes.

Regards,
Boqun

> for this is overkill.
> 
> Note that doc-tests are executed on boot if CONFIG_RUST_KERNEL_DOCTESTS=y.
> 
[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ