public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/114759] New: Power: multiple issues with -mrop-protect
@ 2024-04-17 21:18 bergner at gcc dot gnu.org
  2024-04-17 21:19 ` [Bug target/114759] " bergner at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: bergner at gcc dot gnu.org @ 2024-04-17 21:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114759

            Bug ID: 114759
           Summary: Power: multiple issues with -mrop-protect
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bergner at gcc dot gnu.org
  Target Milestone: ---

There are multiple issues with the -mrop-protect option which are all
inter-related.

1. We always define the __ROP_PROTECT__ predefined macro when using
-mrop-protect, even when we've silently disabled ROP protection because of a
too old -mcpu=CPU value.  We should only emit __ROP_PROTECT__ when it's legal
to emit the ROP insns.

2. We always disable shrink-wrapping when -mrop-protect is used, even when
we've silently disabled ROP protection because of a too old -mcpu=CPU value. 
We should not disable shrink-wrapping if we've disabled ROP protection.

3. We silently disable ROP protection for everything other than -mcpu=power10. 
The binutils assembler accepts the ROP insns back to Power8, so we should emit
them for Power8 and later.

4. We give an error when -mrop-protect is used with any -mabi=ABI value not
equal to ELFv2, whereas a too old -mcpu=CPU value only causes us to silently
disable ROP protection.  I think both scenarios should behave similarly, so
either we silently disable ROP protection for both or we give an error for
both.

This is not a regression.  I consider 1. to be a correctness/wrong code bug.

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

end of thread, other threads:[~2024-06-19 22:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-17 21:18 [Bug target/114759] New: Power: multiple issues with -mrop-protect bergner at gcc dot gnu.org
2024-04-17 21:19 ` [Bug target/114759] " bergner at gcc dot gnu.org
2024-04-17 22:39 ` segher at gcc dot gnu.org
2024-04-18  0:56 ` bergner at gcc dot gnu.org
2024-04-18  2:15 ` bergner at gcc dot gnu.org
2024-04-18  2:24 ` bergner at gcc dot gnu.org
2024-06-18 23:09 ` bergner at gcc dot gnu.org
2024-06-19 22:03 ` bergner at gcc dot gnu.org

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).