[llvm-dev] GWP-Tsan’s questions

Pierre Gousseau via llvm-dev llvm-dev at lists.llvm.org
Fri Feb 5 03:48:49 PST 2021


Hi Matt,

Thank you for the update!

Supporting 10k threads would be great!

I have some more questions if that is ok.

With hardware breakpoints, can GWP-TSan run along a debugger?

Does the current GWP-TSan prototype need compiler instrumentation or
changes to the linker?



Best Regards,


Pierre

On Thu, 4 Feb 2021 at 18:18, Matt Morehouse <mascasa at google.com> wrote:

> Hi Pierre,
>
> On Thu, Feb 4, 2021 at 4:50 AM pierre gousseau <pierregousseau14 at gmail.com>
> wrote:
>
>> Hi All,
>>
>>
>> Thanks @Matt Morehouse for a very interesting talk on GWP-TSan at the
>> 2020 developpers’ meeting.
>>
>> I was wondering if some more details about GWP-TSan could be shared.
>>
> We've had some developments with GWP-TSan since the LLVM talk last year.
>
> The prototype discussed in that talk used page protections as the
> watchpoint mechanism and required syscall wrappers to avoid EFAULT.  We
> have since realized that implementing the syscall wrappers is too tricky to
> get 100% right, and introduces ongoing maintenance burden that we'd like to
> avoid.
>
> Our current line of investigation is using hardware watchpoints
> (perf_event_open) instead, which come with their own set of challenges.
> One major challenge is contention in the kernel over the perf event data
> structures, causing unacceptable overhead for production use.  +Dmitry
> Vyukov <dvyukov at google.com> is looking into
> <https://lore.kernel.org/lkml/CACT4Y+YeRtOTsMQ8xxZg-=nbv+yuJvYYhBErT46M8jtSHmiw6g@mail.gmail.com/>
> kernel patches that should help.
>
>
>> Are private patches to the OS needed? Which OS are supported?
>>
> Linux is the only OS we're interested in currently.  Any patches needed
> will likely go upstream.
>
>
>> In which llvm projects is the feature implemented?
>>
> None yet; still in prototype phase.
>
>
>> Is there a plan to make GWP-TSan available in open source?
>>
> Yes, if/when we have a production-ready version it will likely be
> available in TCMalloc <https://github.com/google/tcmalloc> first, and
> compiler-rt later.
>
>
>>
>>
>> Best Regards,
>>
>>
>> Pierre
>>
>
> - Matt
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210205/4b914c4e/attachment.html>


More information about the llvm-dev mailing list