Page MenuHomePhabricator

eugenis (Evgenii Stepanov)
User

Projects

User does not belong to any projects.

User Details

User Since
Oct 3 2012, 3:00 AM (350 w, 6 d)

Recent Activity

Today

eugenis added inline comments to D63703: [stack-safety] Refactoring StackSafetyAnalysis to be accsessible from other passes.
Tue, Jun 25, 1:48 PM · Restricted Project
eugenis accepted D63736: [GWP-ASan] Guard against recursive allocs. Pack TLS for perf..

LGTM

Tue, Jun 25, 1:44 PM · Restricted Project, Restricted Project
eugenis accepted D63761: [compiler-rt][test] Set shared_libasan_path in test/asan/lit.cfg on Solaris.

LGTM

Tue, Jun 25, 1:38 PM · Restricted Project, Restricted Project

Yesterday

eugenis added a comment to D63736: [GWP-ASan] Guard against recursive allocs. Pack TLS for perf..

Do we need similar protection in deallocate?

We shouldn't need to. GPA::deallocate() may call malloc() and free(), but can only be called with guarded allocations. Recursion is okay (and desirable, as the unwinder's implementation is okay to be sampled) in deallocate().

Don't we hold the Mutex during AllocationMetadata::RecordDeallocation()? Doesn't that mean that the unwinder could cause deadlock during deallocation?

Mon, Jun 24, 3:33 PM · Restricted Project, Restricted Project
eugenis added a comment to D63736: [GWP-ASan] Guard against recursive allocs. Pack TLS for perf..

Do we need similar protection in deallocate?

Mon, Jun 24, 1:37 PM · Restricted Project, Restricted Project
eugenis added inline comments to D63736: [GWP-ASan] Guard against recursive allocs. Pack TLS for perf..
Mon, Jun 24, 1:20 PM · Restricted Project, Restricted Project
eugenis accepted D63468: llvm-symbolizer: Add a FRAME command..

LGTM

Mon, Jun 24, 11:17 AM · Restricted Project

Fri, Jun 21

eugenis accepted D63471: AArch64: Add support for reading pc using llvm.read_register..

LGTM

Fri, Jun 21, 7:19 PM · Restricted Project
eugenis added inline comments to D63470: hwasan: Remove the old frame descriptor mechanism..
Fri, Jun 21, 4:48 PM · Restricted Project
eugenis accepted D63472: hwasan: Use llvm.read_register intrinsic to read the PC on aarch64 instead of taking the function's address..

LGTM nice!

Fri, Jun 21, 4:13 PM · Restricted Project
eugenis accepted D63470: hwasan: Remove the old frame descriptor mechanism..

LGTM

Fri, Jun 21, 4:09 PM · Restricted Project
eugenis added a comment to D63468: llvm-symbolizer: Add a FRAME command..

More ideas for tests: multi dimensional arrays, two levels of inlining, lexical scopes.

Fri, Jun 21, 3:40 PM · Restricted Project
eugenis added a comment to D63469: hwasan: Teach the runtime to identify the local variable being accessed in UAR reports..

Please check what happens in "weird" cases with dynamic stack realignment or dynamic sp adjustment. If one or both of these cases can not be handled with this debug info format, can we at least avoid getting confused by them? Are we simply missing fp-offset in the debug info if the offset is not statically known? Add a test case.

Fri, Jun 21, 3:02 PM · Restricted Project, Restricted Project
eugenis accepted D63300: AArch64: Prefer FP-relative debug locations in HWASANified functions..

LGTM
I still think my suggestion for the name is best, but don't care about it too much.

Fri, Jun 21, 2:53 PM · Restricted Project
eugenis added inline comments to D63469: hwasan: Teach the runtime to identify the local variable being accessed in UAR reports..
Fri, Jun 21, 2:53 PM · Restricted Project, Restricted Project

Wed, Jun 19

eugenis accepted D63568: hwasan: Shrink outlined checks by 1 instruction..

