x86/uaccess: Move copy_user_handle_tail() into asm
authorPeter Zijlstra <peterz@infradead.org>
Fri, 1 Mar 2019 14:24:33 +0000 (15:24 +0100)
committerIngo Molnar <mingo@kernel.org>
Wed, 3 Apr 2019 07:36:29 +0000 (09:36 +0200)
commit3693ca81151eacd498675baae56abede577e8b31
tree3a5a28311c024636af112d9d89dcdcb723ea960b
parent8f4faed01e3015955801c8ef066ec7fd7a8b3902
x86/uaccess: Move copy_user_handle_tail() into asm

By writing the function in asm we avoid cross object code flow and
objtool no longer gets confused about a 'stray' CLAC.

Also; the asm version is actually _simpler_.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/asm.h
arch/x86/include/asm/uaccess_64.h
arch/x86/lib/copy_user_64.S
arch/x86/lib/usercopy_64.c