diff options
| author | Thomas Weißschuh <linux@weissschuh.net> | 2025-10-28 10:15:45 +0100 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2025-11-06 13:02:34 +0100 |
| commit | 293f71435d14f5b5c46fc3398695fa265c69363d (patch) | |
| tree | 82a4f0271058992f3afdc0d1402155acde1895d0 /arch/um | |
| parent | 117e796fc5bfe84f18eec7e8f3b4f4090f605322 (diff) | |
um: Always set up AT_HWCAP and AT_PLATFORM
Historically the code to set up AT_HWCAP and AT_PLATFORM was only built
for 32bit x86 as it was intermingled with the vDSO passthrough code.
Now that vDSO passthrough has been removed, always pass through AT_HWCAP
and AT_PLATFORM.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20251028-uml-remove-32bit-pseudo-vdso-v1-10-e930063eff5f@weissschuh.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'arch/um')
| -rw-r--r-- | arch/um/os-Linux/Makefile | 4 | ||||
| -rw-r--r-- | arch/um/os-Linux/elf_aux.c | 7 | ||||
| -rw-r--r-- | arch/um/os-Linux/main.c | 4 |
3 files changed, 7 insertions, 8 deletions
diff --git a/arch/um/os-Linux/Makefile b/arch/um/os-Linux/Makefile index 70c73c22f715..f8d672d570d9 100644 --- a/arch/um/os-Linux/Makefile +++ b/arch/um/os-Linux/Makefile @@ -6,7 +6,7 @@ # Don't instrument UML-specific code KCOV_INSTRUMENT := n -obj-y = execvp.o file.o helper.o irq.o main.o mem.o process.o \ +obj-y = elf_aux.o execvp.o file.o helper.o irq.o main.o mem.o process.o \ registers.o sigio.o signal.o start_up.o time.o tty.o \ umid.o user_syms.o util.o skas/ @@ -14,8 +14,6 @@ CFLAGS_signal.o += -Wframe-larger-than=4096 CFLAGS_main.o += -Wno-frame-larger-than -obj-$(CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA) += elf_aux.o - obj-$(CONFIG_SMP) += smp.o USER_OBJS := $(user-objs-y) elf_aux.o execvp.o file.o helper.o irq.o \ diff --git a/arch/um/os-Linux/elf_aux.c b/arch/um/os-Linux/elf_aux.c index f8927a5959d8..72f416edf252 100644 --- a/arch/um/os-Linux/elf_aux.c +++ b/arch/um/os-Linux/elf_aux.c @@ -14,12 +14,17 @@ #include <elf_user.h> #include <mem_user.h> #include "internal.h" +#include <linux/swab.h> +#if __BITS_PER_LONG == 64 +typedef Elf64_auxv_t elf_auxv_t; +#else typedef Elf32_auxv_t elf_auxv_t; +#endif /* These are initialized very early in boot and never changed */ char * elf_aux_platform; -extern long elf_aux_hwcap; +long elf_aux_hwcap; __init void scan_elf_aux( char **envp) { diff --git a/arch/um/os-Linux/main.c b/arch/um/os-Linux/main.c index 730723106228..7e114862a723 100644 --- a/arch/um/os-Linux/main.c +++ b/arch/um/os-Linux/main.c @@ -21,8 +21,6 @@ #define STACKSIZE (8 * 1024 * 1024) -long elf_aux_hwcap; - static void __init set_stklim(void) { struct rlimit lim; @@ -149,9 +147,7 @@ int __init main(int argc, char **argv, char **envp) install_fatal_handler(SIGINT); install_fatal_handler(SIGTERM); -#ifdef CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA scan_elf_aux(envp); -#endif change_sig(SIGPIPE, 0); ret = linux_main(argc, argv, envp); |