LGTM

Wed, Jun 19, 1:28 PM · Restricted Project

Tue, Jun 18

eugenis committed rGc6b5be6cf078: Don't crash if PR_SET_VMA_ANON_NAME fails. (authored by eugenis).
Don't crash if PR_SET_VMA_ANON_NAME fails.
Tue, Jun 18, 4:51 PM
eugenis committed rL363755: Don't crash if PR_SET_VMA_ANON_NAME fails..
Don't crash if PR_SET_VMA_ANON_NAME fails.
Tue, Jun 18, 4:47 PM

Mon, Jun 17

eugenis accepted D63119: hwasan: Add a tag_offset DWARF attribute to instrumented stack variables..

LGTM

Mon, Jun 17, 4:22 PM · Restricted Project
eugenis accepted D63360: hwasan: Use bits [3..11) of the ring buffer entry address as the base stack tag..

LGTM

Mon, Jun 17, 4:06 PM · Restricted Project, Restricted Project
eugenis accepted D63460: [GWP-ASan] Disable GWP-ASan on Android for now..

LGTM

Mon, Jun 17, 3:29 PM · Restricted Project, Restricted Project
eugenis added inline comments to D63360: hwasan: Use bits [3..11) of the ring buffer entry address as the base stack tag..
Mon, Jun 17, 3:15 PM · Restricted Project, Restricted Project
eugenis added inline comments to D63360: hwasan: Use bits [3..11) of the ring buffer entry address as the base stack tag..
Mon, Jun 17, 2:52 PM · Restricted Project, Restricted Project
eugenis committed rG17bd226b6a1a: Stop counting pops in tsan/check_analyze.sh. (authored by eugenis).
Stop counting pops in tsan/check_analyze.sh.
Mon, Jun 17, 1:45 PM
eugenis committed rL363615: Stop counting pops in tsan/check_analyze.sh..
Stop counting pops in tsan/check_analyze.sh.
Mon, Jun 17, 1:44 PM
eugenis closed D63450: Stop counting pops in tsan/check_analyze.sh..
Mon, Jun 17, 1:44 PM · Restricted Project, Restricted Project
eugenis updated the diff for D63450: Stop counting pops in tsan/check_analyze.sh..

remove commented lines

Mon, Jun 17, 1:00 PM · Restricted Project, Restricted Project
eugenis added a comment to rL363604: Attempt to fix GWP-ASan build failure on sanitizer-android. Add -fPIC..

append_list_if(COMPILER_RT_HAS_FPIC_FLAG -fPIC GWP_ASAN_CFLAGS)

Mon, Jun 17, 12:38 PM
eugenis created D63450: Stop counting pops in tsan/check_analyze.sh..
Mon, Jun 17, 11:27 AM · Restricted Project, Restricted Project

Fri, Jun 14

eugenis added a comment to D63360: hwasan: Use bits [3..11) of the ring buffer entry address as the base stack tag..

We can make the tags undeterministic again by starting each ring buffer at a random index.

Fri, Jun 14, 5:00 PM · Restricted Project, Restricted Project
eugenis added a comment to D63300: AArch64: Prefer FP-relative debug locations in HWASANified functions..

What if we do it the other way around - store SP instead of FP? SP is unusable for locals when there are dynamic allocas; FP is unusable when there is dynamic stack realignment; not sure which case is more common, but both should be rare enough. This could help with the code size at least a little.

Fri, Jun 14, 2:00 PM · Restricted Project
eugenis added inline comments to D63360: hwasan: Use bits [3..11) of the ring buffer entry address as the base stack tag..
Fri, Jun 14, 1:54 PM · Restricted Project, Restricted Project
eugenis added a comment to D63300: AArch64: Prefer FP-relative debug locations in HWASANified functions..

What if we do it the other way around - store SP instead of FP? SP is unusable for locals when there are dynamic allocas; FP is unusable when there is dynamic stack realignment; not sure which case is more common, but both should be rare enough. This could help with the code size at least a little.

