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: <20240801131106.GC2809814@nvidia.com>
Date: Thu, 1 Aug 2024 10:11:06 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Jonathan Cameron <Jonathan.Cameron@...wei.com>
Cc: Jonathan Corbet <corbet@....net>, Itay Avraham <itayavr@...dia.com>,
	Jakub Kicinski <kuba@...nel.org>, Leon Romanovsky <leon@...nel.org>,
	linux-doc@...r.kernel.org, linux-rdma@...r.kernel.org,
	netdev@...r.kernel.org, Paolo Abeni <pabeni@...hat.com>,
	Saeed Mahameed <saeedm@...dia.com>,
	Tariq Toukan <tariqt@...dia.com>,
	Andy Gospodarek <andrew.gospodarek@...adcom.com>,
	Aron Silverton <aron.silverton@...cle.com>,
	Dan Williams <dan.j.williams@...el.com>,
	David Ahern <dsahern@...nel.org>,
	Christoph Hellwig <hch@...radead.org>, Jiri Pirko <jiri@...dia.com>,
	Leonid Bloch <lbloch@...dia.com>,
	Leon Romanovsky <leonro@...dia.com>, linux-cxl@...r.kernel.org,
	patches@...ts.linux.dev
Subject: Re: [PATCH v2 3/8] fwctl: FWCTL_INFO to return basic information
 about the device

On Tue, Jul 30, 2024 at 06:34:41PM +0100, Jonathan Cameron wrote:
> On Mon, 29 Jul 2024 13:35:13 -0300
> Jason Gunthorpe <jgg@...dia.com> wrote:
> 
> > On Fri, Jul 26, 2024 at 04:15:03PM +0100, Jonathan Cameron wrote:
> > > On Mon, 24 Jun 2024 19:47:27 -0300
> > > Jason Gunthorpe <jgg@...dia.com> wrote:
> > >   
> > > > Userspace will need to know some details about the fwctl interface being
> > > > used to locate the correct userspace code to communicate with the
> > > > kernel. Provide a simple device_type enum indicating what the kernel
> > > > driver is.  
> > > 
> > > As below - maybe consider a UUID?
> > > Would let you decouple allocating those with upstreaming drivers.
> > > We'll just get annoying races on the enum otherwise as multiple
> > > drivers get upstreamed that use this.  
> > 
> > I view the coupling as a feature - controlling uABI number assignment
> > is one of the subtle motivations the kernel community has typically
> > used to encourage upstream participation.
> 
> Hmm. I'm not sure it's worth the possible pain if this becomes
> popular.  Maybe you'll have to run a reservation hotline.

As long as there is one tree things get sorted. We'd need a big scale
of new drivers for this to be a practical problem. Big incentive for
people to get their stuff merged before shipping it. :)

> > > > + * @device_data_len: On input the length of the out_device_data memory. On
> > > > + *	output the size of the kernel's device_data which may be larger or
> > > > + *	smaller than the input. Maybe 0 on input.
> > > > + * @out_device_data: Pointer to a memory of device_data_len bytes. Kernel will
> > > > + *	fill the entire memory, zeroing as required.  
> > > 
> > > Why do we need device in names of these two?  
> > 
> > I'm not sure I understand this question?
> > 
> > out_device_type returns the "name"
> > 
> > out_device_data returns a struct of data, the layout of the struct is
> > defined by out_device_type
> 
> What is device in this case?  fwctl struct device, hardware device, something else?

Oh, I see what you are asking..

fwctl is split into a common ABI and a "device" ABI which varies
depending on the fwctl driver. So The labeling was to put "device" in
front of those things that vary.

Basically if you touch a "device" field you need a userspace driver
that understands that device.

Not sure it is worth to have an explicit naming, it is sort of a
RDMAism creeping in where we called this concept "driver_data"

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