linux/include/net
Jakub Kicinski 5b4b62a169 rtnetlink: make the "split" NLM_DONE handling generic
Jaroslav reports Dell's OMSA Systems Management Data Engine
expects NLM_DONE in a separate recvmsg(), both for rtnl_dump_ifinfo()
and inet_dump_ifaddr(). We already added a similar fix previously in
commit 460b0d33cf ("inet: bring NLM_DONE out to a separate recv() again")

Instead of modifying all the dump handlers, and making them look
different than modern for_each_netdev_dump()-based dump handlers -
put the workaround in rtnetlink code. This will also help us move
the custom rtnl-locking from af_netlink in the future (in net-next).

Note that this change is not touching rtnl_dump_all(). rtnl_dump_all()
is different kettle of fish and a potential problem. We now mix families
in a single recvmsg(), but NLM_DONE is not coalesced.

Tested:

  ./cli.py --dbg-small-recv 4096 --spec netlink/specs/rt_addr.yaml \
           --dump getaddr --json '{"ifa-family": 2}'

  ./cli.py --dbg-small-recv 4096 --spec netlink/specs/rt_route.yaml \
           --dump getroute --json '{"rtm-family": 2}'

  ./cli.py --dbg-small-recv 4096 --spec netlink/specs/rt_link.yaml \
           --dump getlink

