diff options
-rw-r--r-- | meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Actually-use-the-hint-space-instruction-to-strip-PAC.patch | 32 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20250127.0.bb | 1 |
2 files changed, 33 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Actually-use-the-hint-space-instruction-to-strip-PAC.patch b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Actually-use-the-hint-space-instruction-to-strip-PAC.patch new file mode 100644 index 0000000000..a235797de9 --- /dev/null +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Actually-use-the-hint-space-instruction-to-strip-PAC.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 5852b47a81e5334a667d1e12dbfa55c0f8111100 Mon Sep 17 00:00:00 2001 | ||
2 | From: Derek Mauro <dmauro@google.com> | ||
3 | Date: Fri, 7 Feb 2025 08:49:06 -0800 | ||
4 | Subject: [PATCH] Actually use the hint space instruction to strip PAC bits for | ||
5 | return addresses in stack traces as the comment says | ||
6 | |||
7 | https://android.googlesource.com/platform/libcore/+/71f2c75111e87091616f0f3b86bea6c4d345dad1/src/hotspot/os_cpu/linux_aarch64/pauth_linux_aarch64.inline.hpp | ||
8 | |||
9 | PiperOrigin-RevId: 724360415 | ||
10 | Change-Id: I691160e43354131a04919765ce283e07c3c933a9 | ||
11 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | ||
12 | Signed-off-by: Alex Kiernan <alexk@a-squared-projects.uk> | ||
13 | Upstream-Status: Backport [https://github.com/abseil/abseil-cpp/commit/5852b47a81e5334a667d1e12dbfa55c0f8111100] | ||
14 | --- | ||
15 | absl/debugging/internal/stacktrace_aarch64-inl.inc | 4 +++- | ||
16 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/absl/debugging/internal/stacktrace_aarch64-inl.inc b/absl/debugging/internal/stacktrace_aarch64-inl.inc | ||
19 | index 4490c4e13cae..dccadaeb7c24 100644 | ||
20 | --- a/absl/debugging/internal/stacktrace_aarch64-inl.inc | ||
21 | +++ b/absl/debugging/internal/stacktrace_aarch64-inl.inc | ||
22 | @@ -188,7 +188,9 @@ inline void* ClearPacBits(void* ptr) { | ||
23 | // compatibility with ARM platforms that do not support pointer | ||
24 | // authentication, we use the hint space instruction XPACLRI instead. Hint | ||
25 | // space instructions behave as NOPs on unsupported platforms. | ||
26 | - asm("xpaclri" : "+r"(x30)); | ||
27 | +#define ABSL_XPACLRI_HINT "hint #0x7;" | ||
28 | + asm(ABSL_XPACLRI_HINT : "+r"(x30)); // asm("xpaclri" : "+r"(x30)); | ||
29 | +#undef ABSL_XPACLRI_HINT | ||
30 | return x30; | ||
31 | } | ||
32 | |||
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20250127.0.bb b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20250127.0.bb index 88e20c0577..f217d4daf8 100644 --- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20250127.0.bb +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20250127.0.bb | |||
@@ -14,6 +14,7 @@ SRC_URI = "git://github.com/abseil/abseil-cpp;branch=${BRANCH};protocol=https \ | |||
14 | file://0002-Remove-maes-option-from-cross-compilation.patch \ | 14 | file://0002-Remove-maes-option-from-cross-compilation.patch \ |
15 | file://0003-Remove-neon-option-from-cross-compilation.patch \ | 15 | file://0003-Remove-neon-option-from-cross-compilation.patch \ |
16 | file://0004-abseil-ppc-fixes.patch \ | 16 | file://0004-abseil-ppc-fixes.patch \ |
17 | file://0001-Actually-use-the-hint-space-instruction-to-strip-PAC.patch \ | ||
17 | " | 18 | " |
18 | 19 | ||
19 | S = "${WORKDIR}/git" | 20 | S = "${WORKDIR}/git" |