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:   Tue, 8 Jun 2021 09:57:36 +0300
From:   Leon Romanovsky <leon@...nel.org>
To:     Parav Pandit <parav@...dia.com>
Cc:     Doug Ledford <dledford@...hat.com>,
        Jason Gunthorpe <jgg@...dia.com>,
        Greg KH <gregkh@...uxfoundation.org>,
        Kees Cook <keescook@...omium.org>,
        Nathan Chancellor <nathan@...nel.org>,
        Adit Ranadive <aditr@...are.com>,
        Ariel Elior <aelior@...vell.com>,
        Christian Benvenuti <benve@...co.com>,
        "clang-built-linux@...glegroups.com" 
        <clang-built-linux@...glegroups.com>,
        Dennis Dalessandro <dennis.dalessandro@...nelisnetworks.com>,
        Devesh Sharma <devesh.sharma@...adcom.com>,
        Gal Pressman <galpress@...zon.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        Michal Kalderon <mkalderon@...vell.com>,
        Mike Marciniszyn <mike.marciniszyn@...nelisnetworks.com>,
        Mustafa Ismail <mustafa.ismail@...el.com>,
        Naresh Kumar PBS <nareshkumar.pbs@...adcom.com>,
        Nelson Escobar <neescoba@...co.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Potnuri Bharat Teja <bharat@...lsio.com>,
        Selvin Xavier <selvin.xavier@...adcom.com>,
        Shiraz Saleem <shiraz.saleem@...el.com>,
        VMware PV-Drivers <pv-drivers@...are.com>,
        Yishai Hadas <yishaih@...dia.com>,
        Zhu Yanjun <zyjzyj2000@...il.com>
Subject: Re: [PATCH rdma-next v1 14/15] RDMA/core: Allow port_groups to be
 used with namespaces

On Tue, Jun 08, 2021 at 05:32:56AM +0000, Parav Pandit wrote:
> 
> 
> > From: Leon Romanovsky <leon@...nel.org>
> > Sent: Tuesday, June 8, 2021 10:25 AM
> > 
> > On Mon, Jun 07, 2021 at 01:29:58PM +0000, Parav Pandit wrote:
> > >
> > >
> > > > From: Leon Romanovsky <leon@...nel.org>
> > > > Sent: Monday, June 7, 2021 1:48 PM
> > > >
> > > > From: Jason Gunthorpe <jgg@...dia.com>
> > > >
> > > > Now that the port_groups data is being destroyed and managed by the
> > > > core code this restriction is no longer needed. All the
> > > > ib_port_attrs are compatible with the core's sysfs lifecycle.
> > > >
> > > > Signed-off-by: Jason Gunthorpe <jgg@...dia.com>
> > > > Signed-off-by: Leon Romanovsky <leonro@...dia.com>
> > > > ---
> > > >  drivers/infiniband/core/device.c | 10 ++++------
> > > > drivers/infiniband/core/sysfs.c  | 17 ++++++-----------
> > > >  2 files changed, 10 insertions(+), 17 deletions(-)
> > 
> > <...>
> > 
> > > > diff --git a/drivers/infiniband/core/sysfs.c
> > > > b/drivers/infiniband/core/sysfs.c index 09a2e1066df0..f42034fcf3d9
> > > > 100644
> > > > --- a/drivers/infiniband/core/sysfs.c
> > > > +++ b/drivers/infiniband/core/sysfs.c
> > > > @@ -1236,11 +1236,9 @@ static struct ib_port *setup_port(struct
> > > > ib_core_device *coredev, int port_num,
> > > >  	ret = sysfs_create_groups(&p->kobj, p->groups_list);
> > > >  	if (ret)
> > > >  		goto err_del;
> > > > -	if (is_full_dev) {
> > > > -		ret = sysfs_create_groups(&p->kobj, device-
> > > > >ops.port_groups);
> > > > -		if (ret)
> > > > -			goto err_groups;
> > > > -	}
> > > > +	ret = sysfs_create_groups(&p->kobj, device->ops.port_groups);
> > > > +	if (ret)
> > > > +		goto err_groups;
> > > >
> > > This will expose counters in all net namespaces in shared mode (default
> > case).
> > > Application running in one net namespace will be able to monitor counters
> > of other net namespace.
> > > This should be avoided.
> > 
> > In shared mode, we are sharing sysfs anyway and have two options to deal
> > with the port properties (counters):
> > 1. Show them in all namespaces as being global to port which is shared
> > anyway.
> > 2. Show them in init_net namespace only and applications that were left in
> > this namespace will see not their counters anyway.
> > 
> > Why should we avoid "item 1"?
> Because it is incorrect to show port counters updated by application running in net ns 1, to show to application running in net ns 2.
> Once/if there is per netns counters exist, than those counters can be shown using more modern rdma stats command.

ok, I see your point and have no strong position about it.

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