Fixes: 3e41af9076 ("rtnetlink: use xarray iterator to implement rtnl_dump_ifinfo()")
Fixes: cdb2f80f1c ("inet: use xa_array iterator to implement inet_dump_ifaddr()")
Reported-by: Jaroslav Pulchart <jaroslav.pulchart@gooddata.com>
Link: https://lore.kernel.org/all/CAK8fFZ7MKoFSEzMBDAOjoUt+vTZRRQgLDNXEOfdCCXSoXXKE0g@mail.gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2024-06-05 12:34:54 +01:00
..
9p netfs, 9p: Implement helpers for new write code 2024-05-01 18:07:37 +01:00
bluetooth Bluetooth: hci_core: Fix not handling hdev->le_num_of_adv_sets=1 2024-05-14 10:56:37 -04:00
caif
iucv s390/iucv: Unexport iucv_root 2024-05-14 20:21:04 +02:00
libeth libeth: add Rx buffer management 2024-04-24 11:06:25 -07:00
mana Merge branch mana-ib-flex of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git 2024-04-11 07:38:28 -07:00
netfilter netfilter: nf_tables: allow clone callbacks to sleep 2024-05-10 11:13:45 +02:00
netns
nfc nfc: core: make nfc_class constant 2024-03-05 11:21:18 -08:00
page_pool page_pool: fix &page_pool_params kdoc issues 2024-05-27 17:00:22 -07:00
phonet
sctp sctp: preserve const qualifier in sctp_sk() 2024-02-05 11:08:06 +00:00
tc_act
6lowpan.h
act_api.h net/sched: Add helper macros with module names 2024-02-02 10:57:55 -08:00
addrconf.h ipv6: fix race condition between ipv6_get_ifaddr and ipv6_del_addr 2024-04-09 17:09:05 -07:00
af_ieee802154.h
af_rxrpc.h
af_unix.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-04-25 12:41:37 -07:00
af_vsock.h
ah.h
amt.h
arp.h
atmclip.h
ax25.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-05-14 10:53:19 -07:00
ax88796.h
bareudp.h
bond_3ad.h bonding: Add independent control state machine 2024-02-06 13:17:54 +01:00
bond_alb.h
bond_options.h bonding: Add independent control state machine 2024-02-06 13:17:54 +01:00
bonding.h bonding: Add independent control state machine 2024-02-06 13:17:54 +01:00
bpf_sk_storage.h
busy_poll.h net: add napi_busy_loop_rcu() 2024-02-09 10:01:09 -08:00
calipso.h
cfg80211-wext.h
cfg80211.h wifi: cfg80211: handle color change per link 2024-05-03 10:18:03 +02:00
cfg802154.h mac802154: fix llsec key resources release in mac802154_llsec_key_del 2024-03-06 21:01:26 +01:00
checksum.h
cipso_ipv4.h netlabel: fix RCU annotation for IPv4 options on socket creation 2024-05-13 14:58:12 -07:00
cls_cgroup.h
codel.h
codel_impl.h
codel_qdisc.h
compat.h
datalink.h
dcbevent.h
dcbnl.h
devlink.h devlink: extend devlink_param *set pointer 2024-04-22 13:05:19 -07:00
dropreason-core.h tcp: introduce dropreasons in receive path 2024-02-28 10:39:21 +00:00
dropreason.h
dsa.h net: dsa: add support switches global DSCP priority mapping 2024-05-08 10:35:10 +01:00
dsa_stubs.h
dscp.h net: add IEEE 802.1q specific helpers 2024-05-08 10:35:09 +01:00
dsfield.h
dst.h net: dst: Make dst_destroy() static and return void. 2024-02-06 11:45:53 +01:00
dst_cache.h net: dst_cache: annotate data-races around dst_cache->reset_ts 2024-05-08 18:49:51 -07:00
dst_metadata.h ip_tunnel: convert __be16 tunnel flags to bitmaps 2024-04-01 10:49:28 +01:00
dst_ops.h net: fix __dst_negative_advice() race 2024-05-29 17:34:49 -07:00
eee.h net: add helpers for EEE configuration 2024-03-05 19:21:17 -08:00
erspan.h
esp.h
espintcp.h inet: preserve const qualifier in inet_csk() 2024-04-01 21:27:08 -07:00
ethoc.h
failover.h
fib_notifier.h
fib_rules.h
firewire.h
flow.h
flow_dissector.h ip_tunnel: convert __be16 tunnel flags to bitmaps 2024-04-01 10:49:28 +01:00
flow_offload.h flow_offload: add control flag checking helpers 2024-04-15 10:33:14 +01:00
fou.h
fq.h
fq_impl.h
garp.h
gen_stats.h
genetlink.h genetlink: remove linux/genetlink.h 2024-04-01 21:44:34 -07:00
geneve.h
gre.h ip_tunnel: convert __be16 tunnel flags to bitmaps 2024-04-01 10:49:28 +01:00
gro.h net: gro: fix napi_gro_cb zeroed alignment 2024-05-14 10:49:50 -07:00
gro_cells.h
gso.h
gtp.h gtp: properly parse extension headers 2024-05-07 01:35:55 +02:00
gue.h
handshake.h
hotdata.h net: move sysctl_mem_pcpu_rsv to net_hotdata 2024-04-30 18:46:52 -07:00
hwbm.h
icmp.h
ieee8021q.h net: add IEEE 802.1q specific helpers 2024-05-08 10:35:09 +01:00
ieee80211_radiotap.h
ieee802154_netdev.h
if_inet6.h ipv6: anycast: complete RCU handling of struct ifacaddr6 2024-02-26 18:40:34 -08:00
ife.h
inet6_connection_sock.h
inet6_hashtables.h
inet_common.h net: change proto and proto_ops accept type 2024-05-13 18:19:09 -06:00
inet_connection_sock.h net: change proto and proto_ops accept type 2024-05-13 18:19:09 -06:00
inet_dscp.h
inet_ecn.h
inet_frag.h
inet_hashtables.h
inet_sock.h inet: Add getsockopt support for IP_ROUTER_ALERT and IPV6_ROUTER_ALERT 2024-03-06 12:37:06 +00:00
inet_timewait_sock.h tcp/dccp: do not care about families in inet_twsk_purge() 2024-04-01 21:27:58 -07:00
inetpeer.h
ioam6.h net: ioam6: multicast event 2024-02-28 11:19:41 +00:00
ip.h inet: introduce dst_rtable() helper 2024-04-30 18:32:38 -07:00
ip6_checksum.h
ip6_fib.h ipv6: introduce dst_rt6_info() helper 2024-04-29 13:32:01 +01:00
ip6_route.h ipv6: introduce dst_rt6_info() helper 2024-04-29 13:32:01 +01:00
ip6_tunnel.h ip_tunnel: convert __be16 tunnel flags to bitmaps 2024-04-01 10:49:28 +01:00
ip_fib.h inet: allow ip_valid_fib_dump_req() to be called with RTNL or RCU 2024-02-26 11:46:12 +00:00
ip_tunnels.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-04-11 14:23:47 -07:00
ip_vs.h
ipcomp.h
ipconfig.h
ipv6.h ipv6: annotate data-races around cnf.forwarding 2024-03-01 08:42:31 +00:00
ipv6_frag.h
ipv6_stubs.h
iw_handler.h
kcm.h
l3mdev.h
lag.h
lapb.h
lib80211.h
llc.h
llc_c_ac.h
llc_c_ev.h
llc_c_st.h
llc_conn.h
llc_if.h
llc_pdu.h llc: Drop support for ETH_P_TR_802_2. 2024-01-19 21:30:09 -08:00
llc_s_ac.h
llc_s_ev.h
llc_s_st.h
llc_sap.h
lwtunnel.h
mac80211.h wifi: mac80211: handle color change per link 2024-05-03 10:18:19 +02:00
mac802154.h
macsec.h macsec: Enable devices to advertise whether they update sk_buff md_dst during offloads 2024-04-25 08:20:54 -07:00
mctp.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-29 14:24:56 -08:00
mctpdevice.h
mip6.h
mld.h
mpls.h
mpls_iptunnel.h
mptcp.h mptcp: add net.mptcp.available_schedulers 2024-05-13 18:29:23 -07:00
mrp.h
ncsi.h
ndisc.h
neighbour.h
net_debug.h
net_failover.h
net_namespace.h net: add exit_batch_rtnl() method 2024-02-07 18:55:10 -08:00
net_ratelimit.h
net_trackers.h
netdev_queues.h netdev: Add queue stats for TX stop and wake 2024-05-13 14:58:36 -07:00
netdev_rx_queue.h
netevent.h
netkit.h
netlabel.h The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
netlink.h The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
netmem.h net: introduce abstraction for network memory 2024-02-20 09:22:58 +01:00
netprio_cgroup.h
netrom.h
nexthop.h net: add two more call_rcu_hurry() 2024-04-25 15:24:23 -07:00
nl802154.h
nsh.h
p8022.h
pfcp.h pfcp: always set pfcp metadata 2024-04-01 10:49:28 +01:00
pie.h
ping.h
pkt_cls.h net: sched: make skip_sw actually skip software 2024-03-29 09:46:39 +00:00
pkt_sched.h net/sched: Add helper macros with module names 2024-02-02 10:57:55 -08:00
pptp.h
proto_memory.h net: move sysctl_mem_pcpu_rsv to net_hotdata 2024-04-30 18:46:52 -07:00
protocol.h ipv6: move tcp_ipv6_hash_secret and udp_ipv6_hash_secret to net_hotdata 2024-03-07 21:12:43 -08:00
psample.h
psnap.h
raw.h
rawv6.h
red.h net_sched: sch_choke: implement lockless choke_dump() 2024-04-19 11:34:07 +01:00
regulatory.h
request_sock.h tcp: reduce accepted window in NEW_SYN_RECV state 2024-05-27 16:47:23 -07:00
rose.h
route.h inet: introduce dst_rtable() helper 2024-04-30 18:32:38 -07:00
rpl.h
rps.h net: rps: add rps_input_queue_head_add() helper 2024-04-01 11:28:32 +01:00
rsi_91x.h
rstreason.h tcp: rstreason: fully support in tcp_check_req() 2024-05-13 17:33:57 -07:00
rtnetlink.h rtnetlink: make the "split" NLM_DONE handling generic 2024-06-05 12:34:54 +01:00
rtnh.h
sch_generic.h net/sched: fix false lockdep warning on qdisc root lock 2024-04-26 10:46:41 +02:00
scm.h af_unix: Add dead flag to struct scm_fp_list. 2024-05-10 18:52:45 -07:00
secure_seq.h
seg6.h
seg6_hmac.h
seg6_local.h
selftests.h
slhc_vj.h
smc.h net/smc: add operations to merge sndbuf with peer DMB 2024-04-30 13:24:48 +02:00
snmp.h
sock.h net: fix __dst_negative_advice() race 2024-05-29 17:34:49 -07:00
sock_reuseport.h
Space.h
stp.h
strparser.h
switchdev.h net: bridge: switchdev: Skip MDB replays of deferred events on offload 2024-02-16 09:36:37 +00:00
tc_wrapper.h Merge branch 'x86/bugs' into x86/core, to pick up pending changes before dependent patches 2024-02-14 10:49:37 +01:00
tcp.h bpf-next-for-netdev 2024-05-13 16:41:10 -07:00
tcp_ao.h net/tcp: Don't consider TCP_CLOSE in TCP_AO_ESTABLISHED 2024-06-01 16:27:26 -07:00
tcp_states.h
tcx.h mm: change inlined allocation helpers to account at the call site 2024-04-25 20:55:59 -07:00
timewait_sock.h tcp: get rid of twsk_unique() 2024-05-09 20:25:55 -07:00
tipc.h
tls.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-04-25 12:41:37 -07:00
tls_prot.h
tls_toe.h
transp_v6.h
tso.h
tun_proto.h
udp.h new helper: copy_to_iter_full() 2024-04-07 02:42:36 -04:00
udp_tunnel.h ip_tunnel: convert __be16 tunnel flags to bitmaps 2024-04-01 10:49:28 +01:00
udplite.h
vsock_addr.h
vxlan.h
wext.h
x25.h
x25device.h
xdp.h
xdp_priv.h
xdp_sock.h xsk: Don't assume metadata is always requested in TX completion 2024-03-19 13:47:29 +01:00
xdp_sock_drv.h xsk: use generic DMA sync shortcut instead of a custom one 2024-05-08 08:51:20 +02:00
xfrm.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-05-09 10:01:01 -07:00
xsk_buff_pool.h xsk: use generic DMA sync shortcut instead of a custom one 2024-05-08 08:51:20 +02:00