Page MenuHomePhabricator

melver (Marco Elver)
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 20 2018, 1:39 PM (110 w, 2 d)

Recent Activity

Jul 31 2020

melver added a comment to D81346: [KernelAddressSanitizer] Ensure global array size remains multiple of type-size.

Note: We landed globals support for KASAN with https://reviews.llvm.org/rGd3f89314ff20ce1612bd5e09f9f90ff5dd5205a7

Jul 31 2020, 9:04 AM · Restricted Project, Restricted Project
melver abandoned D83949: [TSan] Do not compound reads and writes when separated by atomics.
Jul 31 2020, 9:02 AM · Restricted Project

Jul 17 2020

melver committed rG785d41a261d1: [TSan] Add option for emitting compound read-write instrumentation (authored by melver).
[TSan] Add option for emitting compound read-write instrumentation
Jul 17 2020, 1:25 AM
melver closed D83867: [TSan] Add option for emitting compound read-write instrumentation.
Jul 17 2020, 1:25 AM · Restricted Project

Jul 16 2020

melver added a comment to D83949: [TSan] Do not compound reads and writes when separated by atomics.

In practice, it probably doesn't really matter because T0 would probably load acquire spin on B or something better, and it'd be all in separate basic blocks.

Yes, that's what I am thinking as well. This only makes difference for a ~1 instruction window for the context where everything is timing dependent anyway...

Jul 16 2020, 9:07 AM · Restricted Project
melver added a comment to D83949: [TSan] Do not compound reads and writes when separated by atomics.

What would be an example of code where it matters?

Jul 16 2020, 8:02 AM · Restricted Project
melver added a comment to D83867: [TSan] Add option for emitting compound read-write instrumentation.

What happens if the load and the store are separated by a barrier atomic load or store? Will they also be combined into a single operation?

Jul 16 2020, 6:48 AM · Restricted Project
Herald added a project to D83949: [TSan] Do not compound reads and writes when separated by atomics: Restricted Project.
Jul 16 2020, 6:48 AM · Restricted Project
melver updated the diff for D83867: [TSan] Add option for emitting compound read-write instrumentation.

Address comments.

Jul 16 2020, 6:47 AM · Restricted Project

Jul 15 2020

melver added a comment to D83867: [TSan] Add option for emitting compound read-write instrumentation.

KCSAN change (draft) is here: https://github.com/melver/linux/commit/a04e683f457ea94b4bbba80cf05b5bcb50857fa7 -- tested and working as intended.

Jul 15 2020, 6:05 AM · Restricted Project
melver added a comment to D83867: [TSan] Add option for emitting compound read-write instrumentation.

It seems the linter/clang-format did a number of non-functional changes here. I'm inclined to keep them, because they more closely adhere to LLVM's style guide.

Jul 15 2020, 6:01 AM · Restricted Project
Herald added a project to D83867: [TSan] Add option for emitting compound read-write instrumentation: Restricted Project.
Jul 15 2020, 6:00 AM · Restricted Project

Jun 17 2020

melver added inline comments to D73543: [clang] Add support for __builtin_memcpy_inline.
Jun 17 2020, 7:31 AM · Restricted Project, Restricted Project

Jun 12 2020

melver committed rG8af7fa07aa24: [ASan][NFC] Refactor redzone size calculation (authored by melver).
[ASan][NFC] Refactor redzone size calculation
Jun 12 2020, 6:59 AM
melver closed D81367: [ASan][NFC] Refactor redzone size calculation.
Jun 12 2020, 6:59 AM · Restricted Project
melver added a reviewer for D81367: [ASan][NFC] Refactor redzone size calculation: andreyknvl.
Jun 12 2020, 4:17 AM · Restricted Project

Jun 10 2020

melver committed rG52cae05e087b: [ASan][Test] Fix expected strings for globals test (authored by melver).
[ASan][Test] Fix expected strings for globals test
Jun 10 2020, 11:46 AM
melver committed rG0f04f104537b: [ASan][Test] Split out global alias test (authored by melver).
[ASan][Test] Split out global alias test
Jun 10 2020, 11:07 AM
melver closed D81591: [ASan][Test] Split out global alias test.
Jun 10 2020, 11:06 AM · Restricted Project
melver updated the diff for D81591: [ASan][Test] Split out global alias test.

Comment.

