linux/arch/parisc
Helge Deller dbd0b42350 parisc: Fix some apparent put_user() failures
After commit 4b9d2a731c ("parisc: Switch user access functions
to signal errors in r29 instead of r8") bash suddenly started
to report those warnings after login:

-bash: cannot set terminal process group (-1): Bad file descriptor
-bash: no job control in this shell

It turned out, that a function call inside a put_user(), e.g.:
put_user(vt_do_kdgkbmode(console), (int __user *)arg);
clobbered the error register (r29) and thus the put_user() call itself
seem to have failed.

Rearrange the C-code to pre-calculate the intermediate value
and then do the put_user().
Additionally prefer the "+" constraint on pu_err and gu_err registers
to tell the compiler that those operands are both read and written by
the assembly instruction.

Reported-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>
Fixes: 4b9d2a731c ("parisc: Switch user access functions to signal errors in r29 instead of r8")
Signed-off-by: Helge Deller <deller@gmx.de>
2022-02-14 12:36:42 +01:00
..
boot Kbuild updates for v5.17 2022-01-19 11:15:19 +02:00
configs parisc: Enable sata sil, audit and usb support on 64-bit defconfig 2021-11-30 21:49:32 +01:00
include parisc: Fix some apparent put_user() failures 2022-02-14 12:36:42 +01:00
kernel parisc architecture fixes & enhancements for kernel v5.17-rc1 2022-01-22 09:37:31 +02:00
lib parisc: Add ioread64_lo_hi() and iowrite64_lo_hi() 2022-02-07 16:33:31 +01:00
math-emu parisc: math-emu: Fix fall-through warnings 2021-09-01 22:18:18 +02:00
mm parisc: Drop __init from map_pages declaration 2022-01-28 10:15:33 +01:00
defpalo.conf
install.sh parisc: Fix "make install" on newer debian releases 2021-12-04 21:36:04 +01:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig parisc: Default to 16 CPUs on 32-bit kernel 2022-01-11 11:57:38 +01:00
Kconfig.debug tracing: Refactor TRACE_IRQFLAGS_SUPPORT in Kconfig 2021-08-16 11:37:21 -04:00
Makefile parisc: Fix KBUILD_IMAGE for self-extracting kernel 2021-11-30 21:49:32 +01:00
nm