This is the mail archive of the
mailing list for the GCC project.
Re: Question on direction of GCC support for HWASAN.
- From: "Evgenii Stepanov via gcc-patches" <gcc-patches at gcc dot gnu dot org>
- To: Szabolcs Nagy <Szabolcs dot Nagy at arm dot com>
- Cc: Martin Liška <mliska at suse dot cz>, Matthew Malcomson <Matthew dot Malcomson at arm dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, nd <nd at arm dot com>, "kcc at google dot com" <kcc at google dot com>, Peter Collingbourne <pcc at google dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>, Jakub Jelinek <jakub at redhat dot com>
- Date: Tue, 24 Sep 2019 11:09:02 -0700
- Subject: Re: Question on direction of GCC support for HWASAN.
- References: <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org>
- Reply-to: Evgenii Stepanov <eugenis at google dot com>
On Tue, Sep 24, 2019 at 9:36 AM Szabolcs Nagy <Szabolcs.Nagy@arm.com> wrote:
> On 23/09/2019 08:52, Martin Liška wrote:
> > On 9/20/19 7:11 PM, Matthew Malcomson wrote:
> >> The implementation is unlikely to be production-quality since
> >> development on libhwasan is only on its `platform` ABI. This libhwasan
> >> ABI requires changes to the system libc so that it calls into libhwasan
> >> on interesting events.
> >> I haven't looked into adding these changes to glibc, but expect that
> >> most people running a Linux distribution would not want to install a
> >> special glibc to use this sanitizer.
> > Can you please provide a link about what special one needs in glibc
> > to support HWASAN?
> i don't know if there is such a link other than taking
> a hint from the internal api in the source
> memory has to be (un)tagged on (de)allocation, which
> requires libc help to know the limits and when the
> (de)allocation happens in case of tls/stack memory
> (e.g. dealloced at unwind, longjmp, setcontext, thread
> exit, thread cancel, child exit after vfork) and in
> case of global data in dynamically loaded shared libs.
This is a slightly better link, but it misses
You can also search bionic source for __hwasan and __sanitizer: