summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-kernel/crash/crash.inc1
-rw-r--r--meta-oe/recipes-kernel/crash/crash/0005-Fix-build-failure-on-32bit-machine-i686.patch83
2 files changed, 84 insertions, 0 deletions
diff --git a/meta-oe/recipes-kernel/crash/crash.inc b/meta-oe/recipes-kernel/crash/crash.inc
index 6425c4ba7a..aef77be1a0 100644
--- a/meta-oe/recipes-kernel/crash/crash.inc
+++ b/meta-oe/recipes-kernel/crash/crash.inc
@@ -26,6 +26,7 @@ SRC_URI = "git://github.com/crash-utility/${BPN}.git;branch=master;protocol=http
26 file://0002-arm64-add-pac-mask-to-better-support-gdb-stack-unwin.patch \ 26 file://0002-arm64-add-pac-mask-to-better-support-gdb-stack-unwin.patch \
27 file://0003-Fix-build-failure-in-readline-lib.patch \ 27 file://0003-Fix-build-failure-in-readline-lib.patch \
28 file://0004-tools.c-do-not-use-keywords-nullptr-as-a-variable-in.patch \ 28 file://0004-tools.c-do-not-use-keywords-nullptr-as-a-variable-in.patch \
29 file://0005-Fix-build-failure-on-32bit-machine-i686.patch \
29 " 30 "
30SRCREV = "f13853cef53f5c5463a51021edbc81977e2b1405" 31SRCREV = "f13853cef53f5c5463a51021edbc81977e2b1405"
31 32
diff --git a/meta-oe/recipes-kernel/crash/crash/0005-Fix-build-failure-on-32bit-machine-i686.patch b/meta-oe/recipes-kernel/crash/crash/0005-Fix-build-failure-on-32bit-machine-i686.patch
new file mode 100644
index 0000000000..e4796b9ced
--- /dev/null
+++ b/meta-oe/recipes-kernel/crash/crash/0005-Fix-build-failure-on-32bit-machine-i686.patch
@@ -0,0 +1,83 @@
1From 2724bb1d0260f3886f8a3d533838caf80c7e61e5 Mon Sep 17 00:00:00 2001
2From: Lianbo Jiang <lijiang@redhat.com>
3Date: Fri, 24 Jan 2025 17:56:23 +0800
4Subject: [PATCH 10/10] Fix build failure on 32bit machine(i686)
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9This issue was caused by commit 0f39e33d3504 with the following
10compilation error:
11
12 frame.c: In function ‘CORE_ADDR frame_unwind_pc(frame_info*)’:
13 frame.c:982:35: error: cannot convert ‘CORE_ADDR*’ {aka ‘long long unsigned int*’} to ‘ulong*’ {aka ‘long unsigned int*’}
14 982 | crash_decode_ptrauth_pc(&pc);
15 | ^~~
16 | |
17 | CORE_ADDR* {aka long long unsigned int*}
18 frame.c:948:48: note: initializing argument 1 of ‘void crash_decode_ptrauth_pc(ulong*)’
19 948 | extern "C" void crash_decode_ptrauth_pc(ulong* pc);
20 | ~~~~~~~^~
21
22Upstream-Status: Backport [https://github.com/crash-utility/crash/commit/2724bb1d0260f3886f8a3d533838caf80c7e61e5]
23Fixes: 0f39e33d3504 ("arm64: add pac mask to better support gdb stack unwind")
24Reported-by: Guanyou.Chen <chenguanyou@xiaomi.com>
25Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
26---
27 gdb-10.2.patch | 6 +++---
28 gdb_interface.c | 4 ++--
29 2 files changed, 5 insertions(+), 5 deletions(-)
30
31diff --git a/gdb-10.2.patch b/gdb-10.2.patch
32index 8f5d7db22840..d22f2d6d75bc 100644
33--- a/gdb-10.2.patch
34+++ b/gdb-10.2.patch
35@@ -55,7 +55,7 @@ exit 0
36 # your system doesn't have fcntl.h in /usr/include (which is where it
37 # should be according to Posix).
38 -DEFS = @DEFS@
39-+DEFS = -DCRASH_MERGE @DEFS@
40++DEFS = -DCRASH_MERGE -D${CRASH_TARGET} @DEFS@
41 GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/config \
42 -DLOCALEDIR="\"$(localedir)\"" $(DEFS)
43
44@@ -16222,7 +16222,7 @@ exit 0
45 return NULL;
46 }
47
48-+#ifdef CRASH_MERGE
49++#if defined(CRASH_MERGE) && defined(ARM64)
50 +extern "C" void crash_decode_ptrauth_pc(ulong* pc);
51 +#endif
52 +
53@@ -16233,7 +16233,7 @@ exit 0
54 try
55 {
56 pc = gdbarch_unwind_pc (prev_gdbarch, this_frame);
57-+#ifdef CRASH_MERGE
58++#if defined(CRASH_MERGE) && defined(ARM64)
59 + crash_decode_ptrauth_pc(&pc);
60 +#endif
61 pc_p = true;
62diff --git a/gdb_interface.c b/gdb_interface.c
63index e108d097ee5f..c2e99f5c156a 100644
64--- a/gdb_interface.c
65+++ b/gdb_interface.c
66@@ -1084,12 +1084,12 @@ int crash_get_current_task_reg (int regno, const char *regname,
67 }
68
69 /* arm64 kernel lr maybe has patuh */
70+#ifdef ARM64
71 void crash_decode_ptrauth_pc(ulong *pc);
72 void crash_decode_ptrauth_pc(ulong *pc)
73 {
74-#ifdef ARM64
75 struct machine_specific *ms = machdep->machspec;
76 if (is_kernel_text(*pc | ms->CONFIG_ARM64_KERNELPACMASK))
77 *pc |= ms->CONFIG_ARM64_KERNELPACMASK;
78-#endif /* !ARM64 */
79 }
80+#endif /* !ARM64 */
81--
822.47.1
83