Re: [PATCH v3 09/17] treewide: Change list_sort to use const pointers

2021-03-25 Thread Kees Cook
On Tue, Mar 23, 2021 at 01:39:38PM -0700, Sami Tolvanen wrote: > 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) c

Re: [PATCH v3 09/17] treewide: Change list_sort to use const pointers

2021-03-24 Thread Christoph Hellwig
On Tue, Mar 23, 2021 at 01:39:38PM -0700, Sami Tolvanen wrote: > 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) c

Re: [PATCH v3 09/17] treewide: Change list_sort to use const pointers

2021-03-23 Thread Nick Desaulniers
On Tue, Mar 23, 2021 at 1:40 PM Sami Tolvanen wrote: > > 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

[PATCH v3 09/17] treewide: Change list_sort to use const pointers

2021-03-23 Thread Sami Tolvanen
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_