diff options
| author | Sami Tolvanen <[email protected]> | 2021-04-08 11:28:34 -0700 |
|---|---|---|
| committer | Kees Cook <[email protected]> | 2021-04-08 16:04:22 -0700 |
| commit | 4f0f586bf0c898233d8f316f471a21db2abd522d (patch) | |
| tree | 3b3ec78051f5a5d2b96f834347355b1b306026ea /tools/perf/scripts/python/mem-phys-addr.py | |
| parent | 9f5b4009980f369acb80b72235b2d66c3fd6eca6 (diff) | |
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 <[email protected]>
Signed-off-by: Sami Tolvanen <[email protected]>
Reviewed-by: Nick Desaulniers <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Tested-by: Nick Desaulniers <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Kees Cook <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions