linux/net/tipc
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
..
addr.c tipc: make node number calculation reproducible 2020-11-27 17:34:01 -08:00
addr.h tipc: make node number calculation reproducible 2020-11-27 17:34:01 -08:00
bcast.c tipc: fix incorrect setting window for bcast link 2020-10-16 14:09:12 -07:00
bcast.h tipc: update a binding service via broadcast 2020-06-17 08:53:34 -07:00
bearer.c net/tipc: fix all function Return: notation 2020-12-01 15:38:17 -08:00
bearer.h net/tipc: fix tipc header files for kernel-doc 2020-12-01 15:37:41 -08:00
core.c tipc: remove dead code in tipc_net and relatives 2020-10-30 13:11:47 -07:00
core.h tipc: make node number calculation reproducible 2020-11-27 17:34:01 -08:00
crypto.c net/tipc: fix all function Return: notation 2020-12-01 15:38:17 -08:00
crypto.h net/tipc: fix tipc header files for kernel-doc 2020-12-01 15:37:41 -08:00
diag.c tipc: switch to rhashtable iterator 2018-08-29 18:04:54 -07:00
discover.c net/tipc: fix all function Return: notation 2020-12-01 15:38:17 -08:00
discover.h tipc: some cleanups in the file discover.c 2018-03-23 13:12:17 -04:00
eth_media.c tipc: Use is_broadcast_ether_addr() instead of memcmp() 2020-08-03 16:21:46 -07:00
group.c tipc: update address terminology in code 2020-11-27 17:34:01 -08:00
group.h tipc: update address terminology in code 2020-11-27 17:34:01 -08:00
ib_media.c tipc: introduce variable window congestion control 2019-12-10 17:31:15 -08:00
Kconfig tipc: not enable tipc when ipv6 works as a module 2020-08-16 21:04:55 -07:00
link.c net: tip: fix a couple kernel-doc markups 2021-01-14 10:30:24 -08:00
link.h tipc: add support for broadcast rcv stats dumping 2020-05-26 15:16:52 -07:00
Makefile tipc: remove meaningless assignment in Makefile 2020-01-08 12:38:54 -08:00
monitor.c net: tipc: Replace expression with offsetof() 2021-01-05 15:43:41 -08:00
monitor.h tipc: update mon's self addr when node addr generated 2019-11-12 19:45:45 -08:00
msg.c tipc: remove duplicated code in tipc_msg_create 2021-01-27 18:50:07 -08:00
msg.h tipc: add automatic session key exchange 2020-09-18 13:58:37 -07:00
name_distr.c net/tipc: fix all function Return: notation 2020-12-01 15:38:17 -08:00
name_distr.h net/tipc: fix tipc header files for kernel-doc 2020-12-01 15:37:41 -08:00
name_table.c treewide: Change list_sort to use const pointers 2021-04-08 16:04:22 -07:00
name_table.h net/tipc: fix tipc header files for kernel-doc 2020-12-01 15:37:41 -08:00
net.c tipc: update address terminology in code 2020-11-27 17:34:01 -08:00
net.h tipc: fix a deadlock when flushing scheduled work 2020-09-07 12:08:53 -07:00
netlink_compat.c tipc: do sanity check payload of a netlink message 2020-12-16 12:45:02 -08:00
netlink.c tipc: add automatic rekeying for encryption key 2020-09-18 13:58:37 -07:00
netlink.h net: tipc: allocate attrs locally instead of using genl_family_attrbuf in compat_dumpit() 2019-10-06 15:44:47 +02:00
node.c tipc: better validate user input in tipc_nl_retrieve_key() 2021-03-15 13:21:18 -07:00
node.h tipc: add automatic session key exchange 2020-09-18 13:58:37 -07:00
socket.c net/tipc: fix all function Return: notation 2020-12-01 15:38:17 -08:00
socket.h tipc: add stricter control of reserved service types 2020-10-30 08:19:18 -07:00
subscr.c net/tipc: fix all function Return: notation 2020-12-01 15:38:17 -08:00
subscr.h net/tipc: fix tipc header files for kernel-doc 2020-12-01 15:37:41 -08:00
sysctl.c tipc: add automatic session key exchange 2020-09-18 13:58:37 -07:00
topsrv.c tipc: update address terminology in code 2020-11-27 17:34:01 -08:00
topsrv.h tipc: rename tipc_server to tipc_topsrv 2018-02-16 15:26:34 -05:00
trace.c net/tipc: fix various kernel-doc warnings 2020-12-01 15:37:46 -08:00
trace.h tipc: add support for broadcast rcv stats dumping 2020-05-26 15:16:52 -07:00
udp_media.c net/tipc: fix various kernel-doc warnings 2020-12-01 15:37:46 -08:00
udp_media.h tipc: implement configuration of UDP media MTU 2018-04-20 11:04:05 -04:00