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:   Mon, 29 Oct 2018 12:30:46 +0200
From:   Leon Romanovsky <leon@...nel.org>
To:     David Ahern <dsahern@...il.com>
Cc:     netdev <netdev@...r.kernel.org>,
        RDMA mailing list <linux-rdma@...r.kernel.org>,
        Stephen Hemminger <stephen@...workplumber.org>
Subject: Re: [PATCH iproute2-next 3/3] rdma: Add an option to rename IB
 device interface

On Sun, Oct 21, 2018 at 10:02:43AM -0600, David Ahern wrote:
> On 10/18/18 5:51 AM, Leon Romanovsky wrote:
> > From: Leon Romanovsky <leonro@...lanox.com>
> >
> > Enrich rdmatool with an option to rename IB devices,
> > the command interface follows Iproute2 convention:
> > "rdma dev set [OLD-DEVNAME] name NEW-DEVNAME"
> >
> > Signed-off-by: Leon Romanovsky <leonro@...lanox.com>
> > ---
> >  rdma/dev.c | 35 +++++++++++++++++++++++++++++++++++
> >  1 file changed, 35 insertions(+)
> >
> > diff --git a/rdma/dev.c b/rdma/dev.c
> > index e2eafe47..760b7fb3 100644
> > --- a/rdma/dev.c
> > +++ b/rdma/dev.c
> > @@ -14,6 +14,7 @@
> >  static int dev_help(struct rd *rd)
> >  {
> >  	pr_out("Usage: %s dev show [DEV]\n", rd->filename);
> > +	pr_out("       %s dev set [DEV] name DEVNAME\n", rd->filename);
> >  	return 0;
> >  }
> >
> > @@ -240,17 +241,51 @@ static int dev_one_show(struct rd *rd)
> >  	return rd_exec_cmd(rd, cmds, "parameter");
> >  }
> >
> > +static int dev_set_name(struct rd *rd)
> > +{
> > +	uint32_t seq;
> > +
> > +	if (rd_no_arg(rd)) {
> > +		pr_err("Please provide device new name.\n");
> > +		return -EINVAL;
> > +	}
>
> This is redundant with rd_exec_require_dev which is the required path to
> get to this point.

Sorry for being slow in response, I was on vacation.
----------

This print is intended to warn about missing "new name" and it is not
checked by rd_exec_require_dev()

To emphasize it:

diff --git a/rdma/dev.c b/rdma/dev.c
index 760b7fb3..468ae686 100644
--- a/rdma/dev.c
+++ b/rdma/dev.c
@@ -246,6 +246,7 @@ static int dev_set_name(struct rd *rd)
        uint32_t seq;

	if (rd_no_arg(rd)) {
+               pr_err("hello world\n");
                pr_err("Please provide device new  name.\n");
		return -EINVAL;
	}

Produces the following output:
[leonro@...ver iproute2]$ ./rdma/rdma dev set mlx5_0 name
hello world
Please provide device new name.

So how will we progress from here? Should I respin?

Thanks

Download attachment "signature.asc" of type "application/pgp-signature" (802 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