]> git.baikalelectronics.ru Git - kernel.git/commit
um: rework userspace stubs to not hard-code stub location
authorJohannes Berg <johannes.berg@intel.com>
Wed, 13 Jan 2021 21:09:43 +0000 (22:09 +0100)
committerRichard Weinberger <richard@nod.at>
Fri, 12 Feb 2021 20:35:02 +0000 (21:35 +0100)
commit9ff5aacb57cfb5e07eff1c776d0529d52a7eb134
tree2fa591a8256cc5a56423323f40b0c87edf9199de
parent874537f0f7352efadfacad854e18d3d02809d464
um: rework userspace stubs to not hard-code stub location

The userspace stacks mostly have a stack (and in the case of the
syscall stub we can just set their stack pointer) that points to
the location of the stub data page already.

Rework the stubs to use the stack pointer to derive the start of
the data page, rather than requiring it to be hard-coded.

In the clone stub, also integrate the int3 into the stack remap,
since we really must not use the stack while we remap it.

This prepares for putting the stub at a variable location that's
not part of the normal address space of the userspace processes
running inside the UML machine.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/include/shared/as-layout.h
arch/um/include/shared/common-offsets.h
arch/um/kernel/skas/clone.c
arch/um/os-Linux/skas/mem.c
arch/x86/um/shared/sysdep/stub_32.h
arch/x86/um/shared/sysdep/stub_64.h
arch/x86/um/stub_32.S
arch/x86/um/stub_64.S
arch/x86/um/stub_segv.c