]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
x86/um: Drop gate area handling
authorThomas Weißschuh <linux@weissschuh.net>
Tue, 28 Oct 2025 09:15:40 +0000 (10:15 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 6 Nov 2025 12:02:33 +0000 (13:02 +0100)
With the removal of the vDSO passthrough from the host,
FIXADDR_USER_START is always 0 and the gate area setup code is dead.

Remove it.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20251028-uml-remove-32bit-pseudo-vdso-v1-5-e930063eff5f@weissschuh.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
arch/um/include/asm/page.h
arch/x86/um/Makefile
arch/x86/um/mem_32.c [deleted file]

index 6f54254aaf443d0420bc02e6e67e3285ce99c68e..2d363460d89604cc382277a6f34c12dd55d6c6fb 100644 (file)
@@ -96,8 +96,4 @@ extern unsigned long uml_physmem;
 
 #endif /* __ASSEMBLER__ */
 
-#ifdef CONFIG_X86_32
-#define __HAVE_ARCH_GATE_AREA 1
-#endif
-
 #endif /* __UM_PAGE_H */
index 1767e6061b4d44a6ccc920ea08bbea1502397f1c..f9ea75bf43aca3cc8701662e7cbea6c31ea05f7c 100644 (file)
@@ -13,7 +13,7 @@ obj-y = bugs_$(BITS).o delay.o fault.o \
        ptrace.o ptrace_$(BITS).o ptrace_user.o setjmp_$(BITS).o signal.o \
        stub_segv.o \
        sys_call_table_$(BITS).o sysrq_$(BITS).o tls_$(BITS).o \
-       mem_$(BITS).o subarch.o os-Linux/
+       subarch.o os-Linux/
 
 ifeq ($(CONFIG_X86_32),y)
 
@@ -26,7 +26,7 @@ subarch-y += ../kernel/sys_ia32.o
 
 else
 
-obj-y += syscalls_64.o vdso/
+obj-y += mem_64.o syscalls_64.o vdso/
 
 subarch-y = ../lib/csum-partial_64.o ../lib/memcpy_64.o \
        ../lib/memmove_64.o ../lib/memset_64.o
diff --git a/arch/x86/um/mem_32.c b/arch/x86/um/mem_32.c
deleted file mode 100644 (file)
index 29b2203..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * Copyright (C) 2011 Richard Weinberger <richrd@nod.at>
- */
-
-#include <linux/mm.h>
-#include <asm/elf.h>
-
-static struct vm_area_struct gate_vma;
-
-static int __init gate_vma_init(void)
-{
-       if (!FIXADDR_USER_START)
-               return 0;
-
-       vma_init(&gate_vma, NULL);
-       gate_vma.vm_start = FIXADDR_USER_START;
-       gate_vma.vm_end = FIXADDR_USER_END;
-       vm_flags_init(&gate_vma, VM_READ | VM_MAYREAD | VM_EXEC | VM_MAYEXEC);
-       gate_vma.vm_page_prot = PAGE_READONLY;
-
-       return 0;
-}
-__initcall(gate_vma_init);
-
-struct vm_area_struct *get_gate_vma(struct mm_struct *mm)
-{
-       return FIXADDR_USER_START ? &gate_vma : NULL;
-}
-
-int in_gate_area_no_mm(unsigned long addr)
-{
-       if (!FIXADDR_USER_START)
-               return 0;
-
-       if ((addr >= FIXADDR_USER_START) && (addr < FIXADDR_USER_END))
-               return 1;
-
-       return 0;
-}
-
-int in_gate_area(struct mm_struct *mm, unsigned long addr)
-{
-       struct vm_area_struct *vma = get_gate_vma(mm);
-
-       if (!vma)
-               return 0;
-
-       return (addr >= vma->vm_start) && (addr < vma->vm_end);
-}