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]
Date:   Fri, 5 Feb 2021 11:27:26 -0400
From:   Jason Gunthorpe <jgg@...dia.com>
To:     "Saleem, Shiraz" <shiraz.saleem@...el.com>
CC:     "dledford@...hat.com" <dledford@...hat.com>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "Ertman, David M" <david.m.ertman@...el.com>,
        "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>
Subject: Re: [PATCH 04/22] ice: Register auxiliary device to provide RDMA

On Fri, Feb 05, 2021 at 03:23:12PM +0000, Saleem, Shiraz wrote:
> > Subject: Re: [PATCH 04/22] ice: Register auxiliary device to provide RDMA
> >  
> > > @@ -1254,20 +1282,37 @@ int ice_init_peer_devices(struct ice_pf *pf)
> > >  		 * |--> iidc_peer_obj
> > >  		 * |--> *ice_peer_drv_int
> > >  		 *
> > > +		 * iidc_auxiliary_object (container_of parent for adev)
> > > +		 * |--> auxiliary_device
> > > +		 * |--> *iidc_peer_obj (pointer from internal struct)
> > > +		 *
> > >  		 * ice_peer_drv_int (internal only peer_drv struct)
> > >  		 */
> > >  		peer_obj_int = kzalloc(sizeof(*peer_obj_int), GFP_KERNEL);
> > > -		if (!peer_obj_int)
> > > +		if (!peer_obj_int) {
> > > +			ida_simple_remove(&ice_peer_ida, id);
> > >  			return -ENOMEM;
> > > +		}
> > 
> > Why is this allocated memory with a lifetime different from the aux device?
> 
> This ice_peer_obj_int is the PCI driver internal only info about the peer_obj (not exposed externally)
> like the state machine, per PF. But Dave is re-writing all of this with the feedback about getting rid
> of state machine, and this peer_obj_int will likely be culled.
> 
> I think what we will end up with is an iidc_peer_obj per PF which is
> exported to aux driver with lifetime as described below.

I wouldn't call it 'peer' anything, this object represents the
programming API of the PCI device. The object and the API should be
understandable from the header files

A good design will have netdev also sit on this programming API, even
if it doesn't have the aux device. mlx5 used mlx5_core as the name,
I'd suggest something similar.

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