Fri, Jun 14, 10:58 AM · Restricted Project

Mon, Jun 10

eugenis accepted D63094: [compiler-rt] Fix name_to_handle_at.cc test on Overlay2.

LGTM

Mon, Jun 10, 2:53 PM · Restricted Project, Restricted Project

Wed, Jun 5

eugenis accepted D62909: [MSAN] Add unary FNeg visitor to the MemorySanitizer.

Thanks!
LGTM

Wed, Jun 5, 2:57 PM · Restricted Project
eugenis added a comment to D62909: [MSAN] Add unary FNeg visitor to the MemorySanitizer.

The instrumentation pass change looks good.
There is a test for fdiv in msan_basic.ll, you can do something similar.

Wed, Jun 5, 12:49 PM · Restricted Project

Mon, Jun 3

eugenis accepted D62794: [HWASAN] Make new/delete weak.

LGTM

Mon, Jun 3, 3:19 PM · Restricted Project
eugenis accepted D62813: [HWASAN][CMake] Allow instrumenting LLVM/clang.

LGTM

Mon, Jun 3, 1:10 PM · Restricted Project

Tue, May 28

eugenis accepted D62489: [HWASAN] Remove unused(?) code.

It's a refactoring leftover.

Tue, May 28, 1:02 PM · Restricted Project, Restricted Project

May 21 2019

eugenis added inline comments to D61923: [GWP-ASan] Mutex implementation [2]..
May 21 2019, 4:58 PM · Restricted Project, Restricted Project, Restricted Project
eugenis added inline comments to D61923: [GWP-ASan] Mutex implementation [2]..
May 21 2019, 3:45 PM · Restricted Project, Restricted Project, Restricted Project

May 17 2019

eugenis committed rGbf161e67838a: [hwasan] Limit try-catch tests to aarch64. (authored by eugenis).
[hwasan] Limit try-catch tests to aarch64.
May 17 2019, 11:38 AM
eugenis committed rCRT361063: [hwasan] Limit try-catch tests to aarch64..
[hwasan] Limit try-catch tests to aarch64.
May 17 2019, 11:38 AM
eugenis committed rL361063: [hwasan] Limit try-catch tests to aarch64..
[hwasan] Limit try-catch tests to aarch64.
May 17 2019, 11:38 AM

May 16 2019

eugenis committed rG7f281b2c06b1: HWASan exception support. (authored by eugenis).
HWASan exception support.
May 16 2019, 4:54 PM
eugenis committed rL360959: HWASan exception support..
HWASan exception support.
May 16 2019, 4:54 PM
eugenis committed rCRT360959: HWASan exception support..
HWASan exception support.
May 16 2019, 4:54 PM
eugenis closed D61968: HWASan exception support..
May 16 2019, 4:54 PM · Restricted Project, Restricted Project
eugenis updated the diff for D61968: HWASan exception support..

+ IR test

May 16 2019, 1:47 PM · Restricted Project, Restricted Project

May 15 2019

eugenis updated the diff for D61968: HWASan exception support..

comments

May 15 2019, 4:20 PM · Restricted Project, Restricted Project
eugenis created D61968: HWASan exception support..
May 15 2019, 4:20 PM · Restricted Project, Restricted Project
eugenis accepted D61965: [zorg] Add empty GN buildbot.

@thakis @pcc
LGTM

May 15 2019, 3:07 PM · Restricted Project

May 14 2019

eugenis added a comment to D61923: [GWP-ASan] Mutex implementation [2]..

I think the idea is that implementing our own spinlock is not much harder than having 3 platform-specific implementations (posix, window, fuchsia).
Also, scudo_standalone is doing the same ( @cryptoad, why? ).

May 14 2019, 6:22 PM · Restricted Project, Restricted Project, Restricted Project
eugenis added a comment to D60593: [GwpAsan] Introduce GWP-ASan..

