Page MenuHomePhabricator

eugenis (Evgenii Stepanov)
User

Projects

User does not belong to any projects.

User Details

User Since
Oct 3 2012, 3:00 AM (417 w, 5 h)

Recent Activity

Mon, Sep 28

eugenis accepted D88350: scudo: Re-order Allocator fields for improved performance. NFCI..

Nice.

Mon, Sep 28, 10:44 AM · Restricted Project

Fri, Sep 25

eugenis accepted D88284: [msan] Skip memcpy interceptor called by gethostname.

LGTM

Fri, Sep 25, 3:18 PM · Restricted Project
eugenis added a comment to D87994: [LangRef] Clarify the behavior of memory access instructions when pointers/sizes aren't well-defined.

MSan will complain about any undefined bits in a pointer.
We have not seen a false positive caused by this so far, but it sounds like we should relax the requirement. Does it make sense for MSan to allow undef in the lower bits up to the known dereferenceable range of the pointer?

Fri, Sep 25, 11:02 AM · Restricted Project
eugenis added a comment to D88284: [msan] Skip memcpy interceptor called by gethostname.

I'm concerned that this may break more things that it will fix.
We may have code relying on initialization done by an memcpy call from under some other interceptor. That's not very reliable, of course, and ideally all such effects should be handled in the top-level interceptor, so this change looks like movement in the right direction.
But please test it thoroughly.

Fri, Sep 25, 9:53 AM · Restricted Project

Wed, Sep 23

eugenis added a comment to D87579: [RISCV][ASAN] unwind fixup.

Documenting this would be a good idea.
You can say something along the lines of:
if a function has a frame pointer, it must point one byte past the end of a record that contains the previous frame pointer in the lower word, and the previous frame return address in the high word.

Wed, Sep 23, 1:28 PM · Restricted Project

Tue, Sep 22

eugenis added inline comments to D87580: [RISCV][ASAN] support code for architecture-specific parts of asan.
Tue, Sep 22, 1:36 PM · Restricted Project
eugenis added inline comments to D87998: [RISCV][ASAN] updated platform macros to simplify detection of RISCV64 platform.
Tue, Sep 22, 1:20 PM · Restricted Project
eugenis accepted D87572: [RISCV][ASAN] implementation of internal syscalls wrappers for riscv64.

LGTM

Tue, Sep 22, 1:18 PM · Restricted Project
eugenis accepted D87579: [RISCV][ASAN] unwind fixup.

Does gcc use the same frame record layout? We've had issues like that with Arm, see GetCanonicFrame. If not, maybe it's not too late to fix?

Tue, Sep 22, 1:12 PM · Restricted Project
eugenis added inline comments to D87580: [RISCV][ASAN] support code for architecture-specific parts of asan.
Tue, Sep 22, 1:03 PM · Restricted Project

Mon, Sep 21

eugenis added inline comments to D87994: [LangRef] Clarify the behavior of memory access instructions when pointers/sizes aren't well-defined.
Mon, Sep 21, 3:33 PM · Restricted Project
eugenis added inline comments to D87580: [RISCV][ASAN] support code for architecture-specific parts of asan.
Mon, Sep 21, 1:07 PM · Restricted Project
eugenis added inline comments to D87580: [RISCV][ASAN] support code for architecture-specific parts of asan.
Mon, Sep 21, 1:02 PM · Restricted Project

Fri, Sep 18

eugenis accepted D87897: [msan][asan] Add runtime flag intercept_strcmp.

LGTM

Fri, Sep 18, 8:20 AM · Restricted Project

Thu, Sep 17

eugenis added a comment to D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary.

We really need to do something about this.
How about a change that adds -fdisable-noundef-analysis to every RUN line with %clang?
(-) We are not testing exactly the same mode that is used by the users - but that's already true for many other flags that clang driver passes to -cc1!
(+) Easy to automate, an update script can be provided to downstream users.
(+) Less "magic" than the llvm-lit idea (4 comments above)

Thu, Sep 17, 8:30 PM · Restricted Project
eugenis added inline comments to D87739: scudo: Add an API for disabling memory initialization per-thread..
Thu, Sep 17, 3:31 PM · Restricted Project
eugenis accepted D87739: scudo: Add an API for disabling memory initialization per-thread..

LGTM

Thu, Sep 17, 3:13 PM · Restricted Project
eugenis added inline comments to D87739: scudo: Add an API for disabling memory initialization per-thread..
Thu, Sep 17, 12:42 PM · Restricted Project

