hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/Documentation/arm64/tagged-pointers.rst
....@@ -53,12 +53,25 @@
5353 Preserving tags
5454 ---------------
5555
56
-Non-zero tags are not preserved when delivering signals. This means that
57
-signal handlers in applications making use of tags cannot rely on the
58
-tag information for user virtual addresses being maintained for fields
59
-inside siginfo_t. One exception to this rule is for signals raised in
60
-response to watchpoint debug exceptions, where the tag information will
61
-be preserved.
56
+When delivering signals, non-zero tags are not preserved in
57
+siginfo.si_addr unless the flag SA_EXPOSE_TAGBITS was set in
58
+sigaction.sa_flags when the signal handler was installed. This means
59
+that signal handlers in applications making use of tags cannot rely
60
+on the tag information for user virtual addresses being maintained
61
+in these fields unless the flag was set.
62
+
63
+Due to architecture limitations, bits 63:60 of the fault address
64
+are not preserved in response to synchronous tag check faults
65
+(SEGV_MTESERR) even if SA_EXPOSE_TAGBITS was set. Applications should
66
+treat the values of these bits as undefined in order to accommodate
67
+future architecture revisions which may preserve the bits.
68
+
69
+For signals raised in response to watchpoint debug exceptions, the
70
+tag information will be preserved regardless of the SA_EXPOSE_TAGBITS
71
+flag setting.
72
+
73
+Non-zero tags are never preserved in sigcontext.fault_address
74
+regardless of the SA_EXPOSE_TAGBITS flag setting.
6275
6376 The architecture prevents the use of a tagged PC, so the upper byte will
6477 be set to a sign-extension of bit 55 on exception return.