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:
Peter Zijlstra 2021-11-10 11:01:21 +01:00
parent 5ce8e39f55
commit 13e4bf1bdd
1 changed files with 20 additions and 20 deletions

View File

@ -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");