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 Dec 2015 19:43:29 +0000
From:	"Liang, Kan" <kan.liang@...el.com>
To:	Ben Hutchings <ben@...adent.org.uk>,
	"Nelson, Shannon" <shannon.nelson@...el.com>
CC:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	David Miller <davem@...emloft.net>,
	"bwh@...nel.org" <bwh@...nel.org>,
	"Brandeburg, Jesse" <jesse.brandeburg@...el.com>,
	"andi@...stfloor.org" <andi@...stfloor.org>,
	"f.fainelli@...il.com" <f.fainelli@...il.com>,
	"alexander.duyck@...il.com" <alexander.duyck@...il.com>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>,
	"Wyborny, Carolyn" <carolyn.wyborny@...el.com>,
	"Skidmore, Donald C" <donald.c.skidmore@...el.com>,
	"Williams, Mitch A" <mitch.a.williams@...el.com>,
	"ogerlitz@...lanox.com" <ogerlitz@...lanox.com>,
	"edumazet@...gle.com" <edumazet@...gle.com>,
	"jiri@...lanox.com" <jiri@...lanox.com>,
	"sfeldma@...il.com" <sfeldma@...il.com>,
	"gospo@...ulusnetworks.com" <gospo@...ulusnetworks.com>,
	"sasha.levin@...cle.com" <sasha.levin@...cle.com>,
	"dsahern@...il.com" <dsahern@...il.com>,
	"tj@...nel.org" <tj@...nel.org>,
	"cascardo@...hat.com" <cascardo@...hat.com>,
	"corbet@....net" <corbet@....net>
Subject: RE: [RFC 1/2] net/ethtool: Add new coalescing parameter for queue



> 
> On Tue, 2015-12-08 at 10:02 -0800, Shannon Nelson wrote:
> > On Mon, Dec 7, 2015 at 8:42 PM,  <kan.liang@...el.com> wrote:
> > > From: Kan Liang <kan.liang@...el.com>
> > >
> > > Intrdouce "queue" option for coalesce getting and setting.
> [...]
> > > --- a/net/core/ethtool.c
> > > +++ b/net/core/ethtool.c
> > > @@ -1123,10 +1123,16 @@ static noinline_for_stack int
> > > ethtool_get_coalesce(struct net_device *dev,
> > >                                                    void __user
> > > *useraddr)
> > >  {
> > >         struct ethtool_coalesce coalesce = { .cmd =
> > > ETHTOOL_GCOALESCE };
> > > +       struct ethtool_coalesce tmp = { .queue = -1 };
> > >
> > >         if (!dev->ethtool_ops->get_coalesce)
> > >                 return -EOPNOTSUPP;
> > >
> > > +       if (copy_from_user(&tmp, useraddr, sizeof(coalesce)))
> > > +               return -EFAULT;
> > > +
> > > +       coalesce.queue = tmp.queue;
> > > +
> >
> > Is this going to do what you expect when you have an older ethtool
> > program?  It seems to me that the older ethtool program will have the
> > original coalesce struct without the new queue field, so when you do
> [...]
> 
> Indeed, it's not safe to extend UAPI structures like this.

Any suggestions for that?
If we cannot extend the existing UAPI structures. I guess we have to add
a new Ioctl like ETHTOOL_GCOALESCE_V2 for the new structure?

Thanks,
Kan


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