Wed, Sep 16

eugenis added inline comments to D87739: scudo: Add an API for disabling memory initialization per-thread..
Wed, Sep 16, 4:21 PM · Restricted Project
eugenis added inline comments to D87739: scudo: Add an API for disabling memory initialization per-thread..
Wed, Sep 16, 4:20 PM · Restricted Project
eugenis added inline comments to D87572: [RISCV][ASAN] implementation of internal syscalls wrappers for riscv64.
Wed, Sep 16, 2:40 PM · Restricted Project
eugenis accepted D87573: [RISCV][ASAN] implementation of clone interceptor for riscv64.

Since this does not affect non-riscv targets, I'll trust your knowledge and test coverage.

Wed, Sep 16, 2:34 PM · Restricted Project
eugenis accepted D87574: [RISCV][ASAN] implementation for vfork interceptor for riscv64.

This looks reasonable, but I'm not very familiar with the ISA.
LGTM

Wed, Sep 16, 2:31 PM · Restricted Project
eugenis accepted D87575: [RISCV][ASAN] implementation of ThreadSelf for riscv64.

LGTM

Wed, Sep 16, 2:23 PM · Restricted Project
eugenis added a comment to D87576: [RISCV][ASAN] implementation of SignalContext::GetWriteFlag.

A general comment: please change revision summaries to describe what the current patch is doing - this will go into the git commit description.

Wed, Sep 16, 2:20 PM · Restricted Project
eugenis accepted D87577: [RISCV][ASAN] implementation for previous/next pc routines for riscv64.

LGTM

Wed, Sep 16, 2:18 PM · Restricted Project
eugenis added inline comments to D87579: [RISCV][ASAN] unwind fixup.
Wed, Sep 16, 2:13 PM · Restricted Project
eugenis accepted D87581: [RISCV][ASAN] instrumentation pass now uses proper shadow offset.

LGTM

Wed, Sep 16, 2:00 PM · Restricted Project
eugenis added inline comments to D87580: [RISCV][ASAN] support code for architecture-specific parts of asan.
Wed, Sep 16, 1:59 PM · Restricted Project
eugenis accepted D87582: [RISCV][ASAN] mark asan as supported for RISCV64 and enable tests.

LGTM

Wed, Sep 16, 1:48 PM · Restricted Project

Tue, Sep 15

eugenis added reviewers for D87717: [docs] Update ControlFlowIntegrity.rst.: pirama, ivanlozano.
Tue, Sep 15, 12:51 PM · Restricted Project
eugenis requested review of D87717: [docs] Update ControlFlowIntegrity.rst..
Tue, Sep 15, 12:51 PM · Restricted Project

Mon, Sep 14

eugenis added inline comments to D87538: [VectorCombine] Don't vectorize scalar load under asan/hwasan/memtag/tsan.
Mon, Sep 14, 12:28 PM · Restricted Project
eugenis added inline comments to D87538: [VectorCombine] Don't vectorize scalar load under asan/hwasan/memtag/tsan.
Mon, Sep 14, 11:52 AM · Restricted Project

Thu, Sep 10

eugenis added inline comments to D82424: sanitizers: Add interceptors for getproto{ent,byname,bynumber}_r.
Thu, Sep 10, 12:21 PM · Restricted Project
eugenis added inline comments to D82424: sanitizers: Add interceptors for getproto{ent,byname,bynumber}_r.
Thu, Sep 10, 12:20 PM · Restricted Project
eugenis added a comment to D87420: scudo: Introduce a new mechanism to let Scudo access a platform-specific TLS slot.

Where is the implementation of getPlatformTlsSlot?

Thu, Sep 10, 12:14 PM · Restricted Project

Aug 27 2020

eugenis accepted D86692: [NFC][ValueTracking] Add OffsetZero into findAllocaForValue.

LGTM

Aug 27 2020, 1:16 PM · Restricted Project
eugenis accepted D86672: [StackSafety] Ignore allocas with partial lifetime markers.

I wonder if, to be completely correct, we need to rewrite all lifetime calls when extending allocas to 16 bytes in AArch64StackTagging? After all, tag store (llvm.aarch64.stg) is a 16-byte write and it will appear to span beyond the lifetime limits.

Aug 27 2020, 12:48 PM · Restricted Project

Aug 24 2020

