• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

修訂bfebd6b058af2f9eeb32af05d7a32422eb4af0b9 (tree)
時間2020-06-16 21:58:33
作者Luis Machado <luis.machado@lina...>
CommiterLuis Machado

Log Message

Documentation for the new mtag commands

Document the new "mtag" command prefix and all of its subcommands.

gdb/doc/ChangeLog:

YYYY-MM-DD Luis Machado <luis.machado@linaro.org>

* gdb.textinfo (Memory Tagging): New subsection.
(AArch64 Memory Tagging Extension): New subsection.

Change Summary

差異

--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -10714,6 +10714,49 @@ target supports computing the CRC checksum of a block of memory
1071410714 (@pxref{qCRC packet}).
1071510715 @end table
1071610716
10717+@subsection Memory Tagging
10718+
10719+Memory tagging is a memory protection technology that validates accesses
10720+through pointers via a tag. Both the pointer tag and the memory tag in the
10721+physical address space must match for the memory access to be validated.
10722+
10723+There are two types of tags: logical and allocation. The logical tag is
10724+stored in the pointers themselves. The allocation tag is the tag associated
10725+with the physical address space, against which the logical tags from pointers
10726+are validated.
10727+
10728+If the underlying architecture supports memory tagging, like AArch64,
10729+@value{GDBN} can make use of it to validate addresses and pointers against
10730+memory allocation tags.
10731+
10732+A command prefix of @code{mtag} gives access to the various memory tagging
10733+commands.
10734+
10735+The @code{mtag} commands are the following:
10736+
10737+@table @code
10738+@kindex mtag showltag
10739+@item mtag showltag @var{address_expression}
10740+Show the logical tag contained in the pointer resulting from evaluating the
10741+argument expression.
10742+@kindex mtag setltag
10743+@item mtag setltag @var{address_expression} @var{tag_bytes}
10744+Print the resulting pointer from evaluating the argument expression with a
10745+logical tag of @var{tag_bytes}.
10746+@kindex mtag showatag
10747+@item mtag showatag @var{address_expression}
10748+Show the allocation tag from the memory address pointed to by the evaluation
10749+of the argument expression.
10750+@kindex mtag setatag
10751+@item mtag setatag @var{starting_address} @var{length} @var{tag_bytes}
10752+Set the allocation tag for memory range @r{[}@var{starting_address},
10753+@var{starting_address} + @var{length}@r{)} to @var{tag_bytes}.
10754+@kindex mtag check
10755+@item mtag check @var{address_expression}
10756+Given the pointer resulting from evaluating the argument expression, check that
10757+the logical tag and the allocation tags match.
10758+@end table
10759+
1071710760 @node Auto Display
1071810761 @section Automatic Display
1071910762 @cindex automatic display
@@ -24753,6 +24796,21 @@ When GDB prints a backtrace, any addresses that required unmasking will be
2475324796 postfixed with the marker [PAC]. When using the MI, this is printed as part
2475424797 of the @code{addr_flags} field.
2475524798
24799+@subsubsection AArch64 Memory Tagging Extension.
24800+@cindex AArch64 Memory Tagging Extension.
24801+
24802+When @value{GDBN} is debugging the AArch64 architecture, the program is
24803+using the v8.5-A feature Memory Tagging Extension (MTE) and there is support
24804+in the kernel for MTE, @value{GDBN} will make memory tagging functionality
24805+available for inspection and editing of logical and allocation tags.
24806+
24807+@value{GDBN} will also output additional information for memory tag
24808+violations, which come as SIGSEGV signals, so developers can have a clue
24809+about what caused the crash. The logical and allocation tags will be shown
24810+alongside the fault address, if available.
24811+
24812+A new register set is made available through the MTE feature.
24813+
2475624814 @node i386
2475724815 @subsection x86 Architecture-specific Issues
2475824816