[llvm-dev] GWP-Tsan’s questions

Matt Morehouse via llvm-dev llvm-dev at lists.llvm.org
Thu Feb 4 10:17:51 PST 2021


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/20210204/67043431/attachment.html>


More information about the llvm-dev mailing list