aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/um/shared/sysdep
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
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')
-rw-r--r--arch/x86/um/shared/sysdep/stub.h1
-rw-r--r--arch/x86/um/shared/sysdep/stub_32.h24
-rw-r--r--arch/x86/um/shared/sysdep/stub_64.h26
3 files changed, 0 insertions, 51 deletions
diff --git a/arch/x86/um/shared/sysdep/stub.h b/arch/x86/um/shared/sysdep/stub.h
index 579681d12158..dc89f4423454 100644
--- a/arch/x86/um/shared/sysdep/stub.h
+++ b/arch/x86/um/shared/sysdep/stub.h
@@ -13,4 +13,3 @@
extern void stub_segv_handler(int, siginfo_t *, void *);
extern void stub_syscall_handler(void);
-extern void stub_clone_handler(void);
diff --git a/arch/x86/um/shared/sysdep/stub_32.h b/arch/x86/um/shared/sysdep/stub_32.h
index ab08a69fb57f..0b44a86dd346 100644
--- a/arch/x86/um/shared/sysdep/stub_32.h
+++ b/arch/x86/um/shared/sysdep/stub_32.h
@@ -107,30 +107,6 @@ static __always_inline void trap_myself(void)
__asm("int3");
}
-static __always_inline void remap_stack_and_trap(void)
-{
- __asm__ volatile (
- "movl %%esp,%%ebx ;"
- "andl %0,%%ebx ;"
- "movl %1,%%eax ;"
- "movl %%ebx,%%edi ; addl %2,%%edi ; movl (%%edi),%%edi ;"
- "movl %%ebx,%%ebp ; addl %3,%%ebp ; movl (%%ebp),%%ebp ;"
- "int $0x80 ;"
- "addl %4,%%ebx ; movl %%eax, (%%ebx) ;"
- "int $3"
- : :
- "g" (~(STUB_DATA_PAGES * UM_KERN_PAGE_SIZE - 1)),
- "g" (STUB_MMAP_NR),
- "g" (offsetof(struct stub_data, fd)),
- "g" (offsetof(struct stub_data, offset)),
- "g" (offsetof(struct stub_data, child_err)),
- "c" (STUB_DATA_PAGES * UM_KERN_PAGE_SIZE),
- "d" (PROT_READ | PROT_WRITE),
- "S" (MAP_FIXED | MAP_SHARED)
- :
- "memory");
-}
-
static __always_inline void *get_stub_data(void)
{
unsigned long ret;
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;