€•5Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ./translations/zh_CN/arch/arm64/tagged-pointers”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/zh_TW/arch/arm64/tagged-pointers”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/it_IT/arch/arm64/tagged-pointers”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/ja_JP/arch/arm64/tagged-pointers”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/ko_KR/arch/arm64/tagged-pointers”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/sp_SP/arch/arm64/tagged-pointers”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ)Tagged virtual addresses in AArch64 Linux”h]”hŒ)Tagged virtual addresses in AArch64 Linux”…””}”(hh¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh£hžhhŸŒH/var/lib/git/docbuild/linux/Documentation/arch/arm64/tagged-pointers.rst”h KubhŒ paragraph”“”)”}”(hŒ)Author: Will Deacon ”h]”(hŒAuthor: Will Deacon <”…””}”(hh¹hžhhŸNh NubhŒ reference”“”)”}”(hŒwill.deacon@arm.com”h]”hŒwill.deacon@arm.com”…””}”(hhÃhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:will.deacon@arm.com”uh1hÁhh¹ubhŒ>”…””}”(hh¹hžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khh£hžhubh¸)”}”(hŒDate : 12 June 2013”h]”hŒDate : 12 June 2013”…””}”(hhÝhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khh£hžhubh¸)”}”(hŒ–This document briefly describes the provision of tagged virtual addresses in the AArch64 translation system and their potential uses in AArch64 Linux.”h]”hŒ–This document briefly describes the provision of tagged virtual addresses in the AArch64 translation system and their potential uses in AArch64 Linux.”…””}”(hhëhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K hh£hžhubh¸)”}”(hŒò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.”h]”hŒò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.”…””}”(hhùhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K hh£hžhubh¢)”}”(hhh]”(h§)”}”(hŒ&Passing tagged addresses to the kernel”h]”hŒ&Passing tagged addresses to the kernel”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjhžhhŸh¶h Kubh¸)”}”(hŒÚAll interpretation of userspace memory addresses by the kernel assumes an address tag of 0x00, unless the application enables the AArch64 Tagged Address ABI explicitly (Documentation/arch/arm64/tagged-address-abi.rst).”h]”hŒÚAll interpretation of userspace memory addresses by the kernel assumes an address tag of 0x00, unless the application enables the AArch64 Tagged Address ABI explicitly (Documentation/arch/arm64/tagged-address-abi.rst).”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khjhžhubh¸)”}”(hŒ9This includes, but is not limited to, addresses found in:”h]”hŒ9This includes, but is not limited to, addresses found in:”…””}”(hj&hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KhjhžhubhŒ block_quote”“”)”}”(hX- pointer arguments to system calls, including pointers in structures passed to system calls, - the stack pointer (sp), e.g. when interpreting it to deliver a signal, - the frame pointer (x29) and frame records, e.g. when interpreting them to generate a backtrace or call graph. ”h]”hŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒ\pointer arguments to system calls, including pointers in structures passed to system calls, ”h]”h¸)”}”(hŒ[pointer arguments to system calls, including pointers in structures passed to system calls,”h]”hŒ[pointer arguments to system calls, including pointers in structures passed to system calls,”…””}”(hjEhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KhjAubah}”(h]”h ]”h"]”h$]”h&]”uh1j?hj<ubj@)”}”(hŒGthe stack pointer (sp), e.g. when interpreting it to deliver a signal, ”h]”h¸)”}”(hŒFthe stack pointer (sp), e.g. when interpreting it to deliver a signal,”h]”hŒFthe stack pointer (sp), e.g. when interpreting it to deliver a signal,”…””}”(hj]hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K hjYubah}”(h]”h ]”h"]”h$]”h&]”uh1j?hj<ubj@)”}”(hŒnthe frame pointer (x29) and frame records, e.g. when interpreting them to generate a backtrace or call graph. ”h]”h¸)”}”(hŒmthe frame pointer (x29) and frame records, e.g. when interpreting them to generate a backtrace or call graph.”h]”hŒmthe frame pointer (x29) and frame records, e.g. when interpreting them to generate a backtrace or call graph.”…””}”(hjuhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K#hjqubah}”(h]”h ]”h"]”h$]”h&]”uh1j?hj<ubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1j:hŸh¶h Khj6ubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hŸh¶h Khjhžhubh¸)”}”(hŒèUsing non-zero address tags in any of these locations when the userspace application did not enable the AArch64 Tagged Address ABI may result in an error code being returned, a (fatal) signal being raised, or other modes of failure.”h]”hŒèUsing non-zero address tags in any of these locations when the userspace application did not enable the AArch64 Tagged Address ABI may result in an error code being returned, a (fatal) signal being raised, or other modes of failure.”…””}”(hj—hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K&hjhžhubh¸)”}”(hŒÏFor these reasons, when the AArch64 Tagged Address ABI is disabled, passing non-zero address tags to the kernel via system calls is forbidden, and using a non-zero address tag for sp is strongly discouraged.”h]”hŒÏFor these reasons, when the AArch64 Tagged Address ABI is disabled, passing non-zero address tags to the kernel via system calls is forbidden, and using a non-zero address tag for sp is strongly discouraged.”…””}”(hj¥hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K+hjhžhubh¸)”}”(hŒ—Programs maintaining a frame pointer and frame records that use non-zero address tags may suffer impaired or inaccurate debug and profiling visibility.”h]”hŒ—Programs maintaining a frame pointer and frame records that use non-zero address tags may suffer impaired or inaccurate debug and profiling visibility.”…””}”(hj³hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K0hjhžhubeh}”(h]”Œ&passing-tagged-addresses-to-the-kernel”ah ]”h"]”Œ&passing tagged addresses to the kernel”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒPreserving tags”h]”hŒPreserving tags”…””}”(hjÌhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjÉhžhhŸh¶h K6ubh¸)”}”(hXmWhen delivering signals, non-zero tags are not preserved in siginfo.si_addr unless the flag SA_EXPOSE_TAGBITS was set in sigaction.sa_flags when the signal handler was installed. This means that signal handlers in applications making use of tags cannot rely on the tag information for user virtual addresses being maintained in these fields unless the flag was set.”h]”hXmWhen delivering signals, non-zero tags are not preserved in siginfo.si_addr unless the flag SA_EXPOSE_TAGBITS was set in sigaction.sa_flags when the signal handler was installed. This means that signal handlers in applications making use of tags cannot rely on the tag information for user virtual addresses being maintained in these fields unless the flag was set.”…””}”(hjÚhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K8hjÉhžhubh¸)”}”(hXCDue to architecture limitations, bits 63:60 of the fault address are not preserved in response to synchronous tag check faults (SEGV_MTESERR) even if SA_EXPOSE_TAGBITS was set. Applications should treat the values of these bits as undefined in order to accommodate future architecture revisions which may preserve the bits.”h]”hXCDue to architecture limitations, bits 63:60 of the fault address are not preserved in response to synchronous tag check faults (SEGV_MTESERR) even if SA_EXPOSE_TAGBITS was set. Applications should treat the values of these bits as undefined in order to accommodate future architecture revisions which may preserve the bits.”…””}”(hjèhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K?hjÉhžhubh¸)”}”(hŒ–For signals raised in response to watchpoint debug exceptions, the tag information will be preserved regardless of the SA_EXPOSE_TAGBITS flag setting.”h]”hŒ–For signals raised in response to watchpoint debug exceptions, the tag information will be preserved regardless of the SA_EXPOSE_TAGBITS flag setting.”…””}”(hjöhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KEhjÉhžhubh¸)”}”(hŒoNon-zero tags are never preserved in sigcontext.fault_address regardless of the SA_EXPOSE_TAGBITS flag setting.”h]”hŒoNon-zero tags are never preserved in sigcontext.fault_address regardless of the SA_EXPOSE_TAGBITS flag setting.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KIhjÉhžhubh¸)”}”(hŒ‚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.”h]”hŒ‚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.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KLhjÉhžhubh¸)”}”(hŒLThis behaviour is maintained when the AArch64 Tagged Address ABI is enabled.”h]”hŒLThis behaviour is maintained when the AArch64 Tagged Address ABI is enabled.”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KOhjÉhžhubeh}”(h]”Œpreserving-tags”ah ]”h"]”Œpreserving tags”ah$]”h&]”uh1h¡hh£hžhhŸh¶h K6ubh¢)”}”(hhh]”(h§)”}”(hŒOther considerations”h]”hŒOther considerations”…””}”(hj9hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj6hžhhŸh¶h KTubh¸)”}”(hŒ¤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.”h]”hŒ¤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.”…””}”(hjGhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KVhj6hžhubeh}”(h]”Œother-considerations”ah ]”h"]”Œother considerations”ah$]”h&]”uh1h¡hh£hžhhŸh¶h KTubeh}”(h]”Œ)tagged-virtual-addresses-in-aarch64-linux”ah ]”h"]”Œ)tagged virtual addresses in aarch64 linux”ah$]”h&]”uh1h¡hhhžhhŸh¶h Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”h¶uh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(h¦NŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jˆŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”h¶Œ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jbj_jÆjÃj3j0jZjWuŒ nametypes”}”(jb‰jƉj3‰jZ‰uh}”(j_h£jÃjj0jÉjWj6uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.