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: <20180920164648.GM30219@mellanox.com>
Date:   Thu, 20 Sep 2018 10:46:48 -0600
From:   Jason Gunthorpe <jgg@...lanox.com>
To:     Leon Romanovsky <leon@...nel.org>
Cc:     Doug Ledford <dledford@...hat.com>,
        RDMA mailing list <linux-rdma@...r.kernel.org>,
        linux-s390@...r.kernel.org, Ursula Braun <ubraun@...ux.ibm.com>,
        "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
        Selvin Xavier <selvin.xavier@...adcom.com>,
        Steve Wise <swise@...lsio.com>, Lijun Ou <oulijun@...wei.com>,
        Shiraz Saleem <shiraz.saleem@...el.com>,
        Ariel Elior <Ariel.Elior@...ium.com>,
        Christian Benvenuti <benve@...co.com>,
        Adit Ranadive <aditr@...are.com>,
        Dennis Dalessandro <dennis.dalessandro@...el.com>
Subject: Re: [PATCH rdma-next 1/5] RDMA/core: Provide getter and setter to
 access IB device name

On Thu, Sep 20, 2018 at 07:40:39PM +0300, Leon Romanovsky wrote:

> > > The protection is done with global device_lock because it is used in
> > > allocation and deallocation phases. At this stage, this lock is not
> > > busy and easily can be moved to be per-device, once it will be needed.
> > >
> > > Signed-off-by: Leon Romanovsky <leonro@...lanox.com>
> > >  drivers/infiniband/core/device.c | 24 +++++++++++++++++++++++-
> > >  include/rdma/ib_verbs.h          |  8 +++++++-
> > >  2 files changed, 30 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
> > > index 5a680a88aa87..3270cde6d806 100644
> > > +++ b/drivers/infiniband/core/device.c
> > > @@ -170,6 +170,14 @@ static struct ib_device *__ib_device_get_by_name(const char *name)
> > >  	return NULL;
> > >  }
> > >
> > > +void ib_device_get_name(struct ib_device *ibdev, char *name)
> > > +{
> > > +	down_read(&lists_rwsem);
> > > +	strlcpy(name, ibdev->name, IB_DEVICE_NAME_MAX);
> > > +	up_read(&lists_rwsem);
> > > +}
> > > +EXPORT_SYMBOL(ib_device_get_name);
> >
> > I think we have to follow netdev and just rely on device_rename()
> > being 'good enough'.
> >
> > Switch everything to use dev_name()/etc rather than try and do
> > something like this so the responsibility is on the device core to
> > keep this working, not us.
> >
> > Turns out I have a series for that for unrelated reasons..
> 
> And what should I do now with this knowledge?

Maybe I can send it today..

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