]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Oct 2024 06:20:22 +0000 (07:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Oct 2024 06:20:22 +0000 (07:20 +0100)
added patches:
arm64-uprobes-change-the-uprobe_opcode_t-typedef-to-fix-the-sparse-warning.patch

queue-6.1/arm64-uprobes-change-the-uprobe_opcode_t-typedef-to-fix-the-sparse-warning.patch [new file with mode: 0644]
queue-6.1/series

diff --git a/queue-6.1/arm64-uprobes-change-the-uprobe_opcode_t-typedef-to-fix-the-sparse-warning.patch b/queue-6.1/arm64-uprobes-change-the-uprobe_opcode_t-typedef-to-fix-the-sparse-warning.patch
new file mode 100644 (file)
index 0000000..8a31cbd
--- /dev/null
@@ -0,0 +1,46 @@
+From ef08c0fadd8a17ebe429b85e23952dac3263ad34 Mon Sep 17 00:00:00 2001
+From: junhua huang <huang.junhua@zte.com.cn>
+Date: Wed, 28 Dec 2022 09:54:12 +0800
+Subject: arm64/uprobes: change the uprobe_opcode_t typedef to fix the sparse warning
+
+From: junhua huang <huang.junhua@zte.com.cn>
+
+commit ef08c0fadd8a17ebe429b85e23952dac3263ad34 upstream.
+
+After we fixed the uprobe inst endian in aarch_be, the sparse check report
+the following warning info:
+
+sparse warnings: (new ones prefixed by >>)
+>> kernel/events/uprobes.c:223:25: sparse: sparse: restricted __le32 degrades to integer
+>> kernel/events/uprobes.c:574:56: sparse: sparse: incorrect type in argument 4 (different base types)
+@@     expected unsigned int [addressable] [usertype] opcode @@     got restricted __le32 [usertype] @@
+   kernel/events/uprobes.c:574:56: sparse:     expected unsigned int [addressable] [usertype] opcode
+   kernel/events/uprobes.c:574:56: sparse:     got restricted __le32 [usertype]
+>> kernel/events/uprobes.c:1483:32: sparse: sparse: incorrect type in initializer (different base types)
+@@     expected unsigned int [usertype] insn @@     got restricted __le32 [usertype] @@
+   kernel/events/uprobes.c:1483:32: sparse:     expected unsigned int [usertype] insn
+   kernel/events/uprobes.c:1483:32: sparse:     got restricted __le32 [usertype]
+
+use the __le32 to u32 for uprobe_opcode_t, to keep the same.
+
+Fixes: 60f07e22a73d ("arm64:uprobe fix the uprobe SWBP_INSN in big-endian")
+Reported-by: kernel test robot <lkp@intel.com>
+Signed-off-by: junhua huang <huang.junhua@zte.com.cn>
+Link: https://lore.kernel.org/r/202212280954121197626@zte.com.cn
+Signed-off-by: Will Deacon <will@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/include/asm/uprobes.h |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm64/include/asm/uprobes.h
++++ b/arch/arm64/include/asm/uprobes.h
+@@ -14,7 +14,7 @@
+ #define UPROBE_SWBP_INSN_SIZE AARCH64_INSN_SIZE
+ #define UPROBE_XOL_SLOT_BYTES AARCH64_INSN_SIZE
+-typedef u32 uprobe_opcode_t;
++typedef __le32 uprobe_opcode_t;
+ struct arch_uprobe_task {
+ };
index 761fb6a6b60e2d5cdf2eac71b13f8b318a5cce79..4051afa72cb8097c33f5a45923a7d7bd58624f10 100644 (file)
@@ -134,3 +134,4 @@ block-fix-sanity-checks-in-blk_rq_map_user_bvec.patch
 asoc-qcom-fix-null-dereference-in-asoc_qcom_lpass_cpu_platform_probe.patch
 platform-x86-dell-wmi-ignore-suspend-notifications.patch
 acpi-prm-clean-up-guid-type-in-struct-prm_handler_info.patch
+arm64-uprobes-change-the-uprobe_opcode_t-typedef-to-fix-the-sparse-warning.patch