aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/um/shared/sysdep/stub_64.h
diff options
context:
space:
mode:
authorBenjamin Berg <benjamin.berg@intel.com>2024-07-03 15:45:31 +0200
committerJohannes Berg <johannes.berg@intel.com>2024-07-03 17:09:49 +0200
commita5d2cfe749e2917266956751262328da35e0925d (patch)
treec228ff494ebdd8b2210c46289a5025bce125661e /arch/x86/um/shared/sysdep/stub_64.h
parentum: remove LDT support (diff)
downloadlinux-a5d2cfe749e2917266956751262328da35e0925d.tar.gz
linux-a5d2cfe749e2917266956751262328da35e0925d.zip
um: remove copy_context_skas0
The kernel flushes the memory ranges anyway for CoW and does not assume that the userspace process has anything set up already. So, start with a fresh process for the new mm context. Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Link: https://patch.msgid.link/20240703134536.1161108-8-benjamin@sipsolutions.net Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'arch/x86/um/shared/sysdep/stub_64.h')
-rw-r--r--arch/x86/um/shared/sysdep/stub_64.h26
1 files changed, 0 insertions, 26 deletions
diff --git a/arch/x86/um/shared/sysdep/stub_64.h b/arch/x86/um/shared/sysdep/stub_64.h
index d27b34d75d70..67f44284f1aa 100644
--- a/arch/x86/um/shared/sysdep/stub_64.h
+++ b/arch/x86/um/shared/sysdep/stub_64.h
@@ -101,32 +101,6 @@ static __always_inline void trap_myself(void)
__asm("int3");
}
-static __always_inline void remap_stack_and_trap(void)
-{
- __asm__ volatile (
- "movq %0,%%rax ;"
- "movq %%rsp,%%rdi ;"
- "andq %1,%%rdi ;"
- "movq %2,%%r10 ;"
- "movq %%rdi,%%r8 ; addq %3,%%r8 ; movq (%%r8),%%r8 ;"
- "movq %%rdi,%%r9 ; addq %4,%%r9 ; movq (%%r9),%%r9 ;"
- __syscall ";"
- "movq %%rsp,%%rdi ; andq %1,%%rdi ;"
- "addq %5,%%rdi ; movq %%rax, (%%rdi) ;"
- "int3"
- : :
- "g" (STUB_MMAP_NR),
- "g" (~(STUB_DATA_PAGES * UM_KERN_PAGE_SIZE - 1)),
- "g" (MAP_FIXED | MAP_SHARED),
- "g" (offsetof(struct stub_data, fd)),
- "g" (offsetof(struct stub_data, offset)),
- "g" (offsetof(struct stub_data, child_err)),
- "S" (STUB_DATA_PAGES * UM_KERN_PAGE_SIZE),
- "d" (PROT_READ | PROT_WRITE)
- :
- __syscall_clobber, "r10", "r8", "r9");
-}
-
static __always_inline void *get_stub_data(void)
{
unsigned long ret;