From: Greg Kroah-Hartman Date: Mon, 28 Oct 2024 06:20:22 +0000 (+0100) Subject: 6.1-stable patches X-Git-Tag: v5.15.170~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9c6aab053a914af6e912fa2c6e68f27addf99b0e;p=thirdparty%2Fkernel%2Fstable-queue.git 6.1-stable patches added patches: arm64-uprobes-change-the-uprobe_opcode_t-typedef-to-fix-the-sparse-warning.patch --- 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 index 00000000000..8a31cbd3284 --- /dev/null +++ b/queue-6.1/arm64-uprobes-change-the-uprobe_opcode_t-typedef-to-fix-the-sparse-warning.patch @@ -0,0 +1,46 @@ +From ef08c0fadd8a17ebe429b85e23952dac3263ad34 Mon Sep 17 00:00:00 2001 +From: junhua huang +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 + +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 +Signed-off-by: junhua huang +Link: https://lore.kernel.org/r/202212280954121197626@zte.com.cn +Signed-off-by: Will Deacon +Signed-off-by: Greg Kroah-Hartman +--- + 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 { + }; diff --git a/queue-6.1/series b/queue-6.1/series index 761fb6a6b60..4051afa72cb 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -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