Ha, I think it matches LLVM perfectly :)
G, of course, stands for "Galaxy".

May 14 2019, 5:38 PM · Restricted Project, Restricted Project, Restricted Project

May 13 2019

eugenis added inline comments to D61867: [GWP-ASan] Initial build files, implementation of PRNG [1]..
May 13 2019, 11:31 AM · Restricted Project, Restricted Project

May 9 2019

eugenis accepted D61751: [MSan] Introduce __msan_unpoison_param()..

LGTM

May 9 2019, 1:06 PM · Restricted Project, Restricted Project

May 8 2019

eugenis added a comment to D56672: [HWASAN] Instrument globals.

sorry for the delay, I'll take a look later this week

May 8 2019, 1:27 PM

May 3 2019

eugenis committed rGc4bfa0d662ff: [hwasan] Fix HWASAN_WITH_INTERCEPTORS=OFF build on not-android. (authored by eugenis).
[hwasan] Fix HWASAN_WITH_INTERCEPTORS=OFF build on not-android.
May 3 2019, 11:21 AM
eugenis committed rCRT359914: [hwasan] Fix HWASAN_WITH_INTERCEPTORS=OFF build on not-android..
[hwasan] Fix HWASAN_WITH_INTERCEPTORS=OFF build on not-android.
May 3 2019, 11:21 AM
eugenis committed rL359914: [hwasan] Fix HWASAN_WITH_INTERCEPTORS=OFF build on not-android..
[hwasan] Fix HWASAN_WITH_INTERCEPTORS=OFF build on not-android.
May 3 2019, 11:18 AM
eugenis closed D61337: [hwasan] Fix HWASAN_WITH_INTERCEPTORS=OFF build on not-android..
May 3 2019, 11:18 AM · Restricted Project, Restricted Project
eugenis added a comment to D61337: [hwasan] Fix HWASAN_WITH_INTERCEPTORS=OFF build on not-android..

That's fine, thank you.
I need to submit the change manually anyway.

May 3 2019, 11:04 AM · Restricted Project, Restricted Project
eugenis committed rG46ec57e57605: Revert "[CodeGenPrepare] limit overflow intrinsic matching to a single basic… (authored by eugenis).
Revert "[CodeGenPrepare] limit overflow intrinsic matching to a single basic…
May 3 2019, 10:30 AM
eugenis committed rL359908: Revert "[CodeGenPrepare] limit overflow intrinsic matching to a single basic….
Revert "[CodeGenPrepare] limit overflow intrinsic matching to a single basic…
May 3 2019, 10:30 AM

May 2 2019

eugenis updated the diff for D61337: [hwasan] Fix HWASAN_WITH_INTERCEPTORS=OFF build on not-android..

add a comment

May 2 2019, 6:24 PM · Restricted Project, Restricted Project
eugenis added a comment to D61337: [hwasan] Fix HWASAN_WITH_INTERCEPTORS=OFF build on not-android..

Should this be an error and cause an "unsupported configuration"?

But we don't really know that, because a change that makes this configuration supported needs to be in libc or in platform build files, not in compiler-rt. I'd rather not block anyone from experimenting.

What about makeing it a warning, "untested configuration"? Obviously your call, just seems prudent to me.

May 2 2019, 5:24 PM · Restricted Project, Restricted Project
eugenis added a comment to D61337: [hwasan] Fix HWASAN_WITH_INTERCEPTORS=OFF build on not-android..

@eugenis, which of the following conditions have tests?

HWASAN_WITH_INTERCEPTORS=OFF, SANITIZER_ANDROID=OFF

This configuration does not exist.

Should this be an error and cause an "unsupported configuration"?

May 2 2019, 3:18 PM · Restricted Project, Restricted Project

May 1 2019

eugenis added a comment to D61337: [hwasan] Fix HWASAN_WITH_INTERCEPTORS=OFF build on not-android..

@eugenis, which of the following conditions have tests?

