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: <kddcagu44v2a3lbxvid6wppm26wkx6ippxwa4nkaqppci5unna@oguriptlzthn>
Date: Fri, 17 Oct 2025 15:45:59 +1100
From: Alistair Popple <apopple@...dia.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc: Alexandre Courbot <acourbot@...dia.com>, 
	rust-for-linux@...r.kernel.org, dri-devel@...ts.freedesktop.org, dakr@...nel.org, 
	Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>, 
	Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>, 
	Björn Roy Baron <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>, David Airlie <airlied@...il.com>, 
	Simona Vetter <simona@...ll.ch>, Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, 
	Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>, 
	John Hubbard <jhubbard@...dia.com>, Joel Fernandes <joelagnelf@...dia.com>, 
	Timur Tabi <ttabi@...dia.com>, linux-kernel@...r.kernel.org, nouveau@...ts.freedesktop.org, 
	Lyude Paul <lyude@...hat.com>
Subject: Re: [PATCH v5 04/14] gpu: nova-core: Add a slice-buffer (sbuffer)
 datastructure

On 2025-10-17 at 06:18 +1100, Miguel Ojeda <miguel.ojeda.sandonis@...il.com> wrote...
> On Thu, Oct 16, 2025 at 8:23 AM Alexandre Courbot <acourbot@...dia.com> wrote:
> >
> > On Mon Oct 13, 2025 at 3:20 PM JST, Alistair Popple wrote:
> > >
> > > +/// # Example:
> > > +///
> > > +/// ```
> > > +/// let mut buf1 = [0u8; 5];
> > > +/// let mut buf2 = [0u8; 5];
> > > +/// let mut sbuffer = SBufferIter::new_writer([&buf1, &buf2]);
> > > +///
> > > +/// let data = b"hello";
> > > +/// let result = sbuffer.write_all(data);
> > > +/// ```
> >
> > This example doesn't build - there are several things wrong with it. It
> > is also missing statements to confirm and show the expected result. Here
> > is a fixed and slightly improved version:

Argh, you're right. I cut and pasted then edited the wrong thing from my test
build. How are you building these? The `rustdoc` target seems to ignore Nova (or
I'm doing something wrong).

> Yeah, I mentioned this one in a previous version -- the section header
> is also still wrong too.
> 
> Alistair, please check the link I gave:

Will do. I thought Joel had addressed your comments in the fix patch I pulled in
from him (he wrote most of this originally) but I can see the `/// # Example:`
heading is wrong.

>     https://docs.kernel.org/rust/coding-guidelines.html#code-documentation
> 
> or other code in the `kernel` crate for examples on how it is usually done.
> 
> It is not critical today, of course, but the further it is from what
> will be needed in a few months, the harder it will become to start
> building the docs and running the examples as KUnit tests.

No, I think it *is* critical :-) Much easier just to get this right from the
beginning than deal with heaps of errors/warnings later. It's just my fingers
that are still getting used to the subtle differences between C kernel code and
Rust kernel code, so thanks for the guidance.

 - Alistair

> 
> Thanks!
> 
> Cheers,
> Miguel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