lkml.org 
[lkml]   [2018]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH net 1/1 v3] rtnetlink: require unique netns identifier
Christian Brauner <christian.brauner@canonical.com> writes:

> On Wed, Feb 07, 2018 at 12:19:25PM +0100, Jiri Benc wrote:
>> On Tue, 6 Feb 2018 14:19:02 +0100, Christian Brauner wrote:
>> > +/* Verify that rtnetlink requests supporting network namespace ids
>> > + * do not pass additional properties potentially referring to different
>> > + * network namespaces.
>> > + */
>> > +static int rtnl_ensure_unique_netns(struct nlattr *tb[],
>> > + struct netlink_ext_ack *extack)
>> > +{
>> > + /* Requests without network namespace ids have been able to specify
>> > + * multiple properties referring to different network namespaces so
>> > + * don't regress them.
>> > + */
>> > + if (!tb[IFLA_IF_NETNSID])
>> > + return 0;
>>
>> I agree with Eric that we should enforce this also for the existing
>> pid/fd attributes.
>
> Yes, I would prefer this too but in the Linux spirit of never regressing
> userspace I was afraid that there might already be userspace
> applications that stick a pid and an fd at the same time into an
> rtnetlink request. If we are ok with potentially breaking them then we
> should just go for it. It is definitely the cleaner solution.

Odds are low that anything does anything so silly. If we accidentally
cause a regression then we fix it. Unless you have reason to suspect
someone actually does something silly we should be good.

Eric

\
 
 \ /
  Last update: 2018-02-07 16:21    [W:0.079 / U:1.344 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site