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: <20260128145906.GZ1134360@nvidia.com>
Date: Wed, 28 Jan 2026 10:59:06 -0400
From: Jason Gunthorpe <jgg@...dia.com>
To: Danilo Krummrich <dakr@...nel.org>
Cc: Zhi Wang <zhiw@...dia.com>, rust-for-linux@...r.kernel.org,
	linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
	aliceryhl@...gle.com, bhelgaas@...gle.com, kwilczynski@...nel.org,
	ojeda@...nel.org, alex.gaynor@...il.com, boqun.feng@...il.com,
	gary@...yguo.net, bjorn3_gh@...tonmail.com, lossin@...nel.org,
	a.hindborg@...nel.org, tmgross@...ch.edu, markus.probst@...teo.de,
	helgaas@...nel.org, cjia@...dia.com, smitra@...dia.com,
	ankita@...dia.com, aniketa@...dia.com, kwankhede@...dia.com,
	targupta@...dia.com, acourbot@...dia.com, joelagnelf@...dia.com,
	jhubbard@...dia.com, zhiwang@...nel.org,
	daniel.almeida@...labora.com
Subject: Re: [PATCH v2 1/2] rust: introduce abstractions for fwctlg

On Wed, Jan 28, 2026 at 03:01:25PM +0100, Danilo Krummrich wrote:
> There is no second memory allocation. In the implementation of
> fwctl::Device::new() above we call _fwctl_alloc_device() with a size (and
> layout) such that this allocation is suitable to initialize the second argument
> (i.e. data: impl PinInit<T, Error>) within this allocation.

You are talking about your suggestions now right?

Because what I see in Zi's patch doesn't match any of this?

+                bindings::_fwctl_alloc_device(
+                    parent.as_raw(),
+                    ops,
+                    core::mem::size_of::<bindings::fwctl_device>(),
+                )

That is not allocating any memory for driver use ...

What you are explaining sounds good to me, though I don't quite get
the PinInit<> flow but I trust you on that. :)

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