]> git.ipfire.org Git - thirdparty/glibc.git/commit
aarch64: Add GCS support to longjmp
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Thu, 23 Feb 2023 08:54:04 +0000 (08:54 +0000)
committerYury Khrustalev <yury.khrustalev@arm.com>
Mon, 20 Jan 2025 09:22:41 +0000 (09:22 +0000)
commit5ff5e7836e97a2d87778936b29c9607c120251be
tree1f7c452d4706f49efdd14c6e07d0659c70b874d5
parent13cbbb0cb29153bab099e040002e7cc78a0ceaaa
aarch64: Add GCS support to longjmp

This implementations ensures that longjmp across different stacks
works: it scans for GCS cap token and switches GCS if necessary
then the target GCSPR is restored with a GCSPOPM loop once the
current GCSPR is on the same GCS.

This makes longjmp linear time in the number of jumped over stack
frames when GCS is enabled.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
sysdeps/aarch64/__longjmp.S
sysdeps/aarch64/setjmp.S