[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-08-12 Thread John Brawn via cfe-commits
john-brawn-arm wrote: /cherry-pick b32aac4 c649194 3952910 https://github.com/llvm/llvm-project/pull/99335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-08-07 Thread John Brawn via cfe-commits
@@ -680,7 +680,7 @@ DEFINE_LIBUNWIND_FUNCTION(__libunwind_Registers_arm64_jumpto) ldrx16, [x0, #0x0F8] ldpx0, x1, [x0, #0x000] // restore x0,x1 movsp,x16 // restore sp - retx30// jump to pc john-

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-08-07 Thread John Brawn via cfe-commits
@@ -680,7 +680,7 @@ DEFINE_LIBUNWIND_FUNCTION(__libunwind_Registers_arm64_jumpto) ldrx16, [x0, #0x0F8] ldpx0, x1, [x0, #0x000] // restore x0,x1 movsp,x16 // restore sp - retx30// jump to pc john-

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-08-05 Thread Daniel Kiss via cfe-commits
@@ -680,7 +680,7 @@ DEFINE_LIBUNWIND_FUNCTION(__libunwind_Registers_arm64_jumpto) ldrx16, [x0, #0x0F8] ldpx0, x1, [x0, #0x000] // restore x0,x1 movsp,x16 // restore sp - retx30// jump to pc Danie

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-08-05 Thread John Brawn via cfe-commits
john-brawn-arm wrote: https://github.com/llvm/llvm-project/pull/101973 for being more careful about enabling GCS. https://github.com/llvm/llvm-project/pull/99335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-08-05 Thread Nico Weber via cfe-commits
nico wrote: That sounds believable. We did update our compiler just an hour or so ago, so it's possible it will work for us now. However, it suggests that the assumption `defined(__ARM_FEATURE_GCS_DEFAULT)` => arm_acle.h has `__chkfeat()` isn't valid in this snippet in libunwind/src/cet_unwi

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-08-05 Thread John Brawn via cfe-commits
john-brawn-arm wrote: > Looks like this breaks building on Android: > https://ci.chromium.org/ui/p/chromium/builders/try/android-arm64-rel/680348/overview Looks like Android here is being built with clang-llvmorg-19-init-14561-gecea8371-3004.tar.xz which looks like it's built from commit http

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-08-05 Thread Tobias Hieta via cfe-commits
tru wrote: > Though having said all this, I marked this for LLVM 19 as my reading of > https://discourse.llvm.org/t/update-on-llvm-19-x-releases/80511 was that new > features are still ok before RC2, but re-reading it it's a bit ambiguous: it > says "New features will have to wait until LLVM 2

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-08-04 Thread Nico Weber via cfe-commits
nico wrote: Looks like this breaks building on Android: https://ci.chromium.org/ui/p/chromium/builders/try/android-arm64-rel/680348/overview https://github.com/llvm/llvm-project/pull/99335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-08-04 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#101888 https://github.com/llvm/llvm-project/pull/99335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-08-04 Thread John Brawn via cfe-commits
john-brawn-arm wrote: /cherry-pick b32aac4358c1f6639de7c453656cd74fbab75d71 https://github.com/llvm/llvm-project/pull/99335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-08-04 Thread John Brawn via cfe-commits
john-brawn-arm wrote: > This seems to add a new feature, is it really relevant for a backport? This is the last piece of work to enable GCS in the LLVM toolchain (clang and lld support went in a while ago), and I was hoping to get everything in to LLVM 19. It would be rather annoying to have t

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-08-04 Thread John Brawn via cfe-commits
https://github.com/john-brawn-arm closed https://github.com/llvm/llvm-project/pull/99335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-08-04 Thread John Brawn via cfe-commits
https://github.com/john-brawn-arm updated https://github.com/llvm/llvm-project/pull/99335 >From e0f71863bd2f797c9208bdfc559bb69ade5a653a Mon Sep 17 00:00:00 2001 From: John Brawn Date: Wed, 17 Jul 2024 15:18:46 +0100 Subject: [PATCH 1/4] [libunwind] Add GCS support for AArch64 AArch64 GCS (Gua

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-08-04 Thread John Brawn via cfe-commits
john-brawn-arm wrote: > LGTM. Sorry for the delay. > > Q: Is there a way to play with the GCS feature in a VM? Do you have setup > instructions? https://git.yoctoproject.org/meta-arm/log/?h=testing/gcs is a demonstration embedded linux that support GCS, including an emulator capable of runnin

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-08-04 Thread Tobias Hieta via cfe-commits
tru wrote: This seems to add a new feature, is it really relevant for a backport? https://github.com/llvm/llvm-project/pull/99335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-08-02 Thread via cfe-commits
https://github.com/jinge90 approved this pull request. https://github.com/llvm/llvm-project/pull/99335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-08-02 Thread Fangrui Song via cfe-commits
@@ -170,6 +183,10 @@ unwind_phase1(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *except } extern int __unw_step_stage2(unw_cursor_t *); +#if defined(_LIBUNWIND_USE_GCS) +// Enable the GCS target feature to permit GCS instructions to be used. Mas

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-08-02 Thread Fangrui Song via cfe-commits
@@ -180,8 +197,13 @@ unwind_phase2(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *except // uc is initialized by __unw_getcontext in the parent frame. The first stack // frame walked is unwind_phase2. unsigned framesWalked = 1; -#ifdef _LIBUNWIND_USE_CET +#i

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-08-02 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. LGTM. Sorry for the delay. Q: Is there a way to play with the GCS feature in a VM? Do you have setup instructions? https://github.com/llvm/llvm-project/pull/99335 ___ cfe-commits mailing list cfe

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-08-02 Thread John Brawn via cfe-commits
john-brawn-arm wrote: Sorry to pester you about this, but would it be possible to get this approved in time for LLVM19 RC2 on Monday? This is the last piece of GCS work and it would be nice to have it all in a single LLVM release. https://github.com/llvm/llvm-project/pull/99335 ___

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-08-02 Thread John Brawn via cfe-commits
https://github.com/john-brawn-arm milestoned https://github.com/llvm/llvm-project/pull/99335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-07-31 Thread John Brawn via cfe-commits
john-brawn-arm wrote: Ping https://github.com/llvm/llvm-project/pull/99335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-07-19 Thread John Brawn via cfe-commits
https://github.com/john-brawn-arm updated https://github.com/llvm/llvm-project/pull/99335 >From e0f71863bd2f797c9208bdfc559bb69ade5a653a Mon Sep 17 00:00:00 2001 From: John Brawn Date: Wed, 17 Jul 2024 15:18:46 +0100 Subject: [PATCH 1/3] [libunwind] Add GCS support for AArch64 AArch64 GCS (Gua

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-07-17 Thread Fangrui Song via cfe-commits
@@ -170,6 +183,10 @@ unwind_phase1(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *except } extern int __unw_step_stage2(unw_cursor_t *); +#if defined(_LIBUNWIND_USE_CET) && defined(_LIBUNWIND_TARGET_AARCH64) MaskRay wrote: Mixing CET and AArch64

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-07-17 Thread Fangrui Song via cfe-commits
@@ -35,6 +35,25 @@ } while (0) #endif +// On AArch64 we use _LIBUNWIND_USE_CET to indicate that GCS is supported. We +// need to guard any use of GCS instructions with __chkfeat though, as GCS may +// not be enabled. +#if defined(_LIBUNWIND_TARGET_AARCH64) && defined(__ARM_F

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-07-17 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 554febd3aad8d7cea7b8f8f6124d691031fb618c e0f71863bd2f797c9208bdfc559bb69ade5a653a --e

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-07-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libunwind Author: John Brawn (john-brawn-arm) Changes AArch64 GCS (Guarded Control Stack) is similar enough to CET that we can re-use the existing code that is guarded by _LIBUNWIND_USE_CET, so long as we also add defines to locate the GCS stack and po

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-07-17 Thread John Brawn via cfe-commits
https://github.com/john-brawn-arm created https://github.com/llvm/llvm-project/pull/99335 AArch64 GCS (Guarded Control Stack) is similar enough to CET that we can re-use the existing code that is guarded by _LIBUNWIND_USE_CET, so long as we also add defines to locate the GCS stack and pop the