From cef63dd456482acfde652e6701609964388e693f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 28 Oct 2024 07:19:48 +0100 Subject: [PATCH] 5.15-stable patches added patches: arm64-uprobes-change-the-uprobe_opcode_t-typedef-to-fix-the-sparse-warning.patch --- ..._t-typedef-to-fix-the-sparse-warning.patch | 46 +++++++++++++++++++ queue-5.15/series | 1 + 2 files changed, 47 insertions(+) create mode 100644 queue-5.15/arm64-uprobes-change-the-uprobe_opcode_t-typedef-to-fix-the-sparse-warning.patch diff --git a/queue-5.15/arm64-uprobes-change-the-uprobe_opcode_t-typedef-to-fix-the-sparse-warning.patch b/queue-5.15/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.15/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.15/series b/queue-5.15/series index 94b5f620035..55712f6de77 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -44,6 +44,7 @@ asoc-fsl_sai-enable-fifo-continue-on-error-fcont-bit.patch arm64-force-position-independent-veneers.patch udf-fix-uninit-value-use-in-udf_get_fileshortad.patch platform-x86-dell-wmi-ignore-suspend-notifications.patch +arm64-uprobes-change-the-uprobe_opcode_t-typedef-to-fix-the-sparse-warning.patch asoc-qcom-sm8250-add-qrb4210-rb2-sndcard-compatible-.patch platform-x86-dell-sysman-add-support-for-alienware-p.patch jfs-fix-sanity-check-in-dbmount.patch -- 2.47.2