linux_dsm_epyc7002/net
Johannes Berg d07dcf9aad netlink: add infrastructure to expose policies to userspace
Add, and use in generic netlink, helpers to dump out a netlink
policy to userspace, including all the range validation data,
nested policies etc.

This lets userspace discover what the kernel understands.

For families/commands other than generic netlink, the helpers
need to be used directly in an appropriate command, or we can
add some infrastructure (a new netlink family) that those can
register their policies with for introspection. I'm not that
familiar with non-generic netlink, so that's left out for now.

The data exposed to userspace also includes min and max length
for binary/string data, I've done that instead of letting the
userspace tools figure out whether min/max is intended based
on the type so that we can extend this later in the kernel, we
might want to just use the range data for example.

Because of this, I opted to not directly expose the NLA_*
values, even if some of them are already exposed via BPF, as
with min/max length we don't need to have different types here
for NLA_BINARY/NLA_MIN_LEN/NLA_EXACT_LEN, we just make them
all NL_ATTR_TYPE_BINARY with min/max length optionally set.

Similarly, we don't really need NLA_MSECS, and perhaps can
remove it in the future - but not if we encode it into the
userspace API now. It gets mapped to NL_ATTR_TYPE_U64 here.

Note that the exposing here corresponds to the strict policy
interpretation, and NLA_UNSPEC items are omitted entirely.
To get those, change them to NLA_MIN_LEN which behaves in
exactly the same way, but is exposed.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-30 17:51:42 -07:00
..
6lowpan
9p
802
8021q
appletalk
atm docs: networking: convert atm.txt to ReST 2020-04-28 14:38:38 -07:00
ax25 docs: networking: convert ax25.txt to ReST 2020-04-28 14:38:38 -07:00
batman-adv batman-adv: remove unused inline function batadv_arp_change_timeout 2020-04-24 15:22:41 +02:00
bluetooth Bluetooth: Enhanced Connection Complete event belongs to LL Privacy 2020-04-16 12:43:03 +03:00
bpf
bpfilter SPDX patches for 5.7-rc1. 2020-04-03 13:12:26 -07:00
bridge net: bridge: Add checks for enabling the STP. 2020-04-27 11:40:25 -07:00
caif net: caif: Fix use correct return type for ndo_start_xmit() 2020-04-30 12:13:07 -07:00
can
ceph docs: networking: convert dns_resolver.txt to ReST 2020-04-28 14:39:46 -07:00
core docs: networking: convert pktgen.txt to ReST 2020-04-30 12:56:37 -07:00
dcb
dccp dccp: remove unused inline function dccp_set_seqno 2020-04-25 20:42:57 -07:00
decnet docs: networking: convert decnet.txt to ReST 2020-04-28 14:39:45 -07:00
dns_resolver docs: networking: convert dns_resolver.txt to ReST 2020-04-28 14:39:46 -07:00
dsa Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-04-25 20:18:53 -07:00
ethernet
ethtool drivers: Remove inclusion of vermagic header 2020-04-21 13:27:37 -07:00
hsr hsr: remove hsr interface if all slaves are removed 2020-04-30 13:25:18 -07:00
ieee802154
ife
ipv4 tcp: add hrtimer slack to sack compression 2020-04-30 13:24:01 -07:00
ipv6 ila: remove unused inline function ila_addr_is_ila 2020-04-29 12:01:31 -07:00
iucv
kcm
key
l2tp l2tp: Allow management of tunnels and session in user namespace 2020-04-08 14:30:46 -07:00
l3mdev
lapb docs: networking: convert lapb-module.txt to ReST 2020-04-30 12:56:35 -07:00
llc
mac80211 docs: networking: convert mac80211-injection.txt to ReST 2020-04-30 12:56:36 -07:00
mac802154
mpls
mptcp tcp: mptcp: use mptcp receive buffer space to select rcv window 2020-04-25 20:37:52 -07:00
ncsi
netfilter docs: networking: convert tproxy.txt to ReST 2020-04-30 12:56:38 -07:00
netlabel netlabel: Kconfig: Update reference for NetLabel Tools project 2020-04-22 19:55:01 -07:00
netlink netlink: add infrastructure to expose policies to userspace 2020-04-30 17:51:42 -07:00
netrom net: netrom: Fix potential nr_neigh refcnt leak in nr_add_node 2020-04-18 13:09:46 -07:00
nfc
nsh
openvswitch net: openvswitch: use div_u64() for 64-by-32 divisions 2020-04-25 20:48:21 -07:00
packet
phonet
psample
qrtr net: qrtr: Add tracepoint support 2020-04-22 12:55:54 -07:00
rds net/rds: Use ERR_PTR for rds_message_alloc_sgs() 2020-04-15 12:33:29 -07:00
rfkill
rose
rxrpc docs: networking: convert rxrpc.txt to ReST 2020-04-30 12:56:38 -07:00
sched netlink: remove type-unsafe validation_data pointer 2020-04-30 17:51:41 -07:00
sctp sctp: Fix SHUTDOWN CTSN Ack in the peer restart case 2020-04-22 19:27:40 -07:00
smc net/smc: remove obsolete link state DELETING 2020-04-30 12:44:34 -07:00
strparser
sunrpc svcrdma: Fix leak of svc_rdma_recv_ctxt objects 2020-04-17 12:40:38 -04:00
switchdev
tipc tipc: Fix potential tipc_node refcnt leak in tipc_rcv 2020-04-18 13:24:20 -07:00
tls net/tls: fix const assignment warning 2020-04-08 14:34:02 -07:00
unix
vmw_vsock
wimax
wireless netlink: remove NLA_EXACT_LEN_WARN 2020-04-30 17:51:42 -07:00
x25 net/x25: Fix x25_neigh refcnt leak when receiving frame 2020-04-23 15:39:39 -07:00
xdp xsk: Add missing check on user supplied headroom size 2020-04-15 13:07:18 +02:00
xfrm
compat.c
Kconfig docs: networking: convert pktgen.txt to ReST 2020-04-30 12:56:37 -07:00
Makefile
socket.c
sysctl_net.c