<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/core/rtnetlink.c, branch v4.9</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.9</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-12-02T15:34:59Z</updated>
<entry>
<title>net/rtnetlink: fix attribute name in nlmsg_size() comments</title>
<updated>2016-12-02T15:34:59Z</updated>
<author>
<name>Tobias Klauser</name>
<email>tklauser@distanz.ch</email>
</author>
<published>2016-11-30T13:30:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6919756caaeaa76dc56287252fb656e3c2d9b4e1'/>
<id>urn:sha1:6919756caaeaa76dc56287252fb656e3c2d9b4e1</id>
<content type='text'>
Use the correct attribute constant names IFLA_GSO_MAX_{SEGS,SIZE}
instead of IFLA_MAX_GSO_{SEGS,SIZE} for the comments int nlmsg_size().

Cc: Eric Dumazet &lt;edumazet@google.com&gt;
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>rtnetlink: fix the wrong minimal dump size getting from rtnl_calcit()</title>
<updated>2016-11-24T01:18:36Z</updated>
<author>
<name>Zhang Shengju</name>
<email>zhangshengju@cmss.chinamobile.com</email>
</author>
<published>2016-11-22T06:14:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=93af205656bed3d8d3f4b85b2a3749c7ed7d996a'/>
<id>urn:sha1:93af205656bed3d8d3f4b85b2a3749c7ed7d996a</id>
<content type='text'>
For RT netlink, calcit() function should return the minimal size for
netlink dump message. This will make sure that dump message for every
network device can be stored.

Currently, rtnl_calcit() function doesn't account the size of header of
netlink message, this patch will fix it.

Signed-off-by: Zhang Shengju &lt;zhangshengju@cmss.chinamobile.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>rtnl: fix the loop index update error in rtnl_dump_ifinfo()</title>
<updated>2016-11-20T03:14:30Z</updated>
<author>
<name>Zhang Shengju</name>
<email>zhangshengju@cmss.chinamobile.com</email>
</author>
<published>2016-11-19T15:28:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3f0ae05d6fea0ed5b19efdbc9c9f8e02685a3af3'/>
<id>urn:sha1:3f0ae05d6fea0ed5b19efdbc9c9f8e02685a3af3</id>
<content type='text'>
If the link is filtered out, loop index should also be updated. If not,
loop index will not be correct.

Fixes: dc599f76c22b0 ("net: Add support for filtering link dump by master device and kind")
Signed-off-by: Zhang Shengju &lt;zhangshengju@cmss.chinamobile.com&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>rtnetlink: fix FDB size computation</title>
<updated>2016-11-18T19:09:42Z</updated>
<author>
<name>Sabrina Dubroca</name>
<email>sd@queasysnail.net</email>
</author>
<published>2016-11-18T14:50:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f82ef3e10a870acc19fa04f80ef5877eaa26f41e'/>
<id>urn:sha1:f82ef3e10a870acc19fa04f80ef5877eaa26f41e</id>
<content type='text'>
Add missing NDA_VLAN attribute's size.

Fixes: 1e53d5bb8878 ("net: Pass VLAN ID to rtnl_fdb_notify.")
Signed-off-by: Sabrina Dubroca &lt;sd@queasysnail.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>rtnetlink: fix rtnl message size computation for XDP</title>
<updated>2016-11-16T03:40:07Z</updated>
<author>
<name>Sabrina Dubroca</name>
<email>sd@queasysnail.net</email>
</author>
<published>2016-11-15T10:16:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b3cfaa31e3851c743d3f9d3441710f7ff6f7e868'/>
<id>urn:sha1:b3cfaa31e3851c743d3f9d3441710f7ff6f7e868</id>
<content type='text'>
rtnl_xdp_size() only considers the size of the actual payload attribute,
and misses the space taken by the attribute used for nesting (IFLA_XDP).

Fixes: d1fdd9138682 ("rtnl: add option for setting link xdp prog")
Signed-off-by: Sabrina Dubroca &lt;sd@queasysnail.net&gt;
Reviewed-by: Brenden Blanco &lt;bblanco@plumgrid.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>rtnetlink: fix rtnl_vfinfo_size</title>
<updated>2016-11-16T03:40:07Z</updated>
<author>
<name>Sabrina Dubroca</name>
<email>sd@queasysnail.net</email>
</author>
<published>2016-11-15T09:39:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7e75f74a171a8146cc3ee92d5562878b40c25fb5'/>
<id>urn:sha1:7e75f74a171a8146cc3ee92d5562878b40c25fb5</id>
<content type='text'>
The size reported by rtnl_vfinfo_size doesn't match the space used by
rtnl_fill_vfinfo.

