]> git.ipfire.org Git - thirdparty/linux.git/commit
um: make stub_exe _start() pure inline asm
authorJohannes Berg <johannes.berg@intel.com>
Tue, 22 Oct 2024 12:02:38 +0000 (14:02 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 23 Oct 2024 07:04:59 +0000 (09:04 +0200)
commit14d4a7b516e993cf3926758a7ede569d8e119855
tree73944a9852888a5207123438899c8aa684d39a0b
parent8508a5e0e9db3932ca43651f86ba1042a1e9f4ca
um: make stub_exe _start() pure inline asm

Since __attribute__((naked)) cannot be used with functions
containing C statements, just generate the few instructions
it needs in assembly directly.

While at it, fix the stack usage ("1 + 2*x - 1" is odd) and
document what it must do, and why it must adjust the stack.

Fixes: 8508a5e0e9db ("um: Fix misaligned stack in stub_exe")
Link: https://lore.kernel.org/linux-um/CABVgOSntH-uoOFMP5HwMXjx_f1osMnVdhgKRKm4uz6DFm2Lb8Q@mail.gmail.com/
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
arch/um/kernel/skas/stub_exe.c
arch/x86/um/shared/sysdep/stub_32.h
arch/x86/um/shared/sysdep/stub_64.h