HWASAN_WITH_INTERCEPTORS=OFF, SANITIZER_ANDROID=OFF

May 1 2019, 12:47 PM · Restricted Project, Restricted Project
eugenis added a comment to D61337: [hwasan] Fix HWASAN_WITH_INTERCEPTORS=OFF build on not-android..

HWASAN_WITH_INTERCEPTORS=OFF is a mode where we rely on libc to call hwasan_thread_enter and hwasan_thread_exit as appropriate. This is particularly important when libc is built with hwasan, because then instrumented code may run on a thread before GetCurrentThread is called. At this moment, only bionic supports this, as far as I know.

May 1 2019, 10:42 AM · Restricted Project, Restricted Project
eugenis committed rGd1a710047b5c: [sanitizer] Implement reallocarray. (authored by eugenis).
[sanitizer] Implement reallocarray.
May 1 2019, 10:32 AM
eugenis committed rCRT359708: [sanitizer] Implement reallocarray..
[sanitizer] Implement reallocarray.
May 1 2019, 10:32 AM
eugenis committed rL359708: [sanitizer] Implement reallocarray..
[sanitizer] Implement reallocarray.
May 1 2019, 10:32 AM
eugenis closed D61108: [sanitizer] Implement reallocarray..
May 1 2019, 10:31 AM · Restricted Project, Restricted Project

Apr 30 2019

eugenis requested changes to D61291: [compiler-rt] Fix compile error in hwasan_linux.cpp.

See https://reviews.llvm.org/D61337

Apr 30 2019, 1:34 PM · Restricted Project, Restricted Project
eugenis added a comment to D61203: [compiler-rt] Fix cmake warnings.

Sorry I've missed your comment. I've uploaded a different fix for __hwasan_tls problem:
https://reviews.llvm.org/D61337

Apr 30 2019, 1:30 PM · Restricted Project, Restricted Project
eugenis created D61337: [hwasan] Fix HWASAN_WITH_INTERCEPTORS=OFF build on not-android..
Apr 30 2019, 1:30 PM · Restricted Project, Restricted Project

Apr 29 2019

eugenis updated the diff for D61108: [sanitizer] Implement reallocarray..

disable sanitizer_common reallocarray test on darwin

Apr 29 2019, 5:37 PM · Restricted Project, Restricted Project
eugenis accepted D60617: MSan: handle llvm.lifetime.start intrinsic.

LGTM
Thank you!

Apr 29 2019, 3:33 PM · Restricted Project
eugenis updated subscribers of D61168: [sanitizer] NFC:Get type of LargeMmapAllocator from PrimaryAllocator.

This change includes D61155.

Apr 29 2019, 1:01 PM · Restricted Project, Restricted Project
eugenis updated subscribers of D61155: [sanitizer][NFC] Get type of AllocatorCache from CombinedAllocator.

Looks fine to me. @kcc PTAL

Apr 29 2019, 12:56 PM · Restricted Project, Restricted Project

Apr 26 2019

eugenis accepted D61206: [sanitizer] Calculate SizeClassAllocator32::ByteMap type from Params::kSpaceSize and Params::kRegionSizeLog.

LGTM

Apr 26 2019, 11:28 AM · Restricted Project, Restricted Project
eugenis accepted D61200: [sanitizer] NFC: add static_assert to confirm that we use optimal ByteMap type.

LGTM

Apr 26 2019, 11:15 AM · Restricted Project, Restricted Project
eugenis added a comment to D61203: [compiler-rt] Fix cmake warnings.

I think __hwasan_tls should be defined if !SANITIZER_ANDROID, without the other condition.

Apr 26 2019, 11:12 AM · Restricted Project, Restricted Project

Apr 25 2019

eugenis added inline comments to D60617: MSan: handle llvm.lifetime.start intrinsic.
Apr 25 2019, 5:37 PM · Restricted Project

Apr 24 2019

