mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 23:03:57 -04:00
treewide: Drop function_nocfi
With -fsanitize=kcfi, we no longer need function_nocfi() as the compiler won't change function references to point to a jump table. Remove all implementations and uses of the macro. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Reviewed-by: Kees Cook <keescook@chromium.org> Tested-by: Kees Cook <keescook@chromium.org> Tested-by: Nathan Chancellor <nathan@kernel.org> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20220908215504.3686827-14-samitolvanen@google.com
This commit is contained in:
@@ -330,7 +330,7 @@ static void lkdtm_USERCOPY_KERNEL(void)
|
||||
|
||||
pr_info("attempting bad copy_to_user from kernel text: %px\n",
|
||||
vm_mmap);
|
||||
if (copy_to_user((void __user *)user_addr, function_nocfi(vm_mmap),
|
||||
if (copy_to_user((void __user *)user_addr, vm_mmap,
|
||||
unconst + PAGE_SIZE)) {
|
||||
pr_warn("copy_to_user failed, but lacked Oops\n");
|
||||
goto free_user;
|
||||
|
||||
Reference in New Issue
Block a user