linux/arch
Linus Torvalds 4a789213c9 x86 uaccess: Introduce __put_user_goto
This is finally the actual reason for the odd error handling in the
"unsafe_get/put_user()" functions, introduced over three years ago.

Using a "jump to error label" interface is somewhat odd, but very
convenient as a programming interface, and more importantly, it fits
very well with simply making the target be the exception handler address
directly from the inline asm.

The reason it took over three years to actually do this? We need "asm
goto" support for it, which only became the default on x86 last year.
It's now been a year that we've forced asm goto support (see commit
e501ce957a "x86: Force asm-goto"), and so let's just do it here too.

[ Side note: this commit was originally done back in 2016. The above
  commentary about timing is obviously about it only now getting merged
  into my real upstream tree     - Linus ]

Sadly, gcc still only supports "asm goto" with asms that do not have any
outputs, so we are limited to only the put_user case for this.  Maybe in
several more years we can do the get_user case too.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-01-04 18:00:49 -08:00
..
alpha Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
arc Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
arm Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
arm64 Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
c6x Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
csky Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
h8300 Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
hexagon Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
ia64 Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
m68k Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
microblaze Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
mips Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
nds32 Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
nios2 Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
openrisc Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
parisc Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
powerpc Fix access_ok() fallout for sparc32 and powerpc 2019-01-04 09:58:25 -08:00
riscv Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
s390 Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
sh Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
sparc Fix access_ok() fallout for sparc32 and powerpc 2019-01-04 09:58:25 -08:00
um Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
unicore32 Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
x86 x86 uaccess: Introduce __put_user_goto 2019-01-04 18:00:49 -08:00
xtensa Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
.gitignore
Kconfig