mirror_ubuntu-kernels/drivers/pci/controller/cadence
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
..
Kconfig PCI: j721e: Add TI J721E PCIe driver 2020-08-03 14:49:55 +01:00
Makefile PCI: j721e: Add TI J721E PCIe driver 2020-08-03 14:49:55 +01:00
pci-j721e.c PCI: cadence: Retrain Link to work around Gen2 training defect 2021-02-10 12:48:45 +00:00
pcie-cadence-ep.c PCI: cadence: Configure LM_EP_FUNC_CFG based on epc->function_num_map 2021-02-23 14:12:18 -06:00
pcie-cadence-host.c treewide: Change list_sort to use const pointers 2021-04-08 16:04:22 -07:00
pcie-cadence-plat.c Merge branch 'remotes/lorenzo/pci/runtime-pm' 2020-08-05 18:24:20 -05:00
pcie-cadence.c Merge branch 'pci/host-probe-refactor' 2020-08-05 18:24:21 -05:00
pcie-cadence.h PCI: cadence: Retrain Link to work around Gen2 training defect 2021-02-10 12:48:45 +00:00