linux_dsm_epyc7002/drivers/net
Michal Kubecek ae0be8de9a netlink: make nla_nest_start() add NLA_F_NESTED flag
Even if the NLA_F_NESTED flag was introduced more than 11 years ago, most
netlink based interfaces (including recently added ones) are still not
setting it in kernel generated messages. Without the flag, message parsers
not aware of attribute semantics (e.g. wireshark dissector or libmnl's
mnl_nlmsg_fprintf()) cannot recognize nested attributes and won't display
the structure of their contents.

Unfortunately we cannot just add the flag everywhere as there may be
userspace applications which check nlattr::nla_type directly rather than
through a helper masking out the flags. Therefore the patch renames
nla_nest_start() to nla_nest_start_noflag() and introduces nla_nest_start()
as a wrapper adding NLA_F_NESTED. The calls which add NLA_F_NESTED manually
are rewritten to use nla_nest_start().

Except for changes in include/net/netlink.h, the patch was generated using
this semantic patch:

@@ expression E1, E2; @@
-nla_nest_start(E1, E2)
+nla_nest_start_noflag(E1, E2)

@@ expression E1, E2; @@
-nla_nest_start_noflag(E1, E2 | NLA_F_NESTED)
+nla_nest_start(E1, E2)

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-27 17:03:44 -04:00
..
appletalk ipv4: Prepare rtable for IPv6 gateway 2019-04-08 15:22:40 -07:00
arcnet
bonding netlink: make nla_nest_start() add NLA_F_NESTED flag 2019-04-27 17:03:44 -04:00
caif
can
dsa net: dsa: mv88e6xxx: Only reconfigure MAC when something changes 2019-04-19 14:08:21 -07:00
ethernet net: hns3: remove reset after command send failed 2019-04-26 12:13:29 -04:00
fddi
fjes
hamradio
hippi net: hippi:Fix misuse of %x in rrunner.c 2019-04-21 10:37:26 -07:00
hyperv Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-04-05 14:14:19 -07:00
ieee802154 netlink: make nla_nest_start() add NLA_F_NESTED flag 2019-04-27 17:03:44 -04:00
ipvlan
netdevsim netdevsim: implement ndo_get_devlink_port 2019-04-26 01:52:03 -04:00
phy net: phy: improve genphy_soft_reset 2019-04-26 11:56:54 -04:00
plip
ppp
slip
team netlink: make nla_nest_start() add NLA_F_NESTED flag 2019-04-27 17:03:44 -04:00
usb usbnet: ipheth: Simplify device detection 2019-04-26 11:34:01 -04:00
vmxnet3
wan
wimax wimax/i2400m/control: Mark expected switch fall-through 2019-04-26 11:28:47 -04:00
wireless netlink: make nla_nest_start() add NLA_F_NESTED flag 2019-04-27 17:03:44 -04:00
xen-netback xen-netback: add reference from xenvif to backend_info to facilitate coredump analysis 2019-04-12 10:10:28 -07:00
dummy.c net: dummy: use generic helper to report timestamping info 2019-04-12 16:26:37 -07:00
eql.c
geneve.c
gtp.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c net: loopback: use generic helper to report timestamping info 2019-04-12 16:26:37 -07:00
macsec.c netlink: make nla_nest_start() add NLA_F_NESTED flag 2019-04-27 17:03:44 -04:00
macvlan.c netlink: make nla_nest_start() add NLA_F_NESTED flag 2019-04-27 17:03:44 -04:00
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c sb1000: fix variable set but not used warnings 2019-04-18 17:06:15 -07:00
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c
veth.c net: veth: use generic helper to report timestamping info 2019-04-12 16:26:37 -07:00
virtio_net.c virtio-net: Fix some minor formatting errors 2019-04-06 18:10:11 -07:00
vrf.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-04-25 23:52:29 -04:00
vsockmon.c
vxlan.c
xen-netfront.c xen-netfront: mark expected switch fall-through 2019-04-16 21:03:02 -07:00