<div dir="ltr"><div dir="ltr">Hi Pierre,<div><br></div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 4, 2021 at 4:50 AM pierre gousseau <<a href="mailto:pierregousseau14@gmail.com" target="_blank">pierregousseau14@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">Hi All,</p><p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><br></p>

<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">Thanks @Matt Morehouse for a very interesting talk on GWP-TSan
at the 2020 developpers’ meeting.</p>

<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">I was wondering if some more details about GWP-TSan could be shared.</p></div></blockquote><div><div>We've had some developments with GWP-TSan since the LLVM talk last year.</div><div><br></div><div>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.</div><div><br></div><div>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.  <a class="gmail_plusreply" id="m_8067765633463961490plusReplyChip-0" href="mailto:dvyukov@google.com" target="_blank">+Dmitry Vyukov</a> is <a href="https://lore.kernel.org/lkml/CACT4Y+YeRtOTsMQ8xxZg-=nbv+yuJvYYhBErT46M8jtSHmiw6g@mail.gmail.com/">looking into</a> kernel patches that should help.</div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">

<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">Are private
patches to the OS needed? Which OS are supported?</p></div></blockquote><div>Linux is the only OS we're interested in currently.  Any patches needed will likely go upstream.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">

<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">In which llvm projects is the feature implemented?</p></div></blockquote><div>None yet; still in prototype phase.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">

<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">Is there a plan to make GWP-TSan available in open source?</p></div></blockquote><div>Yes, if/when we have a production-ready version it will likely be available in <a href="https://github.com/google/tcmalloc">TCMalloc</a> first, and compiler-rt later.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">

<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"> </p>

<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">Best Regards,</p>

<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><br></p><p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">Pierre</p></div></blockquote><div><br></div><div>- Matt </div></div></div>