public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] AArch64: Remove BTI from outline atomics
       [not found] <PAWPR08MB8982EDEA30B35BFB7178002283C3A@PAWPR08MB8982.eurprd08.prod.outlook.com>
@ 2023-09-26 13:46 ` Wilco Dijkstra
  2023-09-26 14:15   ` Richard Earnshaw (lists)
  0 siblings, 1 reply; 2+ messages in thread
From: Wilco Dijkstra @ 2023-09-26 13:46 UTC (permalink / raw)
  To: GCC Patches; +Cc: Richard Sandiford, Richard Earnshaw, Ramana Radhakrishnan


The outline atomic functions have hidden visibility and can only be called
directly.  Therefore we can remove the BTI at function entry.  This improves
security by reducing the number of indirect entry points in a binary.
The BTI markings on the objects are still emitted.

Passes regress, OK for commit?

libgcc/ChangeLog:
        * config/aarch64/lse.S (BTI_C): Remove define.

---

diff --git a/libgcc/config/aarch64/lse.S b/libgcc/config/aarch64/lse.S
index ba05047ff02b6fc5752235bffa924fc4a2f48c04..dbfb83fb09083641bf06c50b631a5f27bdf61b80 100644
--- a/libgcc/config/aarch64/lse.S
+++ b/libgcc/config/aarch64/lse.S
@@ -163,8 +163,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define tmp3    14
 #define tmp4    13
 
-#define BTI_C  hint    34
-
 /* Start and end a function.  */
 .macro  STARTFN name
         .text
@@ -174,7 +172,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
         .type   \name, %function
         .cfi_startproc
 \name:
-       BTI_C
 .endm
 
 .macro  ENDFN name

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

* Re: [PATCH] AArch64: Remove BTI from outline atomics
  2023-09-26 13:46 ` [PATCH] AArch64: Remove BTI from outline atomics Wilco Dijkstra
@ 2023-09-26 14:15   ` Richard Earnshaw (lists)
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Earnshaw (lists) @ 2023-09-26 14:15 UTC (permalink / raw)
  To: Wilco Dijkstra, GCC Patches; +Cc: Richard Sandiford, Ramana Radhakrishnan

On 26/09/2023 14:46, Wilco Dijkstra wrote:
> 
> The outline atomic functions have hidden visibility and can only be called
> directly.  Therefore we can remove the BTI at function entry.  This improves
> security by reducing the number of indirect entry points in a binary.
> The BTI markings on the objects are still emitted.

Please can you add a comment to that effect in the source code.  OK with that change.

R.

> 
> Passes regress, OK for commit?
> 
> libgcc/ChangeLog:
>         * config/aarch64/lse.S (BTI_C): Remove define.
> 
> ---
> 
> diff --git a/libgcc/config/aarch64/lse.S b/libgcc/config/aarch64/lse.S
> index ba05047ff02b6fc5752235bffa924fc4a2f48c04..dbfb83fb09083641bf06c50b631a5f27bdf61b80 100644
> --- a/libgcc/config/aarch64/lse.S
> +++ b/libgcc/config/aarch64/lse.S
> @@ -163,8 +163,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
>  #define tmp3    14
>  #define tmp4    13
>  
> -#define BTI_C  hint    34
> -
>  /* Start and end a function.  */
>  .macro  STARTFN name
>          .text
> @@ -174,7 +172,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
>          .type   \name, %function
>          .cfi_startproc
>  \name:
> -       BTI_C
>  .endm
>  
>  .macro  ENDFN name


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

end of thread, other threads:[~2023-09-26 14:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <PAWPR08MB8982EDEA30B35BFB7178002283C3A@PAWPR08MB8982.eurprd08.prod.outlook.com>
2023-09-26 13:46 ` [PATCH] AArch64: Remove BTI from outline atomics Wilco Dijkstra
2023-09-26 14:15   ` Richard Earnshaw (lists)

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