mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-29 05:55:02 +08:00
4f0f586bf0
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 |
||
---|---|---|
.. | ||
bcm-voter.c | ||
bcm-voter.h | ||
icc-rpm.c | ||
icc-rpm.h | ||
icc-rpmh.c | ||
icc-rpmh.h | ||
Kconfig | ||
Makefile | ||
msm8916.c | ||
msm8939.c | ||
msm8974.c | ||
osm-l3.c | ||
qcs404.c | ||
sc7180.c | ||
sc7180.h | ||
sdm845.c | ||
sdm845.h | ||
sdx55.c | ||
sdx55.h | ||
sm8150.c | ||
sm8150.h | ||
sm8250.c | ||
sm8250.h | ||
smd-rpm.c | ||
smd-rpm.h |