<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/core/rtnetlink.c, branch linux-4.11.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.11.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.11.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-07-05T12:41:37Z</updated>
<entry>
<title>rtnetlink: add IFLA_GROUP to ifla_policy</title>
<updated>2017-07-05T12:41:37Z</updated>
<author>
<name>Serhey Popovych</name>
</author>
<published>2017-06-20T11:35:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f19613afaf2622f5854a2266e2aa9abc9f9d145a'/>
<id>urn:sha1:f19613afaf2622f5854a2266e2aa9abc9f9d145a</id>
<content type='text'>
[ Upstream commit db833d40ad3263b2ee3b59a1ba168bb3cfed8137 ]

Network interface groups support added while ago, however
there is no IFLA_GROUP attribute description in policy
and netlink message size calculations until now.

Add IFLA_GROUP attribute to the policy.

Fixes: cbda10fa97d7 ("net_device: add support for network device groups")
Signed-off-by: Serhey Popovych &lt;serhe.popovych@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: Zero ifla_vf_info in rtnl_fill_vfinfo()</title>
<updated>2017-07-05T12:41:34Z</updated>
<author>
<name>Mintz, Yuval</name>
</author>
<published>2017-06-07T18:00:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=199f4baff672c12657637791964b194b8212706d'/>
<id>urn:sha1:199f4baff672c12657637791964b194b8212706d</id>
<content type='text'>
[ Upstream commit 0eed9cf58446b28b233388b7f224cbca268b6986 ]

Some of the structure's fields are not initialized by the
rtnetlink. If driver doesn't set those in ndo_get_vf_config(),
they'd leak memory to user.

Signed-off-by: Yuval Mintz &lt;Yuval.Mintz@cavium.com&gt;
CC: Michal Schmidt &lt;mschmidt@redhat.com&gt;
Reviewed-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: Improve handling of failures on link and route dumps</title>
<updated>2017-06-07T10:10:02Z</updated>
<author>
<name>David Ahern</name>
</author>
<published>2017-05-16T06:19:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=df6342be40ff97a8dc35fa8713c90d21fb4f2f67'/>
<id>urn:sha1:df6342be40ff97a8dc35fa8713c90d21fb4f2f67</id>
<content type='text'>
[ Upstream commit f6c5775ff0bfa62b072face6bf1d40f659f194b2 ]

In general, rtnetlink dumps do not anticipate failure to dump a single
object (e.g., link or route) on a single pass. As both route and link
objects have grown via more attributes, that is no longer a given.

netlink dumps can handle a failure if the dump function returns an
error; specifically, netlink_dump adds the return code to the response
if it is &lt;= 0 so userspace is notified of the failure. The missing
piece is the rtnetlink dump functions returning the error.

Fix route and link dump functions to return the errors if no object is
added to an skb (detected by skb-&gt;len != 0). IPv6 route dumps
(rt6_dump_route) already return the error; this patch updates IPv4 and
link dumps. Other dump functions may need to be ajusted as well.

Reported-by: Jan Moskyto Matejka &lt;mq@ucw.cz&gt;
Signed-off-by: David Ahern &lt;dsahern@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rtnetlink: NUL-terminate IFLA_PHYS_PORT_NAME string</title>
<updated>2017-05-14T12:06:02Z</updated>
<author>
<name>Michal Schmidt</name>
</author>
<published>2017-05-04T14:48:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0913e5733167f958114327975898ea356161febc'/>
<id>urn:sha1:0913e5733167f958114327975898ea356161febc</id>
<content type='text'>
[ Upstream commit 77ef033b687c3e030017c94a29bf6ea3aaaef678 ]

IFLA_PHYS_PORT_NAME is a string attribute, so terminate it with \0.
Otherwise libnl3 fails to validate netlink messages with this attribute.
"ip -detail a" assumes too that the attribute is NUL-terminated when
printing it. It often was, due to padding.

I noticed this as libvirtd failing to start on a system with sfc driver
after upgrading it to Linux 4.11, i.e. when sfc added support for
phys_port_name.

Signed-off-by: Michal Schmidt &lt;mschmidt@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rtnl: simplify error return path in rtnl_create_link()</title>
<updated>2017-02-21T17:17:43Z</updated>
<author>
<name>Tobias Klauser</name>
</author>
<published>2017-02-20T15:32:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d1892e4ec96aad4b733dfab3ed989718f04f03e9'/>
<id>urn:sha1:d1892e4ec96aad4b733dfab3ed989718f04f03e9</id>
<content type='text'>
There is only one possible error path which reaches the err label, so
return ERR_PTR(-ENOMEM) directly if alloc_netdev_mqs() fails. This also
allows to omit the err variable.

