mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@kernel.org>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Kees Cook <kees@kernel.org>,
	linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	linux-hardening@vger.kernel.org, Jan Beulich <jbeulich@suse.com>,
	"Jose E. Marchesi" <jemarch@gnu.org>
Subject: Re: [PATCH] objtool: Deal with relative jump tables correctly
Date: Wed, 9 Oct 2024 22:20:58 -0700	[thread overview]
Message-ID: <20241010052058.7ftl2huxuzb2fwk7@treble.attlocal.net> (raw)
In-Reply-To: <20241010051649.wtarneasz7x7anaj@treble.attlocal.net>

On Wed, Oct 09, 2024 at 10:16:52PM -0700, Josh Poimboeuf wrote:
> > And has there been any movement on compiler annotations?
> > If this is worth while, it is something I could look into: Kees and I
> > work very closely with both the GCC and the Clang folks, and have
> > contributed other features that are specific to the kernel.
> 
> I spoke with several people about this at GNU Cauldron last month and
> there is definitely interest in helping out.  If you and Kees also want
> to help out, that would be awesome.
> 
> Jan proposed an idea to apply a R_*_NONE relocation at the indirect
> branch instruction which references the jump table address.  And then
> emit a sized ELF symbol for each jump table entry.  That would be all we
> need.

While we're on the subject of objtool pain points, there's also the need
to have some kind of annotation for noreturn functions.  One suggestion
has been a GCC plugin (which could in theory also work for jump tables).

-- 
Josh

      reply	other threads:[~2024-10-10  5:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-07 22:47 Ard Biesheuvel
2024-10-08 17:42 ` Josh Poimboeuf
2024-10-09 15:18   ` Ard Biesheuvel
2024-10-10  5:16     ` Josh Poimboeuf
2024-10-10  5:20       ` Josh Poimboeuf [this message]

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=20241010052058.7ftl2huxuzb2fwk7@treble.attlocal.net \
    --to=jpoimboe@kernel.org \
    --cc=ardb@kernel.org \
    --cc=jbeulich@suse.com \
    --cc=jemarch@gnu.org \
    --cc=kees@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.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

all inboxes | Powered by JetHome®