Jun 10 2020, 10:34 AM · Restricted Project
melver created D81591: [ASan][Test] Split out global alias test.
Jun 10 2020, 10:32 AM · Restricted Project
melver committed rGd3f89314ff20: [KernelAddressSanitizer] Make globals constructors compatible with kernel [v2] (authored by melver).
[KernelAddressSanitizer] Make globals constructors compatible with kernel [v2]
Jun 10 2020, 6:33 AM
melver closed D81390: [KernelAddressSanitizer] Make globals constructors compatible with kernel [v2].
Jun 10 2020, 6:32 AM · Restricted Project, Restricted Project
melver updated the summary of D81367: [ASan][NFC] Refactor redzone size calculation.
Jun 10 2020, 3:47 AM · Restricted Project
melver updated the diff for D81390: [KernelAddressSanitizer] Make globals constructors compatible with kernel [v2].

Fix test on windows.

Jun 10 2020, 3:47 AM · Restricted Project, Restricted Project
melver updated the diff for D81390: [KernelAddressSanitizer] Make globals constructors compatible with kernel [v2].

Fix typos.

Jun 10 2020, 1:03 AM · Restricted Project, Restricted Project

Jun 9 2020

melver updated the summary of D81367: [ASan][NFC] Refactor redzone size calculation.
Jun 9 2020, 11:32 AM · Restricted Project
melver updated the diff for D81390: [KernelAddressSanitizer] Make globals constructors compatible with kernel [v2].

Fix test broken by linter.

Jun 9 2020, 10:25 AM · Restricted Project, Restricted Project
melver added a comment to D81390: [KernelAddressSanitizer] Make globals constructors compatible with kernel [v2].

Thanks! PTAL.

Jun 9 2020, 10:25 AM · Restricted Project, Restricted Project
melver updated the diff for D81390: [KernelAddressSanitizer] Make globals constructors compatible with kernel [v2].

Address comments.

Jun 9 2020, 10:25 AM · Restricted Project, Restricted Project
melver added a reviewer for D81390: [KernelAddressSanitizer] Make globals constructors compatible with kernel [v2]: dvyukov.
Jun 9 2020, 5:59 AM · Restricted Project, Restricted Project
melver retitled D81390: [KernelAddressSanitizer] Make globals constructors compatible with kernel [v2] from [KernelAddressSanitizer] Make globals constructors compatible with kernel to [KernelAddressSanitizer] Make globals constructors compatible with kernel [v2].
Jun 9 2020, 1:03 AM · Restricted Project, Restricted Project
melver added a comment to D81390: [KernelAddressSanitizer] Make globals constructors compatible with kernel [v2].

I do not know enough about KASAN enough to review this patch but I can say that against mainline at https://git.kernel.org/linus/af7b4801030c07637840191c69eb666917e4135d, there appear to be no visible regressions with this version of the patch on top of caa2fddce72f2e8ca3d6346cc2c8fe85252b91d8.

Jun 9 2020, 1:03 AM · Restricted Project, Restricted Project

Jun 8 2020

melver updated the summary of D81390: [KernelAddressSanitizer] Make globals constructors compatible with kernel [v2].
Jun 8 2020, 1:51 PM · Restricted Project, Restricted Project
melver added a reviewer for D81390: [KernelAddressSanitizer] Make globals constructors compatible with kernel [v2]: nathanchance.
Jun 8 2020, 8:11 AM · Restricted Project, Restricted Project
melver updated the summary of D81390: [KernelAddressSanitizer] Make globals constructors compatible with kernel [v2].
Jun 8 2020, 8:11 AM · Restricted Project, Restricted Project
melver updated the diff for D81390: [KernelAddressSanitizer] Make globals constructors compatible with kernel [v2].

Also ignore non-alias globals prefixed by __.

Jun 8 2020, 8:11 AM · Restricted Project, Restricted Project
melver created D81390: [KernelAddressSanitizer] Make globals constructors compatible with kernel [v2].
Jun 8 2020, 7:05 AM · Restricted Project, Restricted Project
melver created D81367: [ASan][NFC] Refactor redzone size calculation.
Jun 8 2020, 2:40 AM · Restricted Project
melver committed rGc6ec352a6bde: Revert "[KernelAddressSanitizer] Make globals constructors compatible with… (authored by melver).
Revert "[KernelAddressSanitizer] Make globals constructors compatible with…
Jun 8 2020, 2:08 AM
melver added a reverting change for rG866ee2353f7d: [KernelAddressSanitizer] Make globals constructors compatible with kernel: rGc6ec352a6bde: Revert "[KernelAddressSanitizer] Make globals constructors compatible with….
Jun 8 2020, 2:08 AM
melver abandoned D81346: [KernelAddressSanitizer] Ensure global array size remains multiple of type-size.

With an allmodconfig, mostpost still isn't happy because it expects the device_id info to be a certain size. Revert everything while we figure out how to make modpost happy.

