summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2013-06-12 16:28:04 +0100
committerIshan Mittal <imittal@nvidia.com>2014-04-30 11:39:03 +0530
commitb05a09e710b9e51ddb88d230ca1cca02484c1034 (patch)
tree85349c6893a1933393722ded66db695b6300df35 /Documentation
parente02fc30b94bdff4732449806636e31e4f84689ab (diff)
arm64: mm: permit use of tagged pointers at EL0
TCR.TBI0 can be used to cause hardware address translation to ignore the top byte of userspace virtual addresses. Whilst not especially useful in standard C programs, this can be used by JITs to `tag' pointers with various pieces of metadata. This patch enables this bit for AArch64 Linux, and adds a new file to Documentation/arm64/ which describes some potential caveats when using tagged virtual addresses. (cherry picked from commit d50240a5f6ceaf690a77b0fccb17be51cfa151c2) Conflicts: Documentation/arm64/tagged-pointers.txt Change-Id: I4366318cc1b049e8e9f642fc502e8d0b04e2ed24 Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/arm64/tagged-pointers.txt14
1 files changed, 7 insertions, 7 deletions
diff --git a/Documentation/arm64/tagged-pointers.txt b/Documentation/arm64/tagged-pointers.txt
index d9995f1f51b3..264e9841563a 100644
--- a/Documentation/arm64/tagged-pointers.txt
+++ b/Documentation/arm64/tagged-pointers.txt
@@ -18,17 +18,17 @@ this byte for application use, with the following caveats:
parameters containing user virtual addresses *must* have
their top byte cleared before trapping to the kernel.
- (2) Non-zero tags are not preserved when delivering signals.
- This means that signal handlers in applications making use
- of tags cannot rely on the tag information for user virtual
- addresses being maintained for fields inside siginfo_t.
- One exception to this rule is for signals raised in response
- to watchpoint debug exceptions, where the tag information
+ (2) Tags are not guaranteed to be preserved when delivering
+ signals. This means that signal handlers in applications
+ making use of tags cannot rely on the tag information for
+ user virtual addresses being maintained for fields inside
+ siginfo_t. One exception to this rule is for signals raised
+ in response to debug exceptions, where the tag information
will be preserved.
(3) Special care should be taken when using tagged pointers,
since it is likely that C compilers will not hazard two
- virtual addresses differing only in the upper byte.
+ addresses differing only in the upper bits.
The architecture prevents the use of a tagged PC, so the upper byte will
be set to a sign-extension of bit 55 on exception return.