From: Greg Kroah-Hartman Date: Mon, 28 Oct 2024 06:19:14 +0000 (+0100) Subject: 5.10-stable patches X-Git-Tag: v5.15.170~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=928e226c095258131275485dc7629b7ae8422b38;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: arm64-uprobes-change-the-uprobe_opcode_t-typedef-to-fix-the-sparse-warning.patch --- diff --git a/queue-5.10/arm64-uprobes-change-the-uprobe_opcode_t-typedef-to-fix-the-sparse-warning.patch b/queue-5.10/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-5.10/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-5.10/series b/queue-5.10/series index 6fbee7f25f4..0fc04cf662a 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -52,3 +52,4 @@ selinux-improve-error-checking-in-sel_write_load.patch serial-protect-uart_port_dtr_rts-in-uart_shutdown-to.patch net-phy-dp83822-fix-reset-pin-definitions.patch asoc-qcom-fix-null-dereference-in-asoc_qcom_lpass_cpu_platform_probe.patch +arm64-uprobes-change-the-uprobe_opcode_t-typedef-to-fix-the-sparse-warning.patch