Documentation-arm64-tagged-pointers

Chinese translated version of Documentation-arm64-tagged-pointers


If you have any comment or update to the content, please contact the
original document maintainer directly.  However, if you have a problem
communicating in English you can also ask the Chinese maintainer for
help.  Contact the Chinese maintainer if this translation is outdated
or if there is a problem with the translation.


Chinese maintainer:  <steven910812@gmail.com>
---------------------------------------------------------------------
Documentation-arm64-tagged-pointers的中文翻译


如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
译存在问题,请联系中文版维护者。


中文版维护者: 徐唯  <steven910812@gmail.com>
中文版翻译者: 徐唯  <steven910812@gmail.com>
中文版校译者: 徐唯  <steven910812@gmail.com>


以下为正文
---------------------------------------------------------------------


Tagged virtual addresses in AArch64 Linux
在AArch64 Linux标记的虚拟地址
=========================================


Author: Will Deacon <will.deacon@arm.com>
作者:威尔·迪康
Date  : 12 June 2013
日期:2013.6.12


This document briefly describes the provision of tagged virtual
addresses in the AArch64 translation system and their potential uses
in AArch64 Linux.


这份文档简要介绍了在AArch64转换系统中标记的虚拟地址的提供
及其在AArch64 Linux中的潜在用途。


The kernel configures the translation tables so that translations made
via TTBR0 (i.e. userspace mappings) have the top byte (bits 63:56) of
the virtual address ignored by the translation hardware. This frees up
this byte for application use, with the following caveats:


(1) The kernel requires that all user addresses passed to EL1
   are tagged with tag 0x00. This means that any syscall
   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
   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.


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.


内核中配置有换算表,以便于通过TTBR0(即用户空间的映射)换算被硬件转换所忽略的虚拟地址的的最高字节(bits 63:56)。
这释放了供用户使用的字节,有以下注意事项:


(1)内核需要的所有传递给EL1的用户地址都必须
有一个0X00的标签。这意味着,任何系统调用
     包含用户虚拟地址的参数必须将他们的最高字
节清零,否则将无法被内核接受。


(2)传送信号时,非零的标签不会保留。
     这意味着,在应用程序中的信号处理程序使用的
     标签不能被siginfo_t的字段中的用户虚拟标签信
息利用。这个规则的一个例外是信号响应提出观察
点调试异常,标签信息将被保留。


(3)特别应谨慎使用标记指针,因为很可能C编译器将不
     会冒险区分两个高位字节的虚拟地址。
 
该体系结构可以防止被标记的PC的使用,这样的高位字节被
设定为一个55位符号扩展异常返回。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值