Signed-off-by: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>rtnl: don't account unused struct ifla_port_vsi in rtnl_port_size</title>
<updated>2017-02-17T19:56:11Z</updated>
<author>
<name>Daniel Borkmann</name>
</author>
<published>2017-02-17T00:56:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=025331df34f6722f86b467cb13a69326444ab1bc'/>
<id>urn:sha1:025331df34f6722f86b467cb13a69326444ab1bc</id>
<content type='text'>
When allocating rtnl dump messages, struct ifla_port_vsi is never dumped,
so we can save header plus payload in rtnl_port_size(). Infact, attribute
IFLA_PORT_VSI_TYPE and struct ifla_port_vsi are not used anywhere in
the kernel. We only need to keep the nla policy should applications in
user space be filling this out. Same NLA_BINARY issue exists as was fixed
in 364d5716a7ad ("rtnetlink: ifla_vf_policy: fix misuses of NLA_BINARY")
and others, but then again IFLA_PORT_VSI_TYPE is not used anywhere, so
just add a comment that it's unused.

Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>rtnetlink: Handle IFLA_MASTER parameter when processing rtnl_newlink</title>
<updated>2017-02-01T16:53:23Z</updated>
<author>
<name>Theuns Verwoerd</name>
</author>
<published>2017-01-30T23:23:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=160ca0142431c19386db976302fd4b07c587f651'/>
<id>urn:sha1:160ca0142431c19386db976302fd4b07c587f651</id>
<content type='text'>
Allow a master interface to be specified as one of the parameters when
creating a new interface via rtnl_newlink.  Previously this would
require invoking interface creation, waiting for it to complete, and
then separately binding that new interface to a master.

In particular, this is used when creating a macvlan child interface for
VRRP in a VRF configuration, allowing the interface creator to specify
directly what master interface should be inherited by the child,
without having to deal with asynchronous complications and potential
race conditions.

Signed-off-by: Theuns Verwoerd &lt;theuns.verwoerd@alliedtelesis.co.nz&gt;
Acked-by: David Ahern &lt;dsa@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>device: Implement a bus agnostic dev_num_vf routine</title>
<updated>2017-01-20T16:43:17Z</updated>
<author>
<name>Phil Sutter</name>
</author>
<published>2017-01-18T13:04:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9af15c38254d81c9991eba89335ca7c537d7f2c3'/>
<id>urn:sha1:9af15c38254d81c9991eba89335ca7c537d7f2c3</id>
<content type='text'>
Now that pci_bus_type has num_vf callback set, dev_num_vf can be
implemented in a bus type independent way and the check for whether a
PCI device is being handled in rtnetlink can be dropped.

Signed-off-by: Phil Sutter &lt;phil@nwl.cc&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: AF-specific RTM_GETSTATS attributes</title>
<updated>2017-01-17T19:38:43Z</updated>
<author>
<name>Robert Shearman</name>
</author>
<published>2017-01-16T14:16:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aefb4d4ad83b608cb8e0cab8d3cd8e57d3f91feb'/>
<id>urn:sha1:aefb4d4ad83b608cb8e0cab8d3cd8e57d3f91feb</id>
<content type='text'>
Add the functionality for including address-family-specific per-link
stats in RTM_GETSTATS messages. This is done through adding a new
IFLA_STATS_AF_SPEC attribute under which address family attributes are
nested and then the AF-specific attributes can be further nested. This
follows the model of IFLA_AF_SPEC on RTM_*LINK messages and it has the
advantage of presenting an easily extended hierarchy. The rtnl_af_ops
structure is extended to provide AFs with the opportunity to fill and
provide the size of their stats attributes.

One alternative would have been to provide AFs with the ability to add
attributes directly into the RTM_GETSTATS message without a nested
hierarchy. I discounted this approach as it increases the rate at
which the 32 attribute number space is used up and it makes
implementation a little more tricky for stats dump resuming (at the
moment the order in which attributes are added to the message has to
match the numeric order of the attributes).

Another alternative would have been to register per-AF RTM_GETSTATS
handlers. I discounted this approach as I perceived a common use-case
to be getting all the stats for an interface and this approach would
necessitate multiple requests/dumps to retrieve them all.

Signed-off-by: Robert Shearman &lt;rshearma@brocade.com&gt;
Acked-by: Roopa Prabhu &lt;roopa@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>rtnl: stats - add missing netlink message size checks</title>
<updated>2016-12-29T19:05:15Z</updated>
<author>
<name>Mathias Krause</name>
</author>
<published>2016-12-28T16:52:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4775cc1f2d5abca894ac32774eefc22c45347d1c'/>
<id>urn:sha1:4775cc1f2d5abca894ac32774eefc22c45347d1c</id>
<content type='text'>
We miss to check if the netlink message is actually big enough to contain
a struct if_stats_msg.

Add a check to prevent userland from sending us short messages that would
make us access memory beyond the end of the message.

Fixes: 10c9ead9f3c6 ("rtnetlink: add new RTM_GETSTATS message to dump...")
Signed-off-by: Mathias Krause &lt;minipli@googlemail.com&gt;
Cc: Roopa Prabhu &lt;roopa@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
