1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-22 16:06:04 -05:00
linux/net
Petr Machata 75bab45e6b net: nexthop: Add flag to assert that NHGRP reserved fields are zero
There are many unpatched kernel versions out there that do not initialize
the reserved fields of struct nexthop_grp. The issue with that is that if
those fields were to be used for some end (i.e. stop being reserved), old
kernels would still keep sending random data through the field, and a new
userspace could not rely on the value.

In this patch, use the existing NHA_OP_FLAGS, which is currently inbound
only, to carry flags back to the userspace. Add a flag to indicate that the
reserved fields in struct nexthop_grp are zeroed before dumping. This is
reliant on the actual fix from commit 6d745cd0e9 ("net: nexthop:
Initialize all fields in dumped nexthops").

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/21037748d4f9d8ff486151f4c09083bcf12d5df8.1723036486.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-08-12 17:50:34 -07:00
..
6lowpan ipv6: eliminate ndisc_ops_is_useropt() 2024-08-12 17:23:57 -07:00
9p
802
8021q
appletalk
atm
ax25
batman-adv
bluetooth Bluetooth: hci_sync: avoid dup filtering when passive scanning with adv monitor 2024-08-07 16:36:01 -04:00
bpf
bridge net: bridge: mcast: wait for previous gc cycles when removing port 2024-08-05 16:33:56 -07:00
caif
can
ceph
core Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-08-08 14:04:17 -07:00
dcb
dccp
devlink
dns_resolver
dsa
ethernet
ethtool ethtool: rss: support skipping contexts during dump 2024-08-12 14:16:24 +01:00
handshake
hsr
ieee802154
ife
ipv4 net: nexthop: Add flag to assert that NHGRP reserved fields are zero 2024-08-12 17:50:34 -07:00
ipv6 ipv6: eliminate ndisc_ops_is_useropt() 2024-08-12 17:23:57 -07:00
iucv
kcm
key
l2tp l2tp: flush workqueue before draining it 2024-08-11 04:38:50 +01:00
l3mdev
lapb
llc
mac80211
mac802154
mctp
mpls
mptcp
ncsi
netfilter
netlabel
netlink
netrom
nfc
nsh
openvswitch
packet
phonet
psample
qrtr
rds net: rds: add option for GCOV profiling 2024-08-09 13:18:46 +01:00
rfkill
rose
rxrpc rxrpc: Remove unused function declarations 2024-08-02 17:17:34 -07:00
sched
sctp sctp: Fix null-ptr-deref in reuseport_add_sock(). 2024-08-02 16:25:06 -07:00
smc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-08-08 14:04:17 -07:00
strparser
sunrpc
switchdev
tipc tipc: guard against string buffer overrun 2024-08-02 17:16:09 -07:00
tls
unix
vmw_vsock
wireless
x25
xdp
xfrm
compat.c
devres.c
Kconfig
Kconfig.debug
Makefile
socket.c
sysctl_net.c