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: <4335f6ee-8e22-84f4-4836-552ea09f1df5@amd.com>
Date: Mon, 28 Apr 2025 10:04:15 +0530
From: Abhijit Gangurde <abhijit.gangurde@....com>
To: Leon Romanovsky <leon@...nel.org>
Cc: Jason Gunthorpe <jgg@...pe.ca>, shannon.nelson@....com,
 brett.creeley@....com, davem@...emloft.net, edumazet@...gle.com,
 kuba@...nel.org, pabeni@...hat.com, corbet@....net, andrew+netdev@...n.ch,
 allen.hubbe@....com, nikhil.agarwal@....com, linux-rdma@...r.kernel.org,
 netdev@...r.kernel.org, linux-doc@...r.kernel.org,
 linux-kernel@...r.kernel.org, Andrew Boyer <andrew.boyer@....com>
Subject: Re: [PATCH 08/14] RDMA/ionic: Register auxiliary module for ionic
 ethernet adapter

On 4/25/25 22:40, Leon Romanovsky wrote:
> On Fri, Apr 25, 2025 at 03:46:06PM +0530, Abhijit Gangurde wrote:
>> On 4/24/25 18:38, Jason Gunthorpe wrote:
>>> On Wed, Apr 23, 2025 at 03:59:07PM +0530, Abhijit Gangurde wrote:
>>>> +static int ionic_aux_probe(struct auxiliary_device *adev,
>>>> +			   const struct auxiliary_device_id *id)
>>>> +{
>>>> +	struct ionic_aux_dev *ionic_adev;
>>>> +	struct net_device *ndev;
>>>> +	struct ionic_ibdev *dev;
>>>> +
>>>> +	ionic_adev = container_of(adev, struct ionic_aux_dev, adev);
>>>> +	ndev = ionic_api_get_netdev_from_handle(ionic_adev->handle);
>>> It must not do this, the net_device should not go into the IB driver,
>>> like this that will create a huge complex tangled mess.
>>>
>>> The netdev(s) come in indirectly through the gid table and through the
>>> net notifiers and ib_device_set_netdev() and they should only be
>>> touched in paths dealing with specific areas.
>>>
>>> So don't use things like netdev_err, we have ib_err/dev_err and
>>> related instead for IB drivers to use.
>> Sure. Will remove storing of net_device in the IB driver and its
>> references in the next spin. Will wait for some more feedback
>> before rolling out v2.
> The problem is that coupling with net_device is so distracting that
> both of us are not really invested time into deep review of this series.
>
> Another problematic pattern is usage of "void *handle" to convey
> information between aux devices. Please use struct pointer instead of
> void for that.
>
> Thanks

Thanks. Will address these in v2.

Abhijit


>
>> Thanks,
>> Abhijit
>>
>>>> +struct ionic_ibdev {
>>>> +	struct ib_device	ibdev;
>>>> +
>>>> +	struct device		*hwdev;
>>>> +	struct net_device	*ndev;
>>> Same here, this member should not exist, and it didn't hold a
>>> refcount for this pointer.
>>>
>>> Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