OrangePi_CM5/drivers/gpu/drm/i915/gvt
Sami Tolvanen 55e6f8b3c0 treewide: Change list_sort to use const pointers
[ Upstream commit 4f0f586bf0c898233d8f316f471a21db2abd522d ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-30 10:11:04 +02:00
..
Makefile
…
aperture_gm.c
…
cfg_space.c
…
cmd_parser.c
…
cmd_parser.h
…
debug.h
…
debugfs.c
…
display.c
…
display.h
…
dmabuf.c
…
dmabuf.h
…
edid.c
…
edid.h
…
execlist.c
…
execlist.h
…
fb_decoder.c
…
fb_decoder.h
…
firmware.c
…
gtt.c
…
gtt.h
…
gvt.c
…
gvt.h
…
handlers.c
…
hypercall.h
…
interrupt.c
…
interrupt.h
…
kvmgt.c
…
mmio.c
…
mmio.h
…
mmio_context.c
…
mmio_context.h
…
mpt.h
…
opregion.c
…
page_track.c
…
page_track.h
…
reg.h
…
sched_policy.c
…
sched_policy.h
…
scheduler.c
…
scheduler.h
…
trace.h
…
trace_points.c
…
vgpu.c
…