[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-04-08 Thread Mitch Phillips via Phabricator via cfe-commits
hctim added a comment. Thanks, I'll take a look. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118948/new/ https://reviews.llvm.org/D118948 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-04-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I'm sorry, but I had to revert this (in 4aaf25b4f7d7695ada313a3159d234b84d2896b2 ) as it broke the bots. https://lab.llvm.org/buildbot/#/builders/109/builds/36233 Repository: rG LLVM Github

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-04-08 Thread Mitch Phillips via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG8aa1490513f1: [MTE] Add -fsanitize=memtag* and friends. (authored by hctim). Changed prior to commit:

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-04-08 Thread Mitch Phillips via Phabricator via cfe-commits
hctim added inline comments. Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:475 def err_stack_tagging_requires_hardware_feature : Error< - "'-fsanitize=memtag' requires hardware support (+memtag)">; + "'-fsanitize=memtag-stack' requires hardware support

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-04-08 Thread Mitch Phillips via Phabricator via cfe-commits
hctim updated this revision to Diff 421593. hctim marked an inline comment as done. hctim added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118948/new/ https://reviews.llvm.org/D118948 Files:

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-04-08 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis accepted this revision. eugenis added a comment. LGTM Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:475 def err_stack_tagging_requires_hardware_feature : Error< - "'-fsanitize=memtag' requires hardware support (+memtag)">; +

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-04-08 Thread Mitch Phillips via Phabricator via cfe-commits
hctim added a comment. Over to @eugenis for any final touches Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118948/new/ https://reviews.llvm.org/D118948 ___ cfe-commits mailing list

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-04-08 Thread Mitch Phillips via Phabricator via cfe-commits
hctim updated this revision to Diff 421581. hctim added a comment. Comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118948/new/ https://reviews.llvm.org/D118948 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-04-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:475 def err_stack_tagging_requires_hardware_feature : Error< - "'-fsanitize=memtag' requires hardware

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-04-05 Thread Mitch Phillips via Phabricator via cfe-commits
hctim added a comment. In D118948#3428157 , @MaskRay wrote: > Since this driver option has no-op for glibc/musl/other ELF OS, by convention > it should report an `err_drv_unsupported_opt_for_target` error. > This allows configure-time detection. Done.

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-04-05 Thread Mitch Phillips via Phabricator via cfe-commits
hctim updated this revision to Diff 420590. hctim added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118948/new/ https://reviews.llvm.org/D118948 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-04-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D118948#3427401 , @hctim wrote: > In D118948#3427344 , @tschuett > wrote: > >> Is `-fsanitize=memtag-heap` Android specific or target independent? It >> passes Android flags to the

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-04-04 Thread Mitch Phillips via Phabricator via cfe-commits
hctim marked an inline comment as done. hctim added a comment. In D118948#3427344 , @tschuett wrote: > Is `-fsanitize=memtag-heap` Android specific or target independent? It passes > Android flags to the linker?!? The frontend flag should be

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-04-04 Thread Thorsten via Phabricator via cfe-commits
tschuett added a comment. Is `-fsanitize=memtag-heap` Android specific or target independent? It passes Android flags to the linker?!? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118948/new/ https://reviews.llvm.org/D118948

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-04-04 Thread Mitch Phillips via Phabricator via cfe-commits
hctim marked an inline comment as done. hctim added inline comments. Comment at: clang/test/Driver/memtag-ld.c:36 + +// CHECK-ASYNC: ld{{.*}} "-memtag-mode=async" +// CHECK-DEFAULT-MODE-NOT: ld{{.*}} "--android-memtag-mode= MaskRay wrote: > This will be easier

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-04-04 Thread Mitch Phillips via Phabricator via cfe-commits
hctim updated this revision to Diff 420274. hctim marked 2 inline comments as done. hctim added a comment. (comments) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118948/new/ https://reviews.llvm.org/D118948 Files:

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-04-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/CodeGen/memtag-attr.cpp:18 +// CHECK-NO-NOT: sanitize_memtag +// CHECK-NO-NEXT: define {{.*}}HasSanitizeMemTag +// CHECK-MEMTAG: Function Attrs: {{.*}} sanitize_memtag By placing a space before

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-04-01 Thread Mitch Phillips via Phabricator via cfe-commits
hctim updated this revision to Diff 419874. hctim marked an inline comment as done. hctim added a comment. (comments) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118948/new/ https://reviews.llvm.org/D118948 Files:

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-04-01 Thread Mitch Phillips via Phabricator via cfe-commits
hctim marked 7 inline comments as done. hctim added inline comments. Herald added a subscriber: StephenFan. Comment at: clang/test/Lexer/has_feature_memtag_stack.cpp:2 +// RUN: %clang_cc1 -E -fsanitize=memtag-stack %s -o - | FileCheck --check-prefix=CHECK-MEMTAG %s +// RUN:

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-03-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Driver/SanitizerArgs.h:67 + std::string MemtagMode = ""; + Comment at: clang/lib/Driver/SanitizerArgs.cpp:658 +

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-03-07 Thread Mitch Phillips via Phabricator via cfe-commits
hctim updated this revision to Diff 413625. hctim marked an inline comment as done. hctim added a comment. Herald added a project: All. Rebase onto D119384 , removing all the llvm and lld-specific parts. This patch now only contains the clang-specific bits.

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-02-09 Thread Mitch Phillips via Phabricator via cfe-commits
hctim planned changes to this revision. hctim marked 8 inline comments as done. hctim added a comment. Pushed the [1/3] ELF note parsing over to D119381 . Will leave this review for the clang-side changes, and send a new patch for the LLD changes. All of your

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-02-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: lld/ELF/Driver.cpp:690 +if (config->memtagStack || config->memtagHeap) + error("When using --memtag-stack or --memtag-heap, a --memtag-mode value " +"is required."); lld uses the diagnostic format

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-02-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D118948#3295589 , @hctim wrote: > In D118948#3295321 , @MaskRay wrote: > >> I haven't investigated the use case yet, just commented a few things. Please >> split the patch into 3: >>

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-02-08 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added inline comments. Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:475 def err_stack_tagging_requires_hardware_feature : Error< - "'-fsanitize=memtag' requires hardware support (+memtag)">; + "'-fsanitize=memtag-stack' requires hardware support

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-02-03 Thread Mitch Phillips via Phabricator via cfe-commits
hctim updated this revision to Diff 405842. hctim added a comment. (forgot to add REQUIRES: aarch64 to the lld test) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118948/new/ https://reviews.llvm.org/D118948 Files:

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-02-03 Thread Mitch Phillips via Phabricator via cfe-commits
hctim added a comment. In D118948#3295321 , @MaskRay wrote: > I haven't investigated the use case yet, just commented a few things. Please > split the patch into 3: > > - BinaryFormat/ELF.h (see an inline comment) > - lld/ELF > - clang Can you clarify

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-02-03 Thread Mitch Phillips via Phabricator via cfe-commits
hctim updated this revision to Diff 405839. hctim marked an inline comment as done. hctim added a comment. Address Ray's comments, and made it so that stack MTE doesn't imply heap. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118948/new/

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-02-03 Thread Mitch Phillips via Phabricator via cfe-commits
hctim marked 9 inline comments as done. hctim added inline comments. Comment at: llvm/include/llvm/BinaryFormat/ELF.h:1536 +enum { + NT_TYPE_IDENT = 1, + NT_TYPE_KUSER = 3, MaskRay wrote: > If Android wants to define notes, can it use a namespace

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-02-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: lld/ELF/SyntheticSections.cpp:3871 + return sizeof(llvm::ELF::Elf64_Nhdr) + + /* namesz */ sizeof(kMemtagAndroidNoteName) + + /* descsz */ sizeof(uint32_t); `/*namesz=*/` Comment at:

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-02-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I haven't investigated the use case yet, just commented a few things. Please split the patch into 3: - BinaryFormat/ELF.h (see an inline comment) - lld/ELF - clang Comment at: lld/ELF/SyntheticSections.cpp:3842 +static constexpr char

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-02-03 Thread Mitch Phillips via Phabricator via cfe-commits
hctim created this revision. hctim added a reviewer: eugenis. Herald added subscribers: dexonsmith, dang, arichardson, emaste. Herald added a reviewer: MaskRay. hctim requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits.