|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
| #
7ced9fff |
| 14-Jul-2022 |
Jonas Devlieghere <[email protected]> |
[lldb] Refactor command option enum values (NFC)
Refactor the command option enum values and the command argument table to connect the two. This has two benefits:
- We guarantee that two options t
[lldb] Refactor command option enum values (NFC)
Refactor the command option enum values and the command argument table to connect the two. This has two benefits:
- We guarantee that two options that use the same argument type have the same accepted values. - We can print the enum values and their description in the help output. (D129707)
Differential revision: https://reviews.llvm.org/D129703
show more ...
|
|
Revision tags: llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1 |
|
| #
24f9a2f5 |
| 31-Mar-2022 |
Shafik Yaghmour <[email protected]> |
[LLDB] Applying clang-tidy modernize-use-equals-default over LLDB
Applied modernize-use-equals-default clang-tidy check over LLDB.
This check is already present in the lldb/.clang-tidy config.
Dif
[LLDB] Applying clang-tidy modernize-use-equals-default over LLDB
Applied modernize-use-equals-default clang-tidy check over LLDB.
This check is already present in the lldb/.clang-tidy config.
Differential Revision: https://reviews.llvm.org/D121844
show more ...
|
| #
28c878ae |
| 14-Mar-2022 |
Shafik Yaghmour <[email protected]> |
[LLDB] Applying clang-tidy modernize-use-default-member-init over LLDB
Applied modernize-use-default-member-init clang-tidy check over LLDB. It appears in many files we had already switched to in cl
[LLDB] Applying clang-tidy modernize-use-default-member-init over LLDB
Applied modernize-use-default-member-init clang-tidy check over LLDB. It appears in many files we had already switched to in class member init but never updated the constructors to reflect that. This check is already present in the lldb/.clang-tidy config.
Differential Revision: https://reviews.llvm.org/D121481
show more ...
|
|
Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init |
|
| #
abb0ed44 |
| 23-Jan-2022 |
Kazu Hirata <[email protected]> |
[Commands] Remove redundant member initialization (NFC)
Identified with readability-redundant-member-init.
|
|
Revision tags: llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2 |
|
| #
787f91b0 |
| 12-Jan-2022 |
David Spickett <[email protected]> |
[lldb] Remove non-address bits from addresses given to memory tag commands
Although the memory tag commands use a memory tag manager to handle addresses, that only removes the top byte.
That top by
[lldb] Remove non-address bits from addresses given to memory tag commands
Although the memory tag commands use a memory tag manager to handle addresses, that only removes the top byte.
That top byte is 4 bits of memory tag and 4 free bits, which is more than it should strictly remove but that's how it is for now.
There are other non-address bit uses like pointer authentication. To ensure the memory tag manager only has to deal with memory tags, use the ABI plugin to remove the rest.
The tag access test has been updated to sign all the relevant pointers and require that we're running on a system with pointer authentication in addition to memory tagging.
The pointers will look like: <4 bit user tag><4 bit memory tag><signature><bit virtual address>
Note that there is currently no API for reading memory tags. It will also have to consider this when it arrives.
Reviewed By: omjavaid
Differential Revision: https://reviews.llvm.org/D117672
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1 |
|
| #
98b5659b |
| 12-Apr-2021 |
David Spickett <[email protected]> |
[lldb][AArch64] Mark mismatched tags in tag read output
The "memory tag read" command will now tell you when the allocation tag read does not match the logical tag.
(lldb) memory tag read mte_buf+(
[lldb][AArch64] Mark mismatched tags in tag read output
The "memory tag read" command will now tell you when the allocation tag read does not match the logical tag.
(lldb) memory tag read mte_buf+(8*16) mte_buf+(8*16)+48 Logical tag: 0x9 Allocation tags: [0xfffff7ff7080, 0xfffff7ff7090): 0x8 (mismatch) [0xfffff7ff7090, 0xfffff7ff70a0): 0x9 [0xfffff7ff70a0, 0xfffff7ff70b0): 0xa (mismatch)
The logical tag will be taken from the start address so the end could have a different tag. You could for example read from ptr_to_array_1 to ptr_to_array_2. Where the latter is tagged differently to prevent buffer overflow.
The existing command will read 1 granule if you leave off the end address. So you can also use it as a quick way to check a single location.
(lldb) memory tag read mte_buf Logical tag: 0x9 Allocation tags: [0xfffff7ff7000, 0xfffff7ff7010): 0x0 (mismatch)
This avoids the need for a seperate "memory tag check" command.
Reviewed By: omjavaid
Differential Revision: https://reviews.llvm.org/D106880
show more ...
|
|
Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4 |
|
| #
6eded00e |
| 30-Mar-2021 |
David Spickett <[email protected]> |
[lldb] Add "memory tag write" --end-addr option
The default mode of "memory tag write" is to calculate the range from the start address and the number of tags given. (just like "memory write" does)
[lldb] Add "memory tag write" --end-addr option
The default mode of "memory tag write" is to calculate the range from the start address and the number of tags given. (just like "memory write" does)
(lldb) memory tag write mte_buf 1 2 (lldb) memory tag read mte_buf mte_buf+48 Logical tag: 0x0 Allocation tags: [0xfffff7ff9000, 0xfffff7ff9010): 0x1 [0xfffff7ff9010, 0xfffff7ff9020): 0x2 [0xfffff7ff9020, 0xfffff7ff9030): 0x0
This new option allows you to set an end address and have the tags repeat until that point.
(lldb) memory tag write mte_buf 1 2 --end-addr mte_buf+64 (lldb) memory tag read mte_buf mte_buf+80 Logical tag: 0x0 Allocation tags: [0xfffff7ff9000, 0xfffff7ff9010): 0x1 [0xfffff7ff9010, 0xfffff7ff9020): 0x2 [0xfffff7ff9020, 0xfffff7ff9030): 0x1 [0xfffff7ff9030, 0xfffff7ff9040): 0x2 [0xfffff7ff9040, 0xfffff7ff9050): 0x0
This is implemented using the QMemTags packet previously added. We skip validating the number of tags in lldb and send them on to lldb-server, which repeats them as needed.
Apart from the number of tags, all the other client side checks remain. Tag values, memory range must be tagged, etc.
Reviewed By: omjavaid
Differential Revision: https://reviews.llvm.org/D105183
show more ...
|
| #
6a7a2ee8 |
| 31-Mar-2021 |
David Spickett <[email protected]> |
[lldb] Add "memory tag write" command
This adds a new command for writing memory tags. It is based on the existing "memory write" command.
Syntax: memory tag write <address-expression> <value> [<va
[lldb] Add "memory tag write" command
This adds a new command for writing memory tags. It is based on the existing "memory write" command.
Syntax: memory tag write <address-expression> <value> [<value> [...]] (where "value" is a tag value)
(lldb) memory tag write mte_buf 1 2 (lldb) memory tag read mte_buf mte_buf+32 Logical tag: 0x0 Allocation tags: [0xfffff7ff9000, 0xfffff7ff9010): 0x1 [0xfffff7ff9010, 0xfffff7ff9020): 0x2
The range you are writing to will be calculated by aligning the address down to a granule boundary then adding as many granules as there are tags.
(a repeating mode with an end address will be in a follow up patch)
This is why "memory tag write" uses MakeTaggedRange but has some extra steps to get this specific behaviour.
The command does all the usual argument validation: * Address must evaluate * You must supply at least one tag value (though lldb-server would just treat that as a nop anyway) * Those tag values must be valid for your tagging scheme (e.g. for MTE the value must be > 0 and < 0xf) * The calculated range must be memory tagged
That last error will show you the final range, not just the start address you gave the command.
(lldb) memory tag write mte_buf_2+page_size-16 6 (lldb) memory tag write mte_buf_2+page_size-16 6 7 error: Address range 0xfffff7ffaff0:0xfffff7ffb010 is not in a memory tagged region
(note that we do not check if the region is writeable since lldb can write to it anyway)
The read and write tag tests have been merged into a single set of "tag access" tests as their test programs would have been almost identical. (also I have renamed some of the buffers to better show what each one is used for)
Reviewed By: omjavaid
Differential Revision: https://reviews.llvm.org/D105182
show more ...
|
| #
d046fb62 |
| 08-Jul-2021 |
David Spickett <[email protected]> |
[lldb][AArch64] Refactor memory tag range handling
Previously GetMemoryTagManager checked many things in one: * architecture supports memory tagging * process supports memory tagging * memory range
[lldb][AArch64] Refactor memory tag range handling
Previously GetMemoryTagManager checked many things in one: * architecture supports memory tagging * process supports memory tagging * memory range isn't inverted * memory range is all tagged
Since writing follow up patches for tag writing (in review at the moment) it has become clear that this gets unwieldy once we add the features needed for that.
It also implies that the memory tag manager is tied to the range you used to request it with but it is not. It's a per process object.
Instead: * GetMemoryTagManager just checks architecture and process. * Then the MemoryTagManager can later be asked to check a memory range.
This is better because: * We don't imply that range and manager are tied together. * A slightly diferent range calculation for tag writing doesn't add more code to Process. * Range checking code can now be unit tested.
Reviewed By: omjavaid
Differential Revision: https://reviews.llvm.org/D105630
show more ...
|
|
Revision tags: llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2 |
|
| #
31f9960c |
| 19-Feb-2021 |
David Spickett <[email protected]> |
[lldb][AArch64] Add "memory tag read" command
This new command looks much like "memory read" and mirrors its basic behaviour.
(lldb) memory tag read new_buf_ptr new_buf_ptr+32 Logical tag: 0x9 Allo
[lldb][AArch64] Add "memory tag read" command
This new command looks much like "memory read" and mirrors its basic behaviour.
(lldb) memory tag read new_buf_ptr new_buf_ptr+32 Logical tag: 0x9 Allocation tags: [0x900fffff7ffa000, 0x900fffff7ffa010): 0x9 [0x900fffff7ffa010, 0x900fffff7ffa020): 0x0
Important proprties: * The end address is optional and defaults to reading 1 tag if ommitted * It is an error to try to read tags if the architecture or process doesn't support it, or if the range asked for is not tagged. * It is an error to read an inverted range (end < begin) (logical tags are removed for this check so you can pass tagged addresses here) * The range will be expanded to fit the tagging granule, so you can get more tags than simply (end-begin)/granule size. Whatever you get back will always cover the original range.
Reviewed By: omjavaid
Differential Revision: https://reviews.llvm.org/D97285
show more ...
|