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:
 <CY8PR12MB71952D004721897B816B1385DCC32@CY8PR12MB7195.namprd12.prod.outlook.com>
Date: Tue, 25 Feb 2025 04:34:11 +0000
From: Parav Pandit <parav@...lanox.com>
To: Roman Gushchin <roman.gushchin@...ux.dev>, Jason Gunthorpe
	<jgg@...dia.com>
CC: Leon Romanovsky <leon@...nel.org>, Maher Sanalla <msanalla@...dia.com>,
	"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] RDMA/core: fix a NULL-pointer dereference in
 hw_stat_device_show()



> From: Roman Gushchin <roman.gushchin@...ux.dev>
> Sent: Tuesday, February 25, 2025 9:12 AM
> 
> On Mon, Feb 24, 2025 at 07:30:04PM -0400, Jason Gunthorpe wrote:
> > On Mon, Feb 24, 2025 at 11:22:29PM +0000, Roman Gushchin wrote:
> > > On Mon, Feb 24, 2025 at 03:16:46PM +0000, Parav Pandit wrote:
> > > >
> > > >
> > > > > From: Jason Gunthorpe <jgg@...dia.com>
> > > > > Sent: Monday, February 24, 2025 8:41 PM
> > > > >
> > > > > On Sat, Feb 22, 2025 at 06:34:21PM +0000, Parav Pandit wrote:
> > > > > > ib_setup_device_attrs() should be merged to
> > > > > > ib_setup_port_attrs() by renaming ib_setup_port_attrs() to be
> > > > > > generic.  To utilize the group initialization
> > > > > > ib_setup_port_attrs() needs to move up before device_add().
> > > > >
> > > > > It needs more than that, somehow you have to maintain two groups
> > > > > list or somehow remove the coredev->dev.groups assignment..
> > > > >
> > > > I was thinking that if both device and port attr setup is done in
> > > > same function, there is knowledge of is_full_dev that can be used
> > > > for device level hw_stats setup. (similar to how its done at port
> > > > level).
> > >
> > > Given that there is a bit of discussion on how to move forward with
> > > this, can we please merge the trivial fix in the mean time? (Just
> > > sent out v2 with the fixed commit log).
> >
> > Well, the issue now is the ABI break
> >
> > If the right answer is to remove the sysfs entirely then it doesn't
> > make sense to make it work in the stable and LTS kernels since that
> > would create users. Currently it is fully broken so there are no
> > users. Can we say that so certainly after it is fixed?
> 
> It's a good point.
> 
> Ok, then we need something like this (obviously, coded more nicely):
> 
Yes, this is my suggestion too in little more detail at [1].

[1] https://lore.kernel.org/linux-rdma/20250224233109.GE520155@nvidia.com/T/#m43a5974cad17566080eeb64c6d5327aad4f0a852

> diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
> index 0ded91f056f3..6998907fc779 100644
> --- a/drivers/infiniband/core/device.c
> +++ b/drivers/infiniband/core/device.c
> @@ -956,6 +956,7 @@ static int add_one_compat_dev(struct ib_device
> *device,
>         ret = device_add(&cdev->dev);
>         if (ret)
>                 goto add_err;
> +       device->groups[2] = NULL;
>         ret = ib_setup_port_attrs(cdev);
>         if (ret)
>                 goto port_err;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