linux-stable/fs/xfs/scrub
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
..
agheader.c xfs: support inode btree blockcounts in online scrub 2020-09-15 20:52:40 -07:00
agheader_repair.c xfs: remove unneeded return value check for *init_cursor() 2020-12-09 09:49:38 -08:00
alloc.c xfs: convert btree cursor ag-private member name 2020-03-13 10:37:14 -07:00
attr.c xfs: mark extended attr corrupt when lookup-by-hash fails 2020-03-12 07:58:13 -07:00
attr.h xfs: only allocate memory for scrubbing attributes when we need it 2019-07-05 10:29:56 -07:00
bitmap.c treewide: Change list_sort to use const pointers 2021-04-08 16:04:22 -07:00
bitmap.h xfs: replace open-coded bitmap weight logic 2020-03-18 08:12:23 -07:00
bmap.c xfs: remove unneeded return value check for *init_cursor() 2020-12-09 09:49:38 -08:00
btree.c xfs: fix the minrecs logic when dealing with inode root child blocks 2020-11-18 09:23:50 -08:00
btree.h xfs: const-ify xfs_owner_info arguments 2018-12-12 08:47:16 -08:00
common.c xfs: rename block gc start and stop functions 2021-02-03 09:18:50 -08:00
common.h xfs: periodically yield scrub threads to the scheduler 2019-11-07 13:00:53 -08:00
dabtree.c xfs: check dabtree node hash values when loading child blocks 2020-09-23 08:58:51 -07:00
dabtree.h xfs: refactor btree node scrubbing 2019-11-10 16:54:19 -08:00
dir.c xfs: scrub should mark a directory corrupt if any entries cannot be iget'd 2020-12-09 09:49:38 -08:00
fscounters.c xfs: remove unnecessary null pointer checks from _read_agf callers 2020-01-26 14:32:27 -08:00
health.c xfs: fix missing header includes 2019-11-07 13:00:53 -08:00
health.h xfs: scrub should only cross-reference with healthy btrees 2019-04-16 10:01:57 -07:00
ialloc.c xfs: remove unused iget_flags param from xfs_imap_to_bp() 2020-05-07 08:27:49 -07:00
inode.c xfs: don't catch dax+reflink inodes as corruption in verifier 2020-12-09 09:49:38 -08:00
parent.c xfs: fix parent pointer scrubber bailing out on unallocated inodes 2020-12-09 09:49:38 -08:00
quota.c xfs: create xfs_dqtype_t to represent quota types 2020-07-28 20:24:14 -07:00
refcount.c xfs: fix brainos in the refcount scrubber's rmap fragment processor 2020-11-10 16:48:03 -08:00
repair.c xfs: create xfs_dqtype_t to represent quota types 2020-07-28 20:24:14 -07:00
repair.h xfs: create xfs_dqtype_t to represent quota types 2020-07-28 20:24:14 -07:00
rmap.c xfs: convert btree cursor ag-private member name 2020-03-13 10:37:14 -07:00
rtbitmap.c xfs: refactor realtime volume extent validation 2020-12-09 09:49:38 -08:00
scrub.c xfs: prohibit fs freezing when using empty transactions 2020-03-26 08:19:24 -07:00
scrub.h xfs: add online scrub for superblock counters 2019-04-30 08:19:13 -07:00
symlink.c xfs: Remove kmem_zalloc_large() 2020-09-15 20:52:41 -07:00
trace.c xfs: convert btree cursor inode-private member names 2020-03-13 10:37:14 -07:00
trace.h xfs: convert btree cursor inode-private member names 2020-03-13 10:37:14 -07:00
xfs_scrub.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00