• Geert Uytterhoeven's avatar
    m68k/uaccess: Fix asm constraints for userspace access · 31e29b7b
    Geert Uytterhoeven authored
    commit 631d8b674f5f8235e9cb7e628b0fe9e5200e3158 upstream.
    
    When compiling a MMU kernel with CPU_HAS_ADDRESS_SPACES=n (e.g. "MMU=y
    allnoconfig": "echo CONFIG_MMU=y > allno.config && make KCONFIG_ALLCONFIG=1
    allnoconfig"), we use plain "move" instead of "moves", and I got:
    
      CC      arch/m68k/lib/uaccess.o
    {standard input}: Assembler messages:
    {standard input}:47: Error: operands mismatch -- statement `move.b %a0,(%a1)' ignored
    
    This happens because plain "move" doesn't support byte transfers between
    memory and address registers, while "moves" does.
    
    Fix the asm constraints for __generic_copy_from_user(),
    __generic_copy_to_user(), and __clear_user() to only use data registers
    when accessing userspace.
    
    Also, relax the asm constraints for 16-bit userspace accesses in
    __put_user() and __get_user(), as both "move" and "moves" do support
    such transfers between memory and address registers.
    Signed-off-by: 's avatarGeert Uytterhoeven <geert@linux-m68k.org>
    Cc: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    31e29b7b
Name
Last commit
Last update
Documentation Loading commit data...
arch Loading commit data...
block Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt/kvm Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...
REPORTING-BUGS Loading commit data...