eugenis added a comment to D85894: [BuildLibCalls] Add more noundef to library functions.

Would it be better / easier to apply this to all functions by default, and then opt out some? Which ones would we even need to opt out? I imagine that would only be a handful of "weird" functions like open/openat (for the mode argument), maybe ioctl/fcntl.

Aug 24 2020, 10:50 AM · Restricted Project
eugenis added a reviewer for D86471: [MSAN] Add fiber switching APIs: vitalybuka.
Aug 24 2020, 10:40 AM · Restricted Project
eugenis accepted D83134: [asan] Disable fast unwinder on arm-linux-gnueabi with thumb.

LGTM

Aug 24 2020, 9:29 AM · Restricted Project

Aug 21 2020

eugenis added a comment to D85554: [libFuzzer] Fix arguments of InsertPartOf/CopyPartOf calls in CrossOver mutator..

Right, the bot has been red since http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/29113, which includes this change.
There has been another change in the same build that broke *everything*, so you likely did not get an actionable message from the buildbot at that time.
Please fix!

Aug 21 2020, 9:54 AM · Restricted Project

Aug 17 2020

eugenis accepted D85930: [lsan] Share platform allocator settings between ASan and LSan.

LGTM

Aug 17 2020, 12:24 PM · Restricted Project
eugenis added a comment to D85927: Enable LSAN for Android.

I've grabbed a pixel3 test phone from the office. Is there a one-step setup script that I could run and point it at the device? Or would I have to set it up manually ?
I could also do the manual tests where I copy the new bionic libc and this patch's asan-aarch64-android.so. to the phone and run some binaries ... see if they work

Aug 17 2020, 12:16 PM · Restricted Project

Aug 14 2020

eugenis accepted D86001: [MSAN] Avoid dangling ActualFnStart when replacing instruction.

LGTM with a nit

Aug 14 2020, 4:39 PM · Restricted Project
eugenis added a comment to D86000: Add an unsigned shift base sanitizer.
In D86000#2219322, @jfb wrote:
In D86000#2219288, @vsk wrote:

It'd be nice to fold the new check into an existing sanitizer group to bring this to a wider audience. Do you foresee adoption issues for existing -fsanitize=integer adopters? Fwiw some recently-added implicit conversion checks were folded in without much/any pushback.

integer does "not actually UB checks", right? I can certainly put it in there if you think I won't get yelled at 😄

Aug 14 2020, 4:36 PM · Restricted Project, Restricted Project, Restricted Project
eugenis added a comment to D86001: [MSAN] Avoid dangling ActualFnStart when replacing instruction.

This adds future implementation complexity.

Aug 14 2020, 3:34 PM · Restricted Project
eugenis accepted D85985: [MSAN] Convert ActualFnStart to be a particular Instruction *, not BB.

LGTM++

Aug 14 2020, 2:38 PM · Restricted Project
eugenis accepted D85985: [MSAN] Convert ActualFnStart to be a particular Instruction *, not BB.

LGTM

Aug 14 2020, 1:48 PM · Restricted Project
eugenis added inline comments to D85559: [MSAN] Reintroduce libatomic load/store instrumentation.
Aug 14 2020, 1:03 PM · Restricted Project, Restricted Project, Restricted Project
eugenis accepted D85559: [MSAN] Reintroduce libatomic load/store instrumentation.

LGTM with 1 comment

Aug 14 2020, 12:47 PM · Restricted Project, Restricted Project, Restricted Project
eugenis added a reviewer for D85985: [MSAN] Convert ActualFnStart to be a particular Instruction *, not BB: glider.
Aug 14 2020, 12:05 PM · Restricted Project
eugenis added inline comments to D85985: [MSAN] Convert ActualFnStart to be a particular Instruction *, not BB.
Aug 14 2020, 12:04 PM · Restricted Project
eugenis added a comment to D85927: Enable LSAN for Android.

This change does not enable standalone LSan. It probably should, as a test vehicle if nothing else. See COMPILER_RT_HAS_LSAN.

Aug 14 2020, 11:50 AM · Restricted Project

Aug 13 2020

eugenis added inline comments to D85227: [MSAN] Cache stack traces and chained origins.
Aug 13 2020, 4:19 PM · Restricted Project, Restricted Project
eugenis added inline comments to D85559: [MSAN] Reintroduce libatomic load/store instrumentation.
Aug 13 2020, 3:53 PM · Restricted Project, Restricted Project, Restricted Project
eugenis accepted D85573: [CGAtomic] Mark atomic libcall functions `nounwind`.