Jun 8 2020, 2:08 AM · Restricted Project, Restricted Project

Jun 7 2020

melver updated the diff for D81346: [KernelAddressSanitizer] Ensure global array size remains multiple of type-size.

Add 0-size array to test to check redzone calculation does not divide by 0.

Jun 7 2020, 3:27 PM · Restricted Project, Restricted Project
melver created D81346: [KernelAddressSanitizer] Ensure global array size remains multiple of type-size.
Jun 7 2020, 10:38 AM · Restricted Project, Restricted Project

Jun 6 2020

melver committed rG97a670958c24: [ASan][Test] Fix globals test on 32-bit architectures (authored by melver).
[ASan][Test] Fix globals test on 32-bit architectures
Jun 6 2020, 2:38 AM

Jun 5 2020

melver committed rG2dd83a923046: [ASan][Test] Fix globals test for Mach-O (authored by melver).
[ASan][Test] Fix globals test for Mach-O
Jun 5 2020, 2:37 PM
melver closed D81306: [ASan][Test] Fix globals test for Mach-O.
Jun 5 2020, 2:37 PM · Restricted Project
melver added a comment to D80805: [KernelAddressSanitizer] Make globals constructors compatible with kernel.

Hi, this broke check-clang on mac: http://45.33.8.238/mac/14998/step_7.txt

Please take a look, and if it takes a while to fix please revert while you investigate.

Jun 5 2020, 2:05 PM · Restricted Project, Restricted Project
melver created D81306: [ASan][Test] Fix globals test for Mach-O.
Jun 5 2020, 2:03 PM · Restricted Project
melver committed rG866ee2353f7d: [KernelAddressSanitizer] Make globals constructors compatible with kernel (authored by melver).
[KernelAddressSanitizer] Make globals constructors compatible with kernel
Jun 5 2020, 11:47 AM
melver closed D80805: [KernelAddressSanitizer] Make globals constructors compatible with kernel.
Jun 5 2020, 11:46 AM · Restricted Project, Restricted Project
melver updated the summary of D80805: [KernelAddressSanitizer] Make globals constructors compatible with kernel.
Jun 5 2020, 7:45 AM · Restricted Project, Restricted Project
melver updated the diff for D80805: [KernelAddressSanitizer] Make globals constructors compatible with kernel.

Update IR test.

Jun 5 2020, 7:45 AM · Restricted Project, Restricted Project

Jun 2 2020

melver added a comment to D80805: [KernelAddressSanitizer] Make globals constructors compatible with kernel.

Could you please add an IR test for this?

Was planning to -- sorry, I should have mentioned: before I go add tests, does this look sane to you?

I thought we didn't have support for __attribute__((constructor)) in the kernel? Does GCC emit constructors for globals with KASAN?

Jun 2 2020, 10:25 AM · Restricted Project, Restricted Project

May 29 2020

melver added a comment to D80805: [KernelAddressSanitizer] Make globals constructors compatible with kernel.

Could you please add an IR test for this?

May 29 2020, 12:00 PM · Restricted Project, Restricted Project
melver updated the diff for D80805: [KernelAddressSanitizer] Make globals constructors compatible with kernel.

Add missing comment.

May 29 2020, 8:39 AM · Restricted Project, Restricted Project
melver updated the summary of D80805: [KernelAddressSanitizer] Make globals constructors compatible with kernel.
May 29 2020, 8:39 AM · Restricted Project, Restricted Project
melver created D80805: [KernelAddressSanitizer] Make globals constructors compatible with kernel.
May 29 2020, 8:39 AM · Restricted Project, Restricted Project

May 28 2020

melver added a comment to D79628: [Clang][Driver] Add Bounds and Thread to SupportsCoverage list.

clang/test/CodeGen/sanitize-coverage.c is also failing our downstream embedded ARMv7 validations.

May 28 2020, 8:44 AM · Restricted Project, Restricted Project
melver added inline comments to D80197: [DebugInfo] Upgrade DISubrange to support Fortran dynamic arrays.
May 28 2020, 5:57 AM · Restricted Project, Restricted Project, debug-info
melver committed rG69935d86aed1: [Clang][Sanitizers] Expect test failure on {arm,thumb}v7 (authored by melver).
[Clang][Sanitizers] Expect test failure on {arm,thumb}v7
May 28 2020, 2:41 AM
melver closed D80668: [Clang][Sanitizers] Expect test failure on {arm,thumb}v7.
May 28 2020, 2:40 AM · Restricted Project
melver updated the diff for D80668: [Clang][Sanitizers] Expect test failure on {arm,thumb}v7.

Add link to bug.

