Page MenuHomePhabricator

eugenis (Evgenii Stepanov)
User

Projects

User does not belong to any projects.

User Details

User Since
Oct 3 2012, 3:00 AM (359 w, 2 d)

Recent Activity

Today

eugenis accepted D65322: [asan_symbolize] Avoid blocking when llvm-symbolizer is installed as addr2line.

LGTM

Fri, Aug 23, 10:54 AM · Restricted Project, Restricted Project

Yesterday

eugenis accepted D66377: hwasan: Untag unwound stack frames by wrapping personality functions..

LGTM

Thu, Aug 22, 5:58 PM · Restricted Project, Restricted Project
eugenis added a comment to D66377: hwasan: Untag unwound stack frames by wrapping personality functions..

What's the binary size overhead? I assume most of it comes from adding personality functions to noexcept but !nounwind functions?

Thu, Aug 22, 4:51 PM · Restricted Project, Restricted Project

Mon, Aug 19

eugenis created D66457: MemTag: unchecked load/store optimization..
Mon, Aug 19, 6:33 PM · Restricted Project
eugenis committed rG55ccd16354d9: Refactor isPointerOffset (NFC). (authored by eugenis).
Refactor isPointerOffset (NFC).
Mon, Aug 19, 2:13 PM
eugenis committed rL369300: Refactor isPointerOffset (NFC)..
Refactor isPointerOffset (NFC).
Mon, Aug 19, 2:11 PM
eugenis closed D66317: Refactor isPointerOffset (NFC)..
Mon, Aug 19, 2:11 PM · Restricted Project
eugenis updated the diff for D66317: Refactor isPointerOffset (NFC)..

address comments

Mon, Aug 19, 2:08 PM · Restricted Project
eugenis committed rG50affbe47fc9: MemTag: stack initializer merging. (authored by eugenis).
MemTag: stack initializer merging.
Mon, Aug 19, 1:50 PM
eugenis committed rL369297: MemTag: stack initializer merging..
MemTag: stack initializer merging.
Mon, Aug 19, 1:46 PM
eugenis closed D66167: MemTag: stack initializer merging..
Mon, Aug 19, 1:46 PM · Restricted Project
eugenis updated the diff for D66167: MemTag: stack initializer merging..

addressed review comments

Mon, Aug 19, 1:31 PM · Restricted Project
eugenis added a comment to rL366708: Revert "Reland [ELF] Loose a condition for relocation with a symbol".

We are still interested in gold compatibility, I think.

Mon, Aug 19, 11:06 AM

Fri, Aug 16

eugenis committed rL369178: Add sanitizer-aarch64-linux-mte builder..
Add sanitizer-aarch64-linux-mte builder.
Fri, Aug 16, 5:15 PM
eugenis closed D66375: Add sanitizer-aarch64-linux-mte builder..
Fri, Aug 16, 5:15 PM · Restricted Project
eugenis updated the diff for D66375: Add sanitizer-aarch64-linux-mte builder..

.

Fri, Aug 16, 5:14 PM · Restricted Project
eugenis created D66375: Add sanitizer-aarch64-linux-mte builder..
Fri, Aug 16, 5:06 PM · Restricted Project
eugenis committed rL369176: Add "sanitizer-aarch64-linux-mte" build script..
Add "sanitizer-aarch64-linux-mte" build script.
Fri, Aug 16, 4:56 PM
eugenis added a comment to D66337: [AArch64InstrInfo] Stop getInstSizeInBytes returning non-zero for meta instructions..

I've committed a better fix in r369138.

Fri, Aug 16, 11:25 AM · Restricted Project
eugenis committed rG187c63f14539: Escape % in printf format string. (authored by eugenis).
Escape % in printf format string.
Fri, Aug 16, 11:24 AM
eugenis committed rL369138: Escape % in printf format string..
Escape % in printf format string.
Fri, Aug 16, 11:24 AM

Thu, Aug 15

eugenis added a comment to D66189: [GWP-ASan] Implement stack frame compression..

This build is on r369069 and still has the problem:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-android/builds/23577