LGTM

Aug 13 2020, 3:49 PM · Restricted Project
eugenis added a comment to D85927: Enable LSAN for Android.

I think there needs to be something to disable automatic leak detection on exit on older platform, otherwise existing users of ASan will start getting false leak reports.

Aug 13 2020, 3:37 PM · Restricted Project
eugenis accepted D85944: [NFC] Remove unused function..

LGTM

Aug 13 2020, 3:24 PM · Restricted Project
eugenis added a comment to D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary.

After discussing with @eugenis, for the meantime it might be best to do the following:

  • Change the masking attribute to be -fdisable-noundef-analysis (name notwithstanding), and have it completely turn off all noundefs
  • Change the llvm-lit configuration to use the new codegen flag for all the tests by default
  • Have noundef emitted in the frontend by default (when the codegen flag isn't present)

TBH, I don't see how this solves any problem. It just makes it a problem for someone in the future... (FWIW, I say this being in full support of noundef)

Aug 13 2020, 2:46 PM · Restricted Project
eugenis added inline comments to D85930: [lsan] Share platform allocator settings between ASan and LSan.
Aug 13 2020, 2:19 PM · Restricted Project
eugenis added a comment to D85927: Enable LSAN for Android.

FYI https://reviews.llvm.org/D85930 moves standalone LSan on Android/aarch64 to the 64-bit allocator, I don't know if you care about this.
LSan-in-ASan is already there.

Aug 13 2020, 2:15 PM · Restricted Project
eugenis added inline comments to D85927: Enable LSAN for Android.
Aug 13 2020, 2:13 PM · Restricted Project
eugenis accepted D85871: hwasan: Emit the globals note even when globals are uninstrumented..

LGTM

Aug 13 2020, 1:49 PM · Restricted Project
eugenis accepted D85870: sanitizer_common: Introduce internal_madvise and start using it..

LGTM

Aug 13 2020, 12:36 PM · Restricted Project
eugenis accepted D85841: [tsan] Respect no_huge_pages_for_shadow..

OK, this seems to be the safe choice then. LGTM.

Aug 13 2020, 12:22 PM · Restricted Project

Aug 12 2020

eugenis updated subscribers of D85841: [tsan] Respect no_huge_pages_for_shadow..

I wonder if it would pay to selectively apply this for the parts of the shadow that correspond to shared library mappings.
Otherwise we are losing the benefits of huge pages on the heap, which should have a pretty dense shadow.
@dvyukov

Aug 12 2020, 12:48 PM · Restricted Project

Aug 10 2020

eugenis accepted D84961: [MSAN RT] Use __sanitizer::mem_is_zero in __msan_test_shadow.

LGTM

Aug 10 2020, 12:08 PM · Restricted Project
eugenis added inline comments to D84961: [MSAN RT] Use __sanitizer::mem_is_zero in __msan_test_shadow.
Aug 10 2020, 11:46 AM · Restricted Project
eugenis added a comment to D85573: [CGAtomic] Mark atomic libcall functions `nounwind`.

nocapture on the pointer argument

Aug 10 2020, 11:40 AM · Restricted Project
eugenis added a comment to D85573: [CGAtomic] Mark atomic libcall functions `nounwind`.

While we are here, how about setting a few more attributes?
argmemonly, readonly/writeonly, willreturn come to mind.

Aug 10 2020, 11:39 AM · Restricted Project

Aug 7 2020

eugenis added inline comments to D85559: [MSAN] Reintroduce libatomic load/store instrumentation.
Aug 7 2020, 4:03 PM · Restricted Project, Restricted Project, Restricted Project
eugenis added a comment to D85559: [MSAN] Reintroduce libatomic load/store instrumentation.

__libatomic_load might come at the end of the function, with no succeeding BB

Not exactly. It may come at the end of a BB.

Aug 7 2020, 3:30 PM · Restricted Project, Restricted Project, Restricted Project
eugenis added inline comments to D83337: [MSAN] Instrument libatomic load/store calls.
Aug 7 2020, 11:51 AM · Restricted Project, Restricted Project

Aug 6 2020

eugenis added inline comments to D85227: [MSAN] Cache stack traces and chained origins.
Aug 6 2020, 5:26 PM · Restricted Project, Restricted Project
eugenis committed rGaa57cabae2fc: [msan] Support %ms in scanf. (authored by eugenis).
[msan] Support %ms in scanf.
Aug 6 2020, 2:50 PM
eugenis closed D85350: [msan] Support %ms in scanf..
Aug 6 2020, 2:50 PM · Restricted Project
eugenis added a comment to D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary.

Are you seriously adding an attribute to literally every argument and return value? Why is this the right representation?

Aug 6 2020, 2:31 PM · Restricted Project
eugenis added inline comments to D85350: [msan] Support %ms in scanf..
Aug 6 2020, 1:56 PM · Restricted Project
eugenis updated the diff for D85350: [msan] Support %ms in scanf..

.

Aug 6 2020, 1:55 PM · Restricted Project
eugenis committed rG189ba3db8653: Fix CFI issues in <future> (authored by eugenis).
Fix CFI issues in <future>
Aug 6 2020, 12:05 PM
eugenis closed D82627: Fix CFI issues in <future>.
Aug 6 2020, 12:05 PM · Restricted Project
eugenis accepted D85412: [AArch64][NFC] require aarch64 support for hwasan test.

LGTM

Aug 6 2020, 11:11 AM · Restricted Project

Aug 5 2020

eugenis added a comment to D82627: Fix CFI issues in <future>.

I can push this tomorrow unless anyone objects before then.

Aug 5 2020, 4:12 PM · Restricted Project
eugenis added a comment to D85350: [msan] Support %ms in scanf..

The problem with "a" is that we do not always know what it means exactly (could be a float), and it's dangerous to dereference the pointer.

Aug 5 2020, 1:32 PM · Restricted Project
eugenis requested review of D85350: [msan] Support %ms in scanf..
Aug 5 2020, 12:44 PM · Restricted Project
eugenis committed rGf2c04239955a: [msan] Remove readnone and friends from call sites. (authored by eugenis).
[msan] Remove readnone and friends from call sites.
Aug 5 2020, 10:41 AM
eugenis closed D85259: [msan] Remove readnone and friends from call sites..
Aug 5 2020, 10:41 AM · Restricted Project
eugenis accepted D84509: Fix qsort() interceptor for FreeBSD.

LGTM

Aug 5 2020, 10:32 AM · Restricted Project

Aug 4 2020

eugenis requested review of D85259: [msan] Remove readnone and friends from call sites..
Aug 4 2020, 4:50 PM · Restricted Project

Aug 3 2020

eugenis added a comment to D83595: [Draft][MSAN] Optimize away poisoning allocas that are always written before load.

Right, that's what the isNoModRef check is for.

Aug 3 2020, 1:23 PM · Restricted Project, Restricted Project
eugenis updated subscribers of D84940: [JumpThreading] Conditionally freeze its condition when unfolding select.
Aug 3 2020, 11:07 AM · Restricted Project

Aug 1 2020

eugenis committed rGdc3388b0209d: [msan] Respect no_huge_pages_for_shadow. (authored by eugenis).
[msan] Respect no_huge_pages_for_shadow.
Aug 1 2020, 5:07 PM
eugenis closed D85061: [msan] Respect no_huge_pages_for_shadow..
Aug 1 2020, 5:07 PM · Restricted Project

Jul 31 2020

eugenis added a comment to D85061: [msan] Respect no_huge_pages_for_shadow..

Testing this would be pretty hard - we'd need to touch a bunch of memory pages, and then somehow wait for the huge page daemon to merge them (or not).

Jul 31 2020, 5:28 PM · Restricted Project
eugenis requested review of D85061: [msan] Respect no_huge_pages_for_shadow..
Jul 31 2020, 5:20 PM · Restricted Project
eugenis added a comment to D83595: [Draft][MSAN] Optimize away poisoning allocas that are always written before load.

You want to start scanning at the same point where poisoning is going to be inserted.

Jul 31 2020, 3:45 PM · Restricted Project, Restricted Project
eugenis added a comment to D83595: [Draft][MSAN] Optimize away poisoning allocas that are always written before load.

The code currently scans from the alloca, rather than from the lifetime_start. This might make only searching in single BB pretty limiting, since afaict an alloca can be detached from its lifetime region.

Jul 31 2020, 3:44 PM · Restricted Project, Restricted Project
eugenis accepted D85040: [MSAN] Instrument freeze instruction by clearing shadow.

LGTM

Jul 31 2020, 3:42 PM · Restricted Project