x86/usercopy_32: Simplify __copy_user_intel_nocache()
Have an exception jump to a .fixup to only immediately jump out is daft, jump to the right place in one go. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/r/20211110101326.021517780@infradead.org
This commit is contained in:
parent
5ce8e39f55
commit
13e4bf1bdd
|
@ -256,28 +256,28 @@ static unsigned long __copy_user_intel_nocache(void *to,
|
|||
"8:\n"
|
||||
".section .fixup,\"ax\"\n"
|
||||
"9: lea 0(%%eax,%0,4),%0\n"
|
||||
"16: jmp 8b\n"
|
||||
" jmp 8b\n"
|
||||
".previous\n"
|
||||
_ASM_EXTABLE_UA(0b, 16b)
|
||||
_ASM_EXTABLE_UA(1b, 16b)
|
||||
_ASM_EXTABLE_UA(2b, 16b)
|
||||
_ASM_EXTABLE_UA(21b, 16b)
|
||||
_ASM_EXTABLE_UA(3b, 16b)
|
||||
_ASM_EXTABLE_UA(31b, 16b)
|
||||
_ASM_EXTABLE_UA(4b, 16b)
|
||||
_ASM_EXTABLE_UA(41b, 16b)
|
||||
_ASM_EXTABLE_UA(10b, 16b)
|
||||
_ASM_EXTABLE_UA(51b, 16b)
|
||||
_ASM_EXTABLE_UA(11b, 16b)
|
||||
_ASM_EXTABLE_UA(61b, 16b)
|
||||
_ASM_EXTABLE_UA(12b, 16b)
|
||||
_ASM_EXTABLE_UA(71b, 16b)
|
||||
_ASM_EXTABLE_UA(13b, 16b)
|
||||
_ASM_EXTABLE_UA(81b, 16b)
|
||||
_ASM_EXTABLE_UA(14b, 16b)
|
||||
_ASM_EXTABLE_UA(91b, 16b)
|
||||
_ASM_EXTABLE_UA(0b, 8b)
|
||||
_ASM_EXTABLE_UA(1b, 8b)
|
||||
_ASM_EXTABLE_UA(2b, 8b)
|
||||
_ASM_EXTABLE_UA(21b, 8b)
|
||||
_ASM_EXTABLE_UA(3b, 8b)
|
||||
_ASM_EXTABLE_UA(31b, 8b)
|
||||
_ASM_EXTABLE_UA(4b, 8b)
|
||||
_ASM_EXTABLE_UA(41b, 8b)
|
||||
_ASM_EXTABLE_UA(10b, 8b)
|
||||
_ASM_EXTABLE_UA(51b, 8b)
|
||||
_ASM_EXTABLE_UA(11b, 8b)
|
||||
_ASM_EXTABLE_UA(61b, 8b)
|
||||
_ASM_EXTABLE_UA(12b, 8b)
|
||||
_ASM_EXTABLE_UA(71b, 8b)
|
||||
_ASM_EXTABLE_UA(13b, 8b)
|
||||
_ASM_EXTABLE_UA(81b, 8b)
|
||||
_ASM_EXTABLE_UA(14b, 8b)
|
||||
_ASM_EXTABLE_UA(91b, 8b)
|
||||
_ASM_EXTABLE_UA(6b, 9b)
|
||||
_ASM_EXTABLE_UA(7b, 16b)
|
||||
_ASM_EXTABLE_UA(7b, 8b)
|
||||
: "=&c"(size), "=&D" (d0), "=&S" (d1)
|
||||
: "1"(to), "2"(from), "0"(size)
|
||||
: "eax", "edx", "memory");
|
||||
|
|
Loading…
Reference in New Issue