]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 6 Jul 2025 06:54:58 +0000 (08:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 6 Jul 2025 06:54:58 +0000 (08:54 +0200)
added patches:
arm-9354-1-ptrace-use-bitfield-helpers.patch

queue-5.15/arm-9354-1-ptrace-use-bitfield-helpers.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/arm-9354-1-ptrace-use-bitfield-helpers.patch b/queue-5.15/arm-9354-1-ptrace-use-bitfield-helpers.patch
new file mode 100644 (file)
index 0000000..cd09cc4
--- /dev/null
@@ -0,0 +1,44 @@
+From b36e78b216e632d90138751e4ff80044de303656 Mon Sep 17 00:00:00 2001
+From: Geert Uytterhoeven <geert+renesas@glider.be>
+Date: Mon, 26 Feb 2024 12:25:01 +0100
+Subject: ARM: 9354/1: ptrace: Use bitfield helpers
+
+From: Geert Uytterhoeven <geert+renesas@glider.be>
+
+commit b36e78b216e632d90138751e4ff80044de303656 upstream.
+
+The isa_mode() macro extracts two fields, and recombines them into a
+single value.
+
+Make this more obvious by using the FIELD_GET() helper, and shifting the
+result into its final resting place.
+
+Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
+Reviewed-by: Oleg Nesterov <oleg@redhat.com>
+Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm/include/asm/ptrace.h |    5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/arch/arm/include/asm/ptrace.h
++++ b/arch/arm/include/asm/ptrace.h
+@@ -10,6 +10,7 @@
+ #include <uapi/asm/ptrace.h>
+ #ifndef __ASSEMBLY__
++#include <linux/bitfield.h>
+ #include <linux/types.h>
+ struct pt_regs {
+@@ -35,8 +36,8 @@ struct svc_pt_regs {
+ #ifndef CONFIG_CPU_V7M
+ #define isa_mode(regs) \
+-      ((((regs)->ARM_cpsr & PSR_J_BIT) >> (__ffs(PSR_J_BIT) - 1)) | \
+-       (((regs)->ARM_cpsr & PSR_T_BIT) >> (__ffs(PSR_T_BIT))))
++      (FIELD_GET(PSR_J_BIT, (regs)->ARM_cpsr) << 1 | \
++       FIELD_GET(PSR_T_BIT, (regs)->ARM_cpsr))
+ #else
+ #define isa_mode(regs) 1 /* Thumb */
+ #endif
index df8221c51e97a17de788271d266e2e51abca69ec..1ed2491542154e2e6ac08f198258bb48affaa775 100644 (file)
@@ -93,3 +93,4 @@ s390-add-std-gnu11-to-decompressor-and-purgatory-cflags.patch
 revert-ipv6-save-dontfrag-in-cork.patch
 arm64-restrict-pagetable-teardown-to-avoid-false-warning.patch
 btrfs-don-t-drop-extent_map-for-free-space-inode-on-write-error.patch
+arm-9354-1-ptrace-use-bitfield-helpers.patch