public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: will schmidt <will_schmidt@vnet.ibm.com>
To: Bill Schmidt <wschmidt@linux.ibm.com>, gcc-patches@gcc.gnu.org
Cc: dje.gcc@gmail.com, segher@kernel.crashing.org
Subject: Re: [PATCH 0/4] [rs6000] ROP support
Date: Mon, 26 Apr 2021 11:01:46 -0500	[thread overview]
Message-ID: <f02e5f9583d1265ccfb5ab99ec1f65bf08f7c4b4.camel@vnet.ibm.com> (raw)
In-Reply-To: <cover.1619400506.git.wschmidt@linux.ibm.com>

On Sun, 2021-04-25 at 20:50 -0500, Bill Schmidt via Gcc-patches wrote:
> Add POWER10 support for hashst[p] and hashchk[p] operations.  When
> the -mrop-protect option is selected, any function that loads the
> link
> register from memory before returning must have protection in the
> prologue and epilogue to ensure the link register save location has
> not been compromised.  If -mprivileged is also specified, the
> protection instructions generated require supervisor privilege.

Hi,

Is -mprivileged tied directly to ROP, or is it a 'generic' option?

As
is, it looks like it can be considered generic, so could be also used
for other cases where we would want to generate instructions that
require supervisor privilege.

Additional comments on the subsequent patches.. 
thanks
-Will

> 
> The patches are broken up into logical chunks:
>  - Option handling
>  - Instruction generation
>  - Predefined macro handling
>  - Test cases
> 
> Bootstrapped and tested on a POWER10 system with no regressions.
> Tests on a kernel that enables user-space ROP mitigation were
> successful.  Is this series ok for trunk?  I would also like to later
> backport these patches to GCC for the 11.2 release.
> 
> Thanks!
> Bill
> 
> Bill Schmidt (4):
>   rs6000: Add -mrop-protect and -mprivileged flags
>   rs6000: Emit ROP-protect instructions in prologue and epilogue
>   rs6000: Conditionally define __ROP_PROTECT__
>   rs6000: Add ROP tests
> 
>  gcc/config/rs6000/rs6000-c.c             |  3 +
>  gcc/config/rs6000/rs6000-internal.h      |  2 +
>  gcc/config/rs6000/rs6000-logue.c         | 86 +++++++++++++++++++++-
> --
>  gcc/config/rs6000/rs6000.c               |  7 ++
>  gcc/config/rs6000/rs6000.md              | 39 +++++++++++
>  gcc/config/rs6000/rs6000.opt             |  6 ++
>  gcc/doc/invoke.texi                      | 19 +++++-
>  gcc/testsuite/gcc.target/powerpc/rop-1.c | 16 +++++
>  gcc/testsuite/gcc.target/powerpc/rop-2.c | 16 +++++
>  gcc/testsuite/gcc.target/powerpc/rop-3.c | 19 ++++++
>  gcc/testsuite/gcc.target/powerpc/rop-4.c | 14 ++++
>  gcc/testsuite/gcc.target/powerpc/rop-5.c | 17 +++++
>  12 files changed, 231 insertions(+), 13 deletions(-)
>  create mode 100644 gcc/testsuite/gcc.target/powerpc/rop-1.c
>  create mode 100644 gcc/testsuite/gcc.target/powerpc/rop-2.c
>  create mode 100644 gcc/testsuite/gcc.target/powerpc/rop-3.c
>  create mode 100644 gcc/testsuite/gcc.target/powerpc/rop-4.c
>  create mode 100644 gcc/testsuite/gcc.target/powerpc/rop-5.c
> 


  parent reply	other threads:[~2021-04-26 16:01 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-26  1:50 Bill Schmidt
2021-04-26  1:50 ` [PATCH 1/4] rs6000: Add -mrop-protect and -mprivileged flags Bill Schmidt
2021-04-26 16:02   ` will schmidt
2021-05-12 20:40     ` Segher Boessenkool
2021-05-12 20:26   ` Segher Boessenkool
2021-04-26  1:50 ` [PATCH 2/4] rs6000: Emit ROP-protect instructions in prologue and epilogue Bill Schmidt
2021-04-26 16:03   ` will schmidt
2021-05-12 23:09   ` Segher Boessenkool
2021-04-26  1:50 ` [PATCH 3/4] rs6000: Conditionally define __ROP_PROTECT__ Bill Schmidt
2021-04-26 16:03   ` will schmidt
2021-05-12 23:19     ` Segher Boessenkool
2021-05-12 23:20   ` Segher Boessenkool
2021-04-26  1:50 ` [PATCH 4/4] rs6000: Add ROP tests Bill Schmidt
2021-04-26 16:04   ` will schmidt
2021-04-26 19:27     ` Bill Schmidt
2021-05-12 23:25       ` Segher Boessenkool
2021-05-12 23:42   ` Segher Boessenkool
2021-04-26 16:01 ` will schmidt [this message]
2021-04-26 16:33   ` [PATCH 0/4] [rs6000] ROP support Bill Schmidt
2021-05-11 15:56 ` Bill Schmidt

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=f02e5f9583d1265ccfb5ab99ec1f65bf08f7c4b4.camel@vnet.ibm.com \
    --to=will_schmidt@vnet.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=segher@kernel.crashing.org \
    --cc=wschmidt@linux.ibm.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).