eugenis created D61108: [sanitizer] Implement reallocarray..
Apr 24 2019, 6:17 PM · Restricted Project, Restricted Project
eugenis added inline comments to D60589: [sanitizer_common] Expose a variadic version of the sanitizer Printf function..
Apr 24 2019, 4:42 PM · Restricted Project, Restricted Project

Apr 19 2019

eugenis added a comment to D60589: [sanitizer_common] Expose a variadic version of the sanitizer Printf function..

IMHO, we could use printf() in gwpasan directly, with a guard against recursive malloc.

I don't think this will work in a signal-safe manner. The only times that GwpAsan calls printf() is in the signal handler, and even if we temporarily disable sampled allocations, we still are exercising non-reentrant functions in a signal handler.

Apr 19 2019, 2:33 PM · Restricted Project, Restricted Project
eugenis added inline comments to D60617: MSan: handle llvm.lifetime.start intrinsic.
Apr 19 2019, 10:25 AM · Restricted Project

Apr 18 2019

eugenis accepted D60806: [HWASan] Added no-FP unit test for register dump..

LGTM

Apr 18 2019, 4:32 PM · Restricted Project, Restricted Project
eugenis added a comment to D60593: [GwpAsan] Introduce GWP-ASan..

If the atomic load ends up on the hot path, we could try moving it to the same cache line as NextSampleCounter. That would make it thread local, but it can be initialized from the global variable on the slow path.

Apr 18 2019, 4:30 PM · Restricted Project, Restricted Project, Restricted Project
eugenis added inline comments to D60806: [HWASan] Added no-FP unit test for register dump..
Apr 18 2019, 2:50 PM · Restricted Project, Restricted Project

Apr 16 2019

eugenis added inline comments to D60617: MSan: handle llvm.lifetime.start intrinsic.
Apr 16 2019, 6:02 PM · Restricted Project
eugenis added inline comments to D60686: Asan use-after-scope: don't poison allocas if there were untraced lifetime intrinsics in the function (PR41481).
Apr 16 2019, 5:32 PM · Restricted Project
eugenis added inline comments to D60686: Asan use-after-scope: don't poison allocas if there were untraced lifetime intrinsics in the function (PR41481).
Apr 16 2019, 5:27 PM · Restricted Project
eugenis added inline comments to D60806: [HWASan] Added no-FP unit test for register dump..
Apr 16 2019, 5:26 PM · Restricted Project, Restricted Project
eugenis accepted D60798: [HWASan] Fixed slow DWARF unwinding..

LGTM

Apr 16 2019, 3:12 PM · Restricted Project, Restricted Project

Apr 15 2019

eugenis added inline comments to D60593: [GwpAsan] Introduce GWP-ASan..
Apr 15 2019, 5:04 PM · Restricted Project, Restricted Project, Restricted Project
eugenis added a comment to D60617: MSan: handle llvm.lifetime.start intrinsic.

Please test the case when alloca can not be found.
See https://bugs.llvm.org/show_bug.cgi?id=41481 for the reference.

Ok, will do. The repro in the bug doesn't produce IR containing a select statement for me, but the idea is clear.

With this change msan will start detecting new bugs, ex.:
for (int i = 0; ...; ++i) {

int x;
if (i == 0) x=0;
read(x);

}

It can also slow down some programs a lot.

Agreed. This also makes less sense without origins - do you think we shall hide it behind track-origins>0 ?

Apr 15 2019, 1:49 PM · Restricted Project
eugenis accepted D60686: Asan use-after-scope: don't poison allocas if there were untraced lifetime intrinsics in the function (PR41481).

LGTM
Consider extending the test with another alloca which does not participate in any untraceable lifetimes, but has to be poisoned in entry block anyway.

Apr 15 2019, 1:39 PM · Restricted Project

Apr 12 2019

eugenis added inline comments to D60593: [GwpAsan] Introduce GWP-ASan..
Apr 12 2019, 1:57 PM · Restricted Project, Restricted Project, Restricted Project