From: Hongtao Liu <crazylht@gmail.com>
To: liuhongt <hongtao.liu@intel.com>
Cc: gcc-patches@gcc.gnu.org, hjl.tools@gmail.com, ubizjak@gmail.com
Subject: Re: [PATCH 0/2] Support HWASAN with Intel LAM
Date: Mon, 28 Nov 2022 11:35:37 +0800 [thread overview]
Message-ID: <CAMZc-byQCYEfPYTjwW2Tudu1xgLt3=9yxa9u7r+f0zDiQmqZ=Q@mail.gmail.com> (raw)
In-Reply-To: <20221111012631.76776-1-hongtao.liu@intel.com>
On Fri, Nov 11, 2022 at 9:26 AM liuhongt <hongtao.liu@intel.com> wrote:
>
> 2 years ago, ARM folks support HWASAN[1] in GCC[2], and introduced several
> target hooks(Many thanks to their work) so other backends can do similar
> things if they have similar feature.
> Intel LAM(linear Address Masking)[3 Charpter 14] supports similar feature with
> the upper bits of pointers can be used as metadata, LAM support two modes:
> LAM_U48:bits 48-62 can be used as metadata
> LAM_U57:bits 57-62 can be used as metedata.
>
> These 2 patches mainly support those target hooks, but HWASAN is not really
> enabled until the final decision for the LAM kernel interface which may take
> quite a long time. We have verified our patches with a "fake" interface locally[4], and
> decided to push the backend patches to the GCC13 to make other HWASAN developper's work
> easy.
>
> [1] https://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html
> [2] https://gcc.gnu.org/pipermail/gcc-patches/2020-November/557857.html
> [3] https://www.intel.com/content/dam/develop/external/us/en/documents/architecture-instruction-set-extensions-programming-reference.pdf
> [4] https://gitlab.com/x86-gcc/gcc/-/tree/users/intel/lam/master
>
>
> Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}.
> Ok for trunk?
I'll install 2 patches if there's no objections in next 7 days.
>
> liuhongt (2):
> Implement hwasan target_hook.
> Enable hwasan for x86-64.
>
> gcc/config/i386/i386-expand.cc | 12 ++++
> gcc/config/i386/i386-options.cc | 3 +
> gcc/config/i386/i386-opts.h | 6 ++
> gcc/config/i386/i386-protos.h | 2 +
> gcc/config/i386/i386.cc | 123 ++++++++++++++++++++++++++++++++
> gcc/config/i386/i386.opt | 16 +++++
> libsanitizer/configure.tgt | 1 +
> 7 files changed, 163 insertions(+)
>
> --
> 2.18.1
>
--
BR,
Hongtao
next prev parent reply other threads:[~2022-11-28 3:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-11 1:26 liuhongt
2022-11-11 1:26 ` [PATCH 1/2] Implement hwasan target_hook liuhongt
2022-11-30 5:21 ` [PATCH 1/2 V2] " liuhongt
2022-11-11 1:26 ` [PATCH 2/2] Enable hwasan for x86-64 liuhongt
2022-11-28 3:35 ` Hongtao Liu [this message]
2022-11-28 7:12 ` [PATCH 0/2] Support HWASAN with Intel LAM Uros Bizjak
2022-11-28 14:40 ` Martin Liška
2022-11-29 2:10 ` H.J. Lu
2022-11-29 2:37 ` Hongtao Liu
2022-11-30 14:07 ` Martin Liška
2022-12-09 2:04 ` Hongtao Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMZc-byQCYEfPYTjwW2Tudu1xgLt3=9yxa9u7r+f0zDiQmqZ=Q@mail.gmail.com' \
--to=crazylht@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hjl.tools@gmail.com \
--cc=hongtao.liu@intel.com \
--cc=ubizjak@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).