diff options
author | Enna1 <xumingjie.enna1@bytedance.com> | 2023-05-27 10:27:28 +0800 |
---|---|---|
committer | Enna1 <xumingjie.enna1@bytedance.com> | 2023-05-27 10:27:50 +0800 |
commit | b33dcc5b1eda6a564138b0e86f726abf269fb561 (patch) | |
tree | 6bf248372de9c80d15e9c9b4d53cf97728895f28 /llvm/lib/CodeGen/MachineOperand.cpp | |
parent | af7aea365a2ae8dc51938a614353e1586072ef83 (diff) | |
download | llvm-b33dcc5b1eda6a564138b0e86f726abf269fb561.zip llvm-b33dcc5b1eda6a564138b0e86f726abf269fb561.tar.gz llvm-b33dcc5b1eda6a564138b0e86f726abf269fb561.tar.bz2 |
[hwasan] support hwasan-match-all-tag flag for callback memory access instrumentation
Currently, hwasan-match-all-tag flag is supported in inline memory access instrumentation and outline memory access instrumentation, but not supported in callback memory access instrumentation.
- For inline memory access instrumentation: a hwasan-match-all-tag check is added following the tag-mismtach check, if tag from pointer is mismatched with tag from shadow memory and tag from pointer is not equal with hwasan-match-all-tag, then a tag-mismatch will be report.
- For outline memory acess instrumentation: MatchAllTag is encoded in AccessInfo, when emit HWASAN memaccess symbols, asm-printer emits assembly instructions to check if tag from pointer is equal with hwasan-match-all-tag.
- For callback memory access instrumentation: hwasan-match-all-tag check is not implemented in `__hwasan_load`/`__hwasan_store`.
This patch implements a set of callback functions: `__hwasan_[load|store][1|2|4|8|16|n]_match_all` and `__hwasan_load[load|store][1|2|4|8|16|n]_match_all_noabort`, making hwasan-match-all-tag flag working for callback memory access instrumentation.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D149580
Diffstat (limited to 'llvm/lib/CodeGen/MachineOperand.cpp')
0 files changed, 0 insertions, 0 deletions