rtnl_vfinfo_size currently doesn't account for the nest attributes
used by statistics (added in commit 3b766cd83232), nor for struct
ifla_vf_tx_rate (since commit ed616689a3d9, which added ifla_vf_rate
to the dump without removing ifla_vf_tx_rate, but replaced
ifla_vf_tx_rate with ifla_vf_rate in the size computation).

Fixes: 3b766cd83232 ("net/core: Add reading VF statistics through the PF netdevice")
Fixes: ed616689a3d9 ("net-next:v4: Add support to configure SR-IOV VF minimum and maximum Tx rate through ip tool")
Signed-off-by: Sabrina Dubroca &lt;sd@queasysnail.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>rtnl: reset calcit fptr in rtnl_unregister()</title>
<updated>2016-11-10T01:18:19Z</updated>
<author>
<name>Mathias Krause</name>
<email>minipli@googlemail.com</email>
</author>
<published>2016-11-07T22:22:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f567e950bf51290755a2539ff2aaef4c26f735d3'/>
<id>urn:sha1:f567e950bf51290755a2539ff2aaef4c26f735d3</id>
<content type='text'>
To avoid having dangling function pointers left behind, reset calcit in
rtnl_unregister(), too.

This is no issue so far, as only the rtnl core registers a netlink
handler with a calcit hook which won't be unregistered, but may become
one if new code makes use of the calcit hook.

Fixes: c7ac8679bec9 ("rtnetlink: Compute and store minimum ifinfo...")
Cc: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
Cc: Greg Rose &lt;gregory.v.rose@intel.com&gt;
Signed-off-by: Mathias Krause &lt;minipli@googlemail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: rtnl: info leak in rtnl_fill_vfinfo()</title>
<updated>2016-10-13T16:12:04Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2016-10-13T08:45:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=775f4f05501b3e36550ab63a592de3abd02e7591'/>
<id>urn:sha1:775f4f05501b3e36550ab63a592de3abd02e7591</id>
<content type='text'>
The "vf_vlan_info" struct ends with a 2 byte struct hole so we have to
memset it to ensure that no stack information is revealed to user space.

Fixes: 79aab093a0b5 ('net: Update API for VF vlan protocol 802.1ad support')
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: rtnl: avoid uninitialized data in IFLA_VF_VLAN_LIST handling</title>
<updated>2016-10-03T05:31:48Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2016-09-30T16:13:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fa34cd94fb01fcb8d79d91e009451b37692e94e5'/>
<id>urn:sha1:fa34cd94fb01fcb8d79d91e009451b37692e94e5</id>
<content type='text'>
With the newly added support for IFLA_VF_VLAN_LIST netlink messages,
we get a warning about potential uninitialized variable use in
the parsing of the user input when enabling the -Wmaybe-uninitialized
warning:

net/core/rtnetlink.c: In function 'do_setvfinfo':
net/core/rtnetlink.c:1756:9: error: 'ivvl$' may be used uninitialized in this function [-Werror=maybe-uninitialized]

I have not been able to prove whether it is possible to arrive in
this code with an empty IFLA_VF_VLAN_LIST block, but if we do,
then ndo_set_vf_vlan gets called with uninitialized arguments.

This adds an explicit check for an empty list, making it obvious
to the reader and the compiler that this cannot happen.

Fixes: 79aab093a0b5 ("net: Update API for VF vlan protocol 802.1ad support")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Moshe Shemesh &lt;moshe@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Update API for VF vlan protocol 802.1ad support</title>
<updated>2016-09-24T12:01:26Z</updated>
<author>
<name>Moshe Shemesh</name>
<email>moshe@mellanox.com</email>
</author>
<published>2016-09-22T09:11:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=79aab093a0b5370d7fc4e99df75996f4744dc03f'/>
<id>urn:sha1:79aab093a0b5370d7fc4e99df75996f4744dc03f</id>
<content type='text'>
Introduce new rtnl UAPI that exposes a list of vlans per VF, giving
the ability for user-space application to specify it for the VF, as an
option to support 802.1ad.
We adjusted IP Link tool to support this option.

For future use cases, the new UAPI supports multiple vlans. For now we
limit the list size to a single vlan in kernel.
Add IFLA_VF_VLAN_LIST in addition to IFLA_VF_VLAN to keep backward
compatibility with older versions of IP Link tool.

Add a vlan protocol parameter to the ndo_set_vf_vlan callback.
We kept 802.1Q as the drivers' default vlan protocol.
Suitable ip link tool command examples:
  Set vf vlan protocol 802.1ad:
    ip link set eth0 vf 1 vlan 100 proto 802.1ad
  Set vf to VST (802.1Q) mode:
    ip link set eth0 vf 1 vlan 100 proto 802.1Q
  Or by omitting the new parameter
    ip link set eth0 vf 1 vlan 100

Signed-off-by: Moshe Shemesh &lt;moshe@mellanox.com&gt;
Signed-off-by: Tariq Toukan &lt;tariqt@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
