lkml.org 
[lkml]   [2016]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net v3 2/4] net: add rx_nohandler stat counter
On Mon, 8 Feb 2016 13:32:54 -0500
Jarod Wilson <jarod@redhat.com> wrote:

> On Sun, Feb 07, 2016 at 12:19:28PM -0800, Eric Dumazet wrote:
> > On Sun, 2016-02-07 at 14:46 -0500, David Miller wrote:
> >
> > > > Why was this userspace ABI change allowed?
> > > > The stats structure is exposed to user space via netlink
> > > > and changing the size of responses will break iproute2 commands.
> >
> > I do not think it breaks anything.
> >
> > iproute2 always assumed kernel was sending at least 23 u64, and does not
> > check at all if the kernel sends more. (or less, so iproute2 can print
> > garbage if kernel is malicious)
> >
> > an iproute2 patch will be needed to automatically detect if new kernels
> > are sending more data and print it accordingly.
>
> My TODO list did include poking at iproute2 to expose the new info, I can
> take a closer look for possible issues as well, but...
>
> > > > The code will be expecting one size and the response will vary and
> > > > break existing code. Yes, the code should check the size
> > > > of the response, but it doesn't and I am sure iproute2 is not
> > > > the only code that does this.
> > >
> > > Jarod, please look into this.
> >
> > Running latest net-next, and old iproute2 is just fine.
>
> ...I haven't run into anything that didn't work with current iproute2
> either while testing out functionality of these patches. If there's
> something in particular that seems most suspect that I perhaps simply
> haven't tried, I can give that a go as well.
>
> In any case, I'm definitely due to take a look at iproute2 as it relates
> to this patchset.
>

The iproute2 command can be fixed, but adding dependency on size of response
gets gross fast. Imagine when 4 more fields get added, this doesn't scale well.

Also, the definition of userspace ABI is that structures can't change.
There are many other utilities that are not visible that may get broken.
Traditionally Linux has guaranteed that programs will continue to work
no matter how they were coded.

\
 
 \ /
  Last update: 2016-02-08 21:01    [W:2.411 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site