summaryrefslogtreecommitdiff
path: root/target/linux/patches/6.1.82/armnommu-fix-thread-registers.patch
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2024-05-12 16:52:29 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2024-05-12 16:52:29 +0200
commit6ae07b455f8779d65b845121e8ae8d3e71479db8 (patch)
tree4c91867b845da0493e0e2b4337b0cdc73f306c13 /target/linux/patches/6.1.82/armnommu-fix-thread-registers.patch
parent7ec1fa09c2f1663923868f9700c9f66c5b6b0ffb (diff)
linux: update to 6.1.90
Diffstat (limited to 'target/linux/patches/6.1.82/armnommu-fix-thread-registers.patch')
-rw-r--r--target/linux/patches/6.1.82/armnommu-fix-thread-registers.patch57
1 files changed, 0 insertions, 57 deletions
diff --git a/target/linux/patches/6.1.82/armnommu-fix-thread-registers.patch b/target/linux/patches/6.1.82/armnommu-fix-thread-registers.patch
deleted file mode 100644
index 8ab2196dc..000000000
--- a/target/linux/patches/6.1.82/armnommu-fix-thread-registers.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 1410ebe685f13c1699a16bf147ae1332e7fd1983 Mon Sep 17 00:00:00 2001
-From: Greg Ungerer <gerg@kernel.org>
-Date: Thu, 20 Apr 2023 09:52:08 +1000
-Subject: [PATCH] ARM: start_thread: restore registers on ELF load for noMMU
-
-The binfmt_elf-fdpic loader is capable of loading constant displacement
-ELF format binaries (like those compiled -pie) on noMMU systems as well
-as elf-fdpic format binaries. The traditional ELF loader cannot be
-enabled on noMMU systems.
-
-Commit 5e588114329c ("ARM: start_thread(): don't always clear all regs")
-fixed the start_thread() code so that it maintains the required
-elf-fdpic registers through to the new process, but it only does that if
-current has its personality FDPIC_FUNCPTRS bit set. That is true for
-elf-fdpic format binaries but will not be true for non-fdpic ELF
-binaries.
-
-Modify the test of the FDPIC_FUNCPTRS personality bit to also carry out
-the register restore if this is a noMMU system. This is not perfect,
-since it will also preserve these registers on noMMU systems for all
-binary format types (could be flat format for example). That won't break
-anything, but it is potentially leaking some information into the new
-process. But for the noMMU case we need those start time registers set to
-be able to finalize the runtime loading of the -pie style ELF binary
-(carry out its segment and dynamic relocation processing).
-
-Unfortunately the FDPIC_FUNCPTRS flag cannot just be enabled for all
-elf-fdpic loaded binaries. That personality bit is used for other things
-like the controlling the changed behavior for signal handling.
-
-There is no change in behavior for normal ELF loading on MMU systems.
-A -pie style ELF binary built for noMMU systems can be load and run using
-the usual ELF loader on an MMU system (elf-fdpic loader not required in
-this case).
-
-Signed-off-by: Greg Ungerer <gerg@kernel.org>
----
- arch/arm/include/asm/processor.h | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h
-index 326864f79d18..5074cc3ae4e1 100644
---- a/arch/arm/include/asm/processor.h
-+++ b/arch/arm/include/asm/processor.h
-@@ -60,7 +60,8 @@ static inline void arch_thread_struct_whitelist(unsigned long *offset,
- } \
- memset(regs->uregs, 0, sizeof(regs->uregs)); \
- if (IS_ENABLED(CONFIG_BINFMT_ELF_FDPIC) && \
-- current->personality & FDPIC_FUNCPTRS) { \
-+ ((! IS_ENABLED(CONFIG_MMU)) || \
-+ current->personality & FDPIC_FUNCPTRS)) { \
- regs->ARM_r7 = r7; \
- regs->ARM_r8 = r8; \
- regs->ARM_r9 = r9; \
---
-2.25.1
-