May 28 2020, 2:07 AM · Restricted Project
melver updated the summary of D80668: [Clang][Sanitizers] Expect test failure on {arm,thumb}v7.
May 28 2020, 2:07 AM · Restricted Project

May 27 2020

melver added a comment to D80668: [Clang][Sanitizers] Expect test failure on {arm,thumb}v7.

Example of failing test:
http://lab.llvm.org:8011/builders/clang-cmake-armv7-full/builds/10689

May 27 2020, 3:16 PM · Restricted Project
melver created D80668: [Clang][Sanitizers] Expect test failure on {arm,thumb}v7.
May 27 2020, 3:16 PM · Restricted Project
melver added a comment to D79628: [Clang][Driver] Add Bounds and Thread to SupportsCoverage list.

the Clang sanitize-coverage.c test gets crashed on Windows platform for armv7 target:

  • FAIL: Clang::sanitize-coverage.c
# command stderr:
Pass 'Run-time bounds checking' is not initialized.

Verify if there is a pass dependency cycle.

Required Passes:

	Target Library Information
...

see more details here: http://lab.llvm.org:8011/builders/llvm-clang-win-x-armv7l/builds/7561/steps/test-check-clang/logs/FAIL%3A%20Clang%3A%3Asanitize-coverage.c

The first failed build: http://lab.llvm.org:8011/builders/llvm-clang-win-x-armv7l/builds/7561

Would you take care of it?

May 27 2020, 2:43 PM · Restricted Project, Restricted Project

May 26 2020

melver updated the summary of D79628: [Clang][Driver] Add Bounds and Thread to SupportsCoverage list.
May 26 2020, 9:11 AM · Restricted Project, Restricted Project
melver abandoned D80428: [clang] Optimize SourceManager::getFileIDLocal [WIP].

More background: https://github.com/ClangBuiltLinux/linux/issues/1032

May 26 2020, 3:44 AM · Restricted Project

May 25 2020

melver updated the diff for D79628: [Clang][Driver] Add Bounds and Thread to SupportsCoverage list.

Add missing -target to sanitize-coverage-bounds test.

May 25 2020, 11:46 AM · Restricted Project, Restricted Project
melver updated the diff for D79628: [Clang][Driver] Add Bounds and Thread to SupportsCoverage list.

-triple -> -target

May 25 2020, 11:14 AM · Restricted Project, Restricted Project
melver updated the diff for D79628: [Clang][Driver] Add Bounds and Thread to SupportsCoverage list.

Address failing tests:

  • Set -triple for test.
  • Some existing tests now pass under TSAN, and can be enabled.
May 25 2020, 10:42 AM · Restricted Project, Restricted Project

May 22 2020

melver updated the diff for D80428: [clang] Optimize SourceManager::getFileIDLocal [WIP].

Improve code-gen further -- another ~5%.

May 22 2020, 12:20 PM · Restricted Project
melver retitled D80428: [clang] Optimize SourceManager::getFileIDLocal [WIP] from [clang] Optimize getFileIDLocal to [clang] Optimize getFileIDLocal [WIP].
May 22 2020, 6:23 AM · Restricted Project
melver updated the diff for D80428: [clang] Optimize SourceManager::getFileIDLocal [WIP].

Extra unlikely hint.

May 22 2020, 5:51 AM · Restricted Project
melver created D80428: [clang] Optimize SourceManager::getFileIDLocal [WIP].
May 22 2020, 4:45 AM · Restricted Project

May 19 2020

melver added a comment to D78162: [CodeGen] Mark inline definitions of builtins as nobuiltin only if we plan to emit them..

This seems to be causing problems for the Linux kernel with ASan instrumentation enabled: https://lkml.kernel.org/r/20200518180513.GA114619@google.com

May 19 2020, 3:45 AM · Restricted Project

May 15 2020

melver added a comment to D79983: [TSAN] Add option to allow instrumenting reads of reads-before-writes.

Maybe this flag should turn off instrumentation of the "atomic" writes? Then the "reads-before-write" are not before writes anymore and will be naturally instrumented. And we also get faster execution. What do you think?

May 15 2020, 1:35 AM · Restricted Project
melver created D79983: [TSAN] Add option to allow instrumenting reads of reads-before-writes.
May 15 2020, 12:08 AM · Restricted Project
melver added a reviewer for D79983: [TSAN] Add option to allow instrumenting reads of reads-before-writes: glider.
May 15 2020, 12:08 AM · Restricted Project

May 14 2020

melver updated the diff for D79628: [Clang][Driver] Add Bounds and Thread to SupportsCoverage list.

Fix formatting.

