public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "wilco at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/106671] aarch64: BTI instruction are not inserted for cross-section direct calls
Date: Fri, 11 Aug 2023 09:28:28 +0000	[thread overview]
Message-ID: <bug-106671-4-xwtKVyhfsA@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106671-4@http.gcc.gnu.org/bugzilla/>

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

Wilco <wilco at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wilco at gcc dot gnu.org

--- Comment #10 from Wilco <wilco at gcc dot gnu.org> ---
(In reply to Feng Xue from comment #9)
> On some occasions, we may not use the new ld, the kernel-building relies on
> its own runtime linker which is used for kernel modules. So I created a
> patch (https://gcc.gnu.org/pipermail/gcc-patches/2023-August/626084.html),
> and this provides user another option that could be done at the compiler
> side.

Reducing BTI is important for security. With LTO a binary should only have BTI
on functions that are indirectly called. So I don't like the idea of adding
more BTI with a new option - it means we will need a linker optimization to
remove those redundant BTIs (eg. by changing them into NOPs).

Note that branch offsets up to 256MB don't need special veneer handling: one
should place a direct branch about halfway to the destination.

Does Linux do any weird hacks in -fpatchable-function-entry that makes it hard
to use BTI?

  parent reply	other threads:[~2023-08-11  9:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-106671-4@http.gcc.gnu.org/bugzilla/>
2023-03-23 13:06 ` nsz at gcc dot gnu.org
2023-03-23 13:47 ` broonie at kernel dot org
2023-08-02 16:03 ` fxue at os dot amperecomputing.com
2023-08-11  9:28 ` wilco at gcc dot gnu.org [this message]
2023-08-14 20:25 ` jiangning.liu at amperecomputing dot com
2023-08-15 10:11 ` nsz at gcc dot gnu.org
2023-08-15 19:26 ` broonie at kernel dot org
2023-08-21  9:53 ` rearnsha at gcc dot gnu.org
2023-08-21 14:15 ` broonie at kernel dot org
2023-08-21 16:04 ` rearnsha at gcc dot gnu.org
2023-08-21 16:18 ` wilco at gcc dot gnu.org
2023-08-21 16:24 ` broonie at kernel dot org

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=bug-106671-4-xwtKVyhfsA@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).