Re: [PATCH] tools: usb: usbip: adding support for older kernel versions
From: Brian Norris
Date: Mon Mar 25 2019 - 19:02:49 EST
On Mon, Mar 25, 2019 at 3:07 PM shuah <shuah@xxxxxxxxxx> wrote:
> On 3/25/19 11:56 AM, Brian Norris wrote:
> > On Mon, Mar 25, 2019 at 8:51 AM shuah <shuah@xxxxxxxxxx> wrote:
> >> In general the ABI is stable.
> >
> > No, it really isn't. This commit was a breaking change:
...
> > But this one is definitely a break:
> >
> > commit 1c9de5bf428612458427943b724bea51abde520a
> > Author: Yuyang Du <yuyang.du@xxxxxxxxx>
> > Date: Thu Jun 8 13:04:10 2017 +0800
> >
> > usbip: vhci-hcd: Add USB3 SuperSpeed support
> >
> > You can't just arbitrarily add columns to the beginning of a file like
> > that and claim that you're not breaking ABI. And I shouldn't need to
> > remind you that Thou Shalt Not Break User Space.
>
> USB 3.0 driver and tool support went in, I would say it was oversight to
> not make sure the tool continues to work on older kernels.
While that's true, you're still not grokking my main point when asking
about ABI stability:
*old* tools should still work on *new* kernels
The above commit broke that.
> So what's your ability to upgrade to 3.18 latest to get the security
> fix. You would want to pick this up anyway.
We'll take cherry-picks as needed. You don't need to worry about
exactly how we maintain our branches, as that's not really the main
concern of upstream (at least, not in terms of kernel development).
But for the purposes of this conversation, assume that we have that
bugfix.
> Now the second issue is "supporting the latest tool on older kernels".
> Guess I didn't think about the possibility of tools from 5.1 being run
> on 3.18 :)
>
> I am willing to guarantee that going forward the latest usbip tool
> will not break on the supported stable releases.
>
> I am going to take a look at fixing the tool to run on older kernels.
That would be appreciated, but frankly, even that is not really
required: if you want to maintain the tool such that it always assumes
the latest kernel features that's your prerogative -- we don't have to
upgrade every release. At some point, new software tends to require
some minimal dependencies beneath it. So again, it would be nice to
degrade gracefully on older kernels, but it's not an absolute
requirement.
The biggest issue, as noted above, is that I currently cannot run
older usbip (user space) on newer kernels. That's a flagrant violation
of kernel ABI guarantees.
If you did consistently maintain ABI as noted above (old user space;
new kernel), then your users can choose to upgrade user space only
when needed. (And so, for instance, I could solve my problem by simply
downgrading to usbip tools from 3.18.) Today, that's not possible.
Brian