linux-stable/net
Sami Tolvanen 4f0f586bf0 treewide: Change list_sort to use const pointers
list_sort() internally casts the comparison function passed to it
to a different type with constant struct list_head pointers, and
uses this pointer to call the functions, which trips indirect call
Control-Flow Integrity (CFI) checking.

Instead of removing the consts, this change defines the
list_cmp_func_t type and changes the comparison function types of
all list_sort() callers to use const pointers, thus avoiding type
mismatches.

Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Kees Cook <keescook@chromium.org>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20210408182843.1754385-10-samitolvanen@google.com
2021-04-08 16:04:22 -07:00
..
6lowpan
9p
802
8021q
appletalk
atm
ax25
batman-adv module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
bluetooth
bpf
bpfilter
bridge net: bridge: don't notify switchdev for local FDB addresses 2021-03-23 14:39:41 -07:00
caif
can can: isotp: tx-path: zero initialize outgoing CAN frames 2021-03-20 20:21:35 +01:00
ceph
core net: check all name nodes in __dev_alloc_name 2021-03-18 14:40:53 -07:00
dcb
dccp ipv6: weaken the v4mapped source check 2021-03-18 11:19:23 -07:00
decnet
dns_resolver
dsa net: dsa: don't assign an error value to tag_ops 2021-03-22 17:24:42 -07:00
ethernet
ethtool
hsr
ieee802154
ife
ipv4 net: ipconfig: ic_dev can be NULL in ic_close_devs 2021-03-22 12:57:51 -07:00
ipv6 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf 2021-03-18 19:19:06 -07:00
iucv
kcm
key
l2tp
l3mdev
lapb
llc
mac80211 mac80211: choose first enabled channel for monitor 2021-03-16 21:20:47 +01:00
mac802154
mpls
mptcp ipv6: weaken the v4mapped source check 2021-03-18 11:19:23 -07:00
ncsi
netfilter netfilter: nftables: skip hook overlap logic if flowtable is stale 2021-03-18 01:08:54 +01:00
netlabel
netlink
netrom
nfc
nsh
openvswitch net/sched: act_api: fix miss set post_ct for ovs after do conntrack in act_ct 2021-03-16 15:22:18 -07:00
packet
phonet
psample
qrtr
rds
rfkill
rose
rxrpc
sched net/sched: act_ct: clear post_ct if doing ct_clear 2021-03-23 14:32:26 -07:00
sctp sctp: move sk_route_caps check and set into sctp_outq_flush_transports 2021-03-19 11:34:49 -07:00
smc
strparser
sunrpc
switchdev
tipc treewide: Change list_sort to use const pointers 2021-04-08 16:04:22 -07:00
tls
unix
vmw_vsock selinux: vsock: Set SID for socket returned by accept() 2021-03-19 13:46:55 -07:00
wireless wireless/nl80211: fix wdev_id may be used uninitialized 2021-03-16 21:20:47 +01:00
x25
xdp
xfrm
compat.c
devres.c
Kconfig
Makefile
socket.c
sysctl_net.c