public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [wwwdocs] Document new Hardware-assisted AddressSanitizer
@ 2020-12-14 12:26 Matthew Malcomson
  2020-12-14 23:45 ` Gerald Pfeifer
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Malcomson @ 2020-12-14 12:26 UTC (permalink / raw)
  To: gcc-patches; +Cc: richard.sandiford, Kyrylo.Tkachov

[-- Attachment #1: Type: text/plain, Size: 1863 bytes --]

gcc-11/changes: Document new Hardware-assisted AddressSanitizer.

I have put it in the "general" section rather than AArch64 since the feature
does add a general framework, so I believe the news is interesting for people
interesting in architectures other than AArch64 that may want to implement this
for their own targets (where possible).


###############     Attachment also inlined for ease of reply    ###############


diff --git a/htdocs/gcc-11/changes.html b/htdocs/gcc-11/changes.html
index 46a6a37225526227fb6a46d9d3248d6ba9f36a07..0127a3f99f2ca897bf1c32e967d359fb9ace6f6b 100644
--- a/htdocs/gcc-11/changes.html
+++ b/htdocs/gcc-11/changes.html
@@ -116,6 +116,24 @@ a work-in-progress.</p>
       option (which defaults to 8 spaces per tab stop).
     </p>
   </li>
+  <li>
+    <p>
+    Introduce <a href="http://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html">
+      Hardware-assisted AddressSanitizer</a> support.  This sanitizer currently only works
+    for the AArch64 target.  It helps debug address problems similarly to
+    <a href="https://github.com/google/sanitizers/wiki/AddressSanitizer">
+      AddressSanitizer</a> but is based on partial hardware assistance and
+    provides probabilistic protection to use less RAM at runtime.
+    <a href="http://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html">
+      Hardware-assisted AddressSanitizer</a> is not production-ready for userspace, and is
+    provided mainly for use compiling the Linux Kernel.
+    </p>
+    To use this sanitizer the command line arguments are:
+    <ul>
+      <li><code>-fsanitize=hwaddress</code> to instrument userspace code.</li>
+      <li><code>-fsanitize=kernel-hwaddress</code> to instrument kernel code.</li>
+    </ul>
+  </li>
 </ul>
 
 <!-- .................................................................. -->


[-- Attachment #2: hwasan-doc.patch --]
[-- Type: text/plain, Size: 1437 bytes --]

diff --git a/htdocs/gcc-11/changes.html b/htdocs/gcc-11/changes.html
index 46a6a37225526227fb6a46d9d3248d6ba9f36a07..0127a3f99f2ca897bf1c32e967d359fb9ace6f6b 100644
--- a/htdocs/gcc-11/changes.html
+++ b/htdocs/gcc-11/changes.html
@@ -116,6 +116,24 @@ a work-in-progress.</p>
       option (which defaults to 8 spaces per tab stop).
     </p>
   </li>
+  <li>
+    <p>
+    Introduce <a href="http://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html">
+      Hardware-assisted AddressSanitizer</a> support.  This sanitizer currently only works
+    for the AArch64 target.  It helps debug address problems similarly to
+    <a href="https://github.com/google/sanitizers/wiki/AddressSanitizer">
+      AddressSanitizer</a> but is based on partial hardware assistance and
+    provides probabilistic protection to use less RAM at runtime.
+    <a href="http://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html">
+      Hardware-assisted AddressSanitizer</a> is not production-ready for userspace, and is
+    provided mainly for use compiling the Linux Kernel.
+    </p>
+    To use this sanitizer the command line arguments are:
+    <ul>
+      <li><code>-fsanitize=hwaddress</code> to instrument userspace code.</li>
+      <li><code>-fsanitize=kernel-hwaddress</code> to instrument kernel code.</li>
+    </ul>
+  </li>
 </ul>
 
 <!-- .................................................................. -->


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [wwwdocs] Document new Hardware-assisted AddressSanitizer
  2020-12-14 12:26 [wwwdocs] Document new Hardware-assisted AddressSanitizer Matthew Malcomson
@ 2020-12-14 23:45 ` Gerald Pfeifer
  0 siblings, 0 replies; 2+ messages in thread
From: Gerald Pfeifer @ 2020-12-14 23:45 UTC (permalink / raw)
  To: Matthew Malcomson; +Cc: gcc-patches, Richard Sandiford

On Mon, 14 Dec 2020, Matthew Malcomson via Gcc-patches wrote:
> gcc-11/changes: Document new Hardware-assisted AddressSanitizer.
> 
> I have put it in the "general" section rather than AArch64 since the 
> feature does add a general framework, so I believe the news is 
> interesting for people interesting in architectures other than AArch64 
> that may want to implement this for their own targets (where possible).

This makes sense (and looks useful), thank you!


Some minor nits; the patch is fine with few changes:

> +    Introduce <a href="http://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html">

I recommend to make this and the ohter links https; clang.llvm.org
does not redirect from http to https, but offers both.

> +    provides probabilistic protection to use less RAM at runtime.

"run time"

(Per https://gcc.gnu.org/codingconventions.html#Spelling we use that
for the noun, and "run-time" for the adjective in that case; "runtime"
for libraries and system support.)

> +      Hardware-assisted AddressSanitizer</a> is not production-ready 
>   for userspace, and is

"user space" (and the line appears quite a bit long)

Cheers,
Gerald

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-14 23:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-14 12:26 [wwwdocs] Document new Hardware-assisted AddressSanitizer Matthew Malcomson
2020-12-14 23:45 ` Gerald Pfeifer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).