May 14 2020, 3:14 PM · Restricted Project, Restricted Project
melver updated the summary of D79628: [Clang][Driver] Add Bounds and Thread to SupportsCoverage list.
May 14 2020, 3:14 PM · Restricted Project, Restricted Project
melver updated the diff for D79628: [Clang][Driver] Add Bounds and Thread to SupportsCoverage list.

Add tests checking that when passing the combination of the sanitizer flags to Clang, we generate instrumentation for all enabled sanitizers.

May 14 2020, 3:14 PM · Restricted Project, Restricted Project

May 12 2020

melver updated subscribers of D79628: [Clang][Driver] Add Bounds and Thread to SupportsCoverage list.
May 12 2020, 5:20 AM · Restricted Project, Restricted Project

May 8 2020

melver created D79628: [Clang][Driver] Add Bounds and Thread to SupportsCoverage list.
May 8 2020, 6:56 AM · Restricted Project, Restricted Project

Apr 22 2020

melver added a comment to D78554: [TSAN] Add optional support for distinguishing volatiles.

Any objections, anybody?

Marco, do you want me to land this?

Thanks! I don't think I have access to land.

Apr 22 2020, 4:17 AM · Restricted Project

Apr 21 2020

melver added a comment to D78554: [TSAN] Add optional support for distinguishing volatiles.

Any objections, anybody?

Marco, do you want me to land this?

Apr 21 2020, 9:41 AM · Restricted Project
melver added a comment to D78554: [TSAN] Add optional support for distinguishing volatiles.

FYI the build failures seem entirely unrelated and look like LLDB is broken.

Apr 21 2020, 8:37 AM · Restricted Project
melver added a comment to D78554: [TSAN] Add optional support for distinguishing volatiles.

I am not opposed to adding this in general. Andrey did the same for KTSAN in gcc long time ago.
However, this feature will be present only in the newest clang and not in gcc. So what is the use story for kernel? Do we make KCSAN require the newest clang? I think majority of kernel developers use gcc.

Apr 21 2020, 6:59 AM · Restricted Project
melver added reviewers for D78554: [TSAN] Add optional support for distinguishing volatiles: dvyukov, glider.
Apr 21 2020, 5:22 AM · Restricted Project
melver created D78554: [TSAN] Add optional support for distinguishing volatiles.
Apr 21 2020, 5:22 AM · Restricted Project

Feb 4 2019

melver added a comment to D56935: [NewPM] Add support for new-PM plugins to clang.

Landed it for you in r352972. Thanks!

Feb 4 2019, 11:14 AM · Restricted Project

Jan 30 2019

melver added a comment to D56935: [NewPM] Add support for new-PM plugins to clang.

Gentle ping. Need someone to land this on my behalf, as I do not have commit access. Many thanks!

Jan 30 2019, 9:31 PM · Restricted Project

Jan 26 2019

melver added a comment to D56935: [NewPM] Add support for new-PM plugins to clang.

It would be good to check, since the bots won't! Otherwise this looks good.

Jan 26 2019, 2:32 PM · Restricted Project
melver updated the diff for D56935: [NewPM] Add support for new-PM plugins to clang.
  • Improve error reporting. While testing on Windows, noticed that Clang wants the error to be checked otherwise crashed quite verbosely.
Jan 26 2019, 11:28 AM · Restricted Project

Jan 23 2019

melver added a comment to D56935: [NewPM] Add support for new-PM plugins to clang.

I'm not sure what the current state of plugins on windows is. They were broken and disabled last time I worked on this, but that might've changed in the meantime! Worth checking.

Jan 23 2019, 11:40 AM · Restricted Project
melver updated the diff for D56935: [NewPM] Add support for new-PM plugins to clang.
  • Revert use of SmallVector
Jan 23 2019, 11:38 AM · Restricted Project

Jan 22 2019

melver added a comment to D56935: [NewPM] Add support for new-PM plugins to clang.

This generally looks sane. What will happen on windows though? Will it silently fa

AFAIK PassPlugin::Load uses sys::DynamicLibrary::getPermanentLibrary, which uses DynamicLibrary::HandleSet::AddLibrary which works for Windows as well. (The story is similar to legacy -fplugin=).

Jan 22 2019, 4:35 PM · Restricted Project
melver added a comment to D56935: [NewPM] Add support for new-PM plugins to clang.

This generally looks sane. What will happen on windows though? Will it silently fail?

Jan 22 2019, 1:45 PM · Restricted Project
melver updated the diff for D56935: [NewPM] Add support for new-PM plugins to clang.
  • Use SmallVector in CodeGenOptions.h
Jan 22 2019, 1:41 PM · Restricted Project