Thu, Aug 15, 6:03 PM · Restricted Project, Restricted Project
eugenis added inline comments to D66167: MemTag: stack initializer merging..
Thu, Aug 15, 4:54 PM · Restricted Project
eugenis created D66317: Refactor isPointerOffset (NFC)..
Thu, Aug 15, 4:03 PM · Restricted Project
eugenis committed rG75344955fcd4: Move isPointerOffset function to ValueTracking (NFC). (authored by eugenis).
Move isPointerOffset function to ValueTracking (NFC).
Thu, Aug 15, 4:02 PM
eugenis closed D66165: Move isPointerOffset function to ValueTracking..
Thu, Aug 15, 4:01 PM · Restricted Project
eugenis committed rL369062: Move isPointerOffset function to ValueTracking (NFC)..
Move isPointerOffset function to ValueTracking (NFC).
Thu, Aug 15, 4:01 PM
eugenis committed rG10ce5f88d138: Add missing MIR serialization text for AArch64II::MO_TAGGED. (authored by eugenis).
Add missing MIR serialization text for AArch64II::MO_TAGGED.
Thu, Aug 15, 3:08 PM
eugenis committed rL369053: Add missing MIR serialization text for AArch64II::MO_TAGGED..
Add missing MIR serialization text for AArch64II::MO_TAGGED.
Thu, Aug 15, 3:03 PM
eugenis closed D66312: Add missing MIR serialization text for AArch64II::MO_TAGGED..
Thu, Aug 15, 3:03 PM · Restricted Project
eugenis added a comment to D66165: Move isPointerOffset function to ValueTracking..

I'll submit this as is and then refactor in a follow up.
Thanks!

Thu, Aug 15, 2:59 PM · Restricted Project
eugenis created D66312: Add missing MIR serialization text for AArch64II::MO_TAGGED..
Thu, Aug 15, 2:51 PM · Restricted Project

Tue, Aug 13

eugenis created D66167: MemTag: stack initializer merging..
Tue, Aug 13, 2:06 PM · Restricted Project
eugenis created D66165: Move isPointerOffset function to ValueTracking..
Tue, Aug 13, 2:06 PM · Restricted Project

Mon, Aug 12

eugenis added a comment to D24035: [AMDGPU] Printf runtime binding pass.

It's a bit hard to use, you need to build libcxx/libcxxabi with msan as well.
See here:
https://github.com/google/sanitizers/wiki/MemorySanitizerBootstrappingClang

Mon, Aug 12, 5:36 PM · Restricted Project
eugenis added a comment to D24035: [AMDGPU] Printf runtime binding pass.

Hi, MSan is complaining about this change:

28574==WARNING: MemorySanitizer: use-of-uninitialized-value

#0 0x130075d in (anonymous namespace)::AMDGPUPrintfRuntimeBinding::lowerPrintfForGpu(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp:576:39
#1 0x12f8287 in (anonymous namespace)::AMDGPUPrintfRuntimeBinding::runOnModule(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp:613:10
#2 0x544a96d in runOnModule /b/sanitizer-x86_64-linux-fast/build/llvm/lib/IR/LegacyPassManager.cpp:1750:27
#3 0x544a96d in llvm::legacy::PassManagerImpl::run(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm/lib/IR/LegacyPassManager.cpp:1863
#4 0x9e58b7 in main /b/sanitizer-x86_64-linux-fast/build/llvm/tools/opt/opt.cpp:892:12
#5 0x7f84fa91f2e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
#6 0x91ce99 in _start (/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/opt+0x91ce99)
Mon, Aug 12, 5:00 PM · Restricted Project

Fri, Aug 9

eugenis accepted D65629: cfi-icall: Allow the jump table to be optionally made non-canonical..

LGTM

Fri, Aug 9, 3:09 PM · Restricted Project, Restricted Project
eugenis added inline comments to D65629: cfi-icall: Allow the jump table to be optionally made non-canonical..
Fri, Aug 9, 11:12 AM · Restricted Project, Restricted Project
eugenis accepted D65508: [AArch64] Make the memtag sanitizer require the memtag extension.

LGTM

Fri, Aug 9, 9:40 AM · Restricted Project

Thu, Aug 8

eugenis committed rGdb0e1a9197ed: Fix llvm.aarch64.irg properties. (authored by eugenis).
Fix llvm.aarch64.irg properties.
Thu, Aug 8, 3:43 PM
eugenis committed rL368362: Fix llvm.aarch64.irg properties..
Fix llvm.aarch64.irg properties.
Thu, Aug 8, 3:42 PM
eugenis closed D64447: Fix llvm.aarch64.irg properties..
Thu, Aug 8, 3:42 PM · Restricted Project
eugenis accepted D65642: Enable memtag sanitizer in all AArch64 toolchains .

LGTM

Thu, Aug 8, 3:21 PM · Restricted Project
eugenis added inline comments to D65508: [AArch64] Make the memtag sanitizer require the memtag extension.
Thu, Aug 8, 3:20 PM · Restricted Project
eugenis accepted D65968: hwasan: Add a code model check for tagged globals..

LGTM

Thu, Aug 8, 2:00 PM · Restricted Project, Restricted Project

Jul 18 2019

eugenis accepted D64951: CodeGen: Allow !associated metadata to point to aliases..

LGTM

Jul 18 2019, 2:34 PM · Restricted Project

Jul 17 2019

eugenis updated the diff for D64447: Fix llvm.aarch64.irg properties..

added a test

Jul 17 2019, 6:19 PM · Restricted Project
eugenis committed rG6abd78cc7c97: Make DT a transitive dependency of LI. (authored by eugenis).
Make DT a transitive dependency of LI.
Jul 17 2019, 4:34 PM
eugenis committed rL366388: Make DT a transitive dependency of LI..
Make DT a transitive dependency of LI.
Jul 17 2019, 4:32 PM
eugenis closed D64896: Make DT a transitive dependency of LI..
Jul 17 2019, 4:32 PM · Restricted Project
eugenis accepted D64890: hwasan: Use C++ driver for cfi.cc test..

LGTM

Jul 17 2019, 4:30 PM · Restricted Project, Restricted Project
eugenis added a comment to D64896: Make DT a transitive dependency of LI..

This fixes http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/18689.
I've added a pass that preservesCFG; following passes use LI but not DT. Without the transitive dependency, the pass manager kills DT before my pass as there are no future users, but then calls LoopInfoWrapperPass::verify that assumes that DT is still alive.

Jul 17 2019, 4:23 PM · Restricted Project
eugenis created D64896: Make DT a transitive dependency of LI..
Jul 17 2019, 4:22 PM · Restricted Project
eugenis committed rGf45fd429b718: Speculative fix for stack-tagging.ll failure. (authored by eugenis).
Speculative fix for stack-tagging.ll failure.
Jul 17 2019, 2:32 PM
eugenis committed rL366375: Speculative fix for stack-tagging.ll failure..
Speculative fix for stack-tagging.ll failure.
Jul 17 2019, 2:31 PM
eugenis accepted D64843: hwasan: Initialize the pass only once..

OK, sure.
As I understand functon passes also have better data locality by running a sequence of passes over a single function. Not sure how important that is.
LGTM

Jul 17 2019, 1:32 PM · Restricted Project, Restricted Project
eugenis updated subscribers of D64843: hwasan: Initialize the pass only once..

I don't know what is the best practice here. Other sanitizers have both module and function passes, is there a reason to do things differently here?
@chandlerc

Jul 17 2019, 12:40 PM · Restricted Project, Restricted Project
eugenis committed rGd752f5e95309: Basic codegen for MTE stack tagging. (authored by eugenis).
Basic codegen for MTE stack tagging.
Jul 17 2019, 12:33 PM
eugenis committed rG851339fb2952: Basic MTE stack tagging instrumentation. (authored by eugenis).
Basic MTE stack tagging instrumentation.
Jul 17 2019, 12:33 PM
eugenis committed rL366360: Basic codegen for MTE stack tagging..
Basic codegen for MTE stack tagging.
Jul 17 2019, 12:29 PM
eugenis closed D64172: Basic codegen for MTE stack tagging..
Jul 17 2019, 12:29 PM · Restricted Project
eugenis committed rL366361: Basic MTE stack tagging instrumentation..
Basic MTE stack tagging instrumentation.
Jul 17 2019, 12:28 PM
eugenis closed D64173: Basic MTE stack tagging instrumentation..
Jul 17 2019, 12:28 PM · Restricted Project
eugenis added a comment to D64299: Make ~mutex and ~condition_variable trivial with Bionic pthreads.

This feels like the right trade-off.

TSan should be fine with a mutex that is never destroyed, but it will not be able to catch lock-after-destroy bugs on such mutex obviously.
@dvyukov

Effectively pthread_mutex_destroy is not trivial under tsan so, yes, there will be a number of negative consequences:

  • no lock-after-destroy races
  • no races between lock/unlock and a subsequent destory
  • no racy use-after-free detection for destroy vs free
  • incorrect stack trace for a mutex that happened to reuse the address later
  • resource leaks for mutexes
  • no reporting of unlock of locked mutex
  • no auto-unlock for destroyed mutexes, which will look like the thread is taking infinite number of locks recursively, which will quickly check-fail in deadlock detector
Jul 17 2019, 12:17 PM

Jul 16 2019

eugenis accepted D64794: [sanitizer_common] Don't initialize interceptor_metadata_map unless SI_POSIX is set.

LGTM

Jul 16 2019, 2:25 PM · Restricted Project
eugenis updated subscribers of D64299: Make ~mutex and ~condition_variable trivial with Bionic pthreads.

This feels like the right trade-off.

Jul 16 2019, 1:57 PM

Jul 15 2019

eugenis accepted D64783: hwasan: Pad arrays with non-1 size correctly..

LGTM

Jul 15 2019, 6:21 PM · Restricted Project
eugenis updated the diff for D64173: Basic MTE stack tagging instrumentation..

.

Jul 15 2019, 6:19 PM · Restricted Project
eugenis added inline comments to D64173: Basic MTE stack tagging instrumentation..
Jul 15 2019, 6:12 PM · Restricted Project
eugenis updated the diff for D64173: Basic MTE stack tagging instrumentation..

address review comments

Jul 15 2019, 6:10 PM · Restricted Project
eugenis committed rGc5e7f5624966: ARM MTE stack sanitizer. (authored by eugenis).
ARM MTE stack sanitizer.
Jul 15 2019, 1:05 PM
eugenis committed rL366123: ARM MTE stack sanitizer..
ARM MTE stack sanitizer.
Jul 15 2019, 1:05 PM
eugenis closed D64169: ARM MTE stack sanitizer..
Jul 15 2019, 1:05 PM · Restricted Project, Restricted Project
eugenis accepted D61479: Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO".

LGTM, but please update the summary:

An alternative would be to disallow -fsanitize=function ...
Jul 15 2019, 12:43 PM · Restricted Project, Restricted Project, Restricted Project

Jul 12 2019

eugenis committed rG41c22b4390c7: Extend function attributes bitset size from 64 to 96. (authored by eugenis).
Extend function attributes bitset size from 64 to 96.
Jul 12 2019, 5:33 PM
eugenis committed rL365980: Extend function attributes bitset size from 64 to 96..
Extend function attributes bitset size from 64 to 96.
Jul 12 2019, 5:29 PM
eugenis closed D64663: Extend function attributes bitset size from 64 to 96..
Jul 12 2019, 5:28 PM · Restricted Project
eugenis added a comment to D64663: Extend function attributes bitset size from 64 to 96..

Tested by adding a bunch of fake attributes at the beginning to push the interesting ones out of 0..64 range, and also with ASan.

Jul 12 2019, 5:25 PM · Restricted Project
eugenis updated the diff for D64663: Extend function attributes bitset size from 64 to 96..

oops, found another place to update

Jul 12 2019, 3:22 PM · Restricted Project
eugenis added inline comments to D64173: Basic MTE stack tagging instrumentation..
Jul 12 2019, 2:50 PM · Restricted Project
eugenis added a comment to D64663: Extend function attributes bitset size from 64 to 96..
In D64663#1583672, @pcc wrote:

I would prefer to keep this the way it is with an array so that it is obvious what the size/alignment are.

It would be good to have a static assertion of some sort, though. It looks like Attribute::EndAttrKinds could be used for this purpose.

Jul 12 2019, 2:44 PM · Restricted Project
eugenis committed rG32452487ae99: Factor out resolveFrameOffsetReference (NFC). (authored by eugenis).
Factor out resolveFrameOffsetReference (NFC).
Jul 12 2019, 2:16 PM
eugenis committed rL365958: Factor out resolveFrameOffsetReference (NFC)..
Factor out resolveFrameOffsetReference (NFC).
Jul 12 2019, 2:15 PM
eugenis closed D64171: Factor out resolveFrameOffsetReference..
Jul 12 2019, 2:15 PM · Restricted Project
eugenis added inline comments to D64169: ARM MTE stack sanitizer..
Jul 12 2019, 2:02 PM · Restricted Project, Restricted Project
eugenis added inline comments to D64111: Add getMostFrequentByte and use for isBytewiseValue implementation.
Jul 12 2019, 1:59 PM · Restricted Project
eugenis added a comment to D64663: Extend function attributes bitset size from 64 to 96..

std::bitset is word-aligned at least in libc++ implementation, so it would waste 4 bytes here.
SmallBitVector has only 64 bits of inline storage.

Jul 12 2019, 1:58 PM · Restricted Project
eugenis updated the diff for D64169: ARM MTE stack sanitizer..

addressed review comments

Jul 12 2019, 1:35 PM · Restricted Project, Restricted Project
eugenis added a comment to D64663: Extend function attributes bitset size from 64 to 96..

It's sanitize_memtag in the child revision.
Actually, we were fine without this until your change on Jule 10 pushed our pending attribute over the limit :)

Jul 12 2019, 1:24 PM · Restricted Project
eugenis added a parent revision for D64169: ARM MTE stack sanitizer.: D64663: Extend function attributes bitset size from 64 to 96..
Jul 12 2019, 1:06 PM · Restricted Project, Restricted Project
eugenis added a child revision for D64663: Extend function attributes bitset size from 64 to 96.: D64169: ARM MTE stack sanitizer..
Jul 12 2019, 1:06 PM · Restricted Project
eugenis added a comment to D64663: Extend function attributes bitset size from 64 to 96..

I've moved the bitset into the padding of NumAttrSets so hopefully this will not waste any memory.

Jul 12 2019, 1:04 PM · Restricted Project
eugenis created D64663: Extend function attributes bitset size from 64 to 96..
Jul 12 2019, 1:03 PM · Restricted Project

Jul 11 2019

eugenis added a comment to D64172: Basic codegen for MTE stack tagging..

PTAL. I've added tests for various frame layouts. Stg offset overflow is covered by existing tests (settag.ll).

Jul 11 2019, 6:28 PM · Restricted Project
eugenis updated the diff for D64172: Basic codegen for MTE stack tagging..

Made aarch64.irg.sp IntrInaccessibleMemOnly cause it has side effects.
Simplified SDAG a little by matching intrinsic directly w/o going through an SDag node for IRGstack.
Added a bunch of tests.

Jul 11 2019, 6:22 PM · Restricted Project
eugenis added a comment to D64111: Add getMostFrequentByte and use for isBytewiseValue implementation.

I'm a bit worried about performance implications.
isBytewiseValue is now doing some clearly unnecessary work.
Could you sanity check that it does not affect compilation times?

Jul 11 2019, 2:55 PM · Restricted Project
eugenis added a comment to D64052: Return Undef from isBytewiseValue for empty arrays or structs.

This is not a lot of code, so LGTM, but I agree that constant folding would be even better.

Jul 11 2019, 2:08 PM · Restricted Project
eugenis added a comment to D64031: isBytewiseValue checks ConstantVector element by element.

This seems correct. Any idea why it has not been done this way from the start?

Jul 11 2019, 2:08 PM · Restricted Project
eugenis accepted D63967: Handle IntToPtr in isBytewiseValue.

LGTM

Jul 11 2019, 2:02 PM · Restricted Project, Restricted Project
eugenis accepted D40943: Enable compiler-rt on SPARC.

LGTM

Jul 11 2019, 12:11 PM · Restricted Project, Restricted Project