linux/net
Kui-Feng Lee 187e2af05a bpf: struct_ops supports more than one page for trampolines.
The BPF struct_ops previously only allowed one page of trampolines.
Each function pointer of a struct_ops is implemented by a struct_ops
bpf program. Each struct_ops bpf program requires a trampoline.
The following selftest patch shows each page can hold a little more
than 20 trampolines.

While one page is more than enough for the tcp-cc usecase,
the sched_ext use case shows that one page is not always enough and hits
the one page limit. This patch overcomes the one page limit by allocating
another page when needed and it is limited to a total of
MAX_IMAGE_PAGES (8) pages which is more than enough for
reasonable usages.

The variable st_map->image has been changed to st_map->image_pages, and
its type has been changed to an array of pointers to pages.

Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
Link: https://lore.kernel.org/r/20240224223418.526631-3-thinker.li@gmail.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
2024-03-04 14:09:20 -08:00
..
6lowpan
9p
802
8021q rtnetlink: prepare nla_put_iflink() to run under RCU 2024-02-26 11:46:12 +00:00
appletalk
atm
ax25
batman-adv
bluetooth Bluetooth: Enforce validation on max value of connection interval 2024-02-28 09:44:11 -05:00
bpf bpf: struct_ops supports more than one page for trampolines. 2024-03-04 14:09:20 -08:00
bridge Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-29 14:24:56 -08:00
caif
can linux-can-next-for-6.9-20240220 2024-02-20 15:32:45 +01:00
ceph
core bpf-next-for-netdev 2024-03-02 20:50:59 -08:00
dcb
dccp
devlink devlink: fix port dump cmd type 2024-02-21 17:11:04 -08:00
dns_resolver
dsa rtnetlink: prepare nla_put_iflink() to run under RCU 2024-02-26 11:46:12 +00:00
ethernet
ethtool net: ethtool: eee: Remove legacy _u32 from keee 2024-02-28 12:18:05 +00:00
handshake
hsr Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-29 14:24:56 -08:00
ieee802154 rtnetlink: prepare nla_put_iflink() to run under RCU 2024-02-26 11:46:12 +00:00
ife
ipv4 bpf, net: validate struct_ops when updating value. 2024-03-04 10:03:57 -08:00
ipv6 ipv6: use xa_array iterator to implement inet6_netconf_dump_devconf() 2024-03-01 08:42:33 +00:00
iucv net/af_iucv: fix virtual vs physical address confusion 2024-02-22 18:28:13 -08:00
kcm net: kcm: Simplify the allocation of slab caches 2024-02-21 11:28:57 +00:00
key
l2tp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-22 15:29:26 -08:00
l3mdev
lapb
llc
mac80211 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-29 14:24:56 -08:00
mac802154
mctp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-29 14:24:56 -08:00
mpls inet: allow ip_valid_fib_dump_req() to be called with RTNL or RCU 2024-02-26 11:46:12 +00:00
mptcp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-29 14:24:56 -08:00
ncsi
netfilter bpf-next-for-netdev 2024-03-02 20:50:59 -08:00
netlabel netlabel: remove impossible return value in netlbl_bitmap_walk 2024-02-28 19:37:34 -08:00
netlink Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-29 14:24:56 -08:00
netrom
nfc
nsh
openvswitch
packet
phonet phonet/pep: fix racy skb_queue_empty() use 2024-02-22 09:05:50 +01:00
psample
qrtr
rds
rfkill
rose
rxrpc
sched Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-22 15:29:26 -08:00
sctp
smc
strparser
sunrpc
switchdev net: bridge: switchdev: Skip MDB replays of deferred events on offload 2024-02-16 09:36:37 +00:00
tipc
tls tls: fix use-after-free on failed backlog decryption 2024-02-29 09:07:16 -08:00
unix Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-22 15:29:26 -08:00
vmw_vsock
wireless Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-29 14:24:56 -08:00
x25
xdp bpf-next-for-netdev 2024-03-02 20:50:59 -08:00
xfrm bpf-next-for-netdev 2024-03-02 20:50:59 -08:00
compat.c
devres.c
Kconfig net: bql: allow the config to be disabled 2024-02-18 10:19:21 +00:00
Kconfig.debug
Makefile
socket.c net: remove SLAB_MEM_SPREAD flag usage 2024-02-28 19:29:46 -08:00
sysctl_net.c