From: Kees Cook <keescook@chromium.org>
To: Joao Moreira <joao@overdrivepizza.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
x86@kernel.org, Sami Tolvanen <samitolvanen@google.com>,
linux-kernel@vger.kernel.org, Mark Rutland <mark.rutland@arm.com>,
Josh Poimboeuf <jpoimboe@redhat.com>
Subject: Re: [PATCH] x86/ibt: Implement FineIBT
Date: Mon, 6 May 2024 10:36:06 -0700 [thread overview]
Message-ID: <202405061031.43EE1C4@keescook> (raw)
In-Reply-To: <1f6069657f4630c36d60baab2e9b3d10@overdrivepizza.com>
*thread necromancy*
On Tue, Nov 01, 2022 at 02:50:22PM -0700, Joao Moreira wrote:
> On 2022-11-01 14:39, Kees Cook wrote:
> > On Mon, Oct 31, 2022 at 12:13:50PM -0700, Joao Moreira wrote:
> > > On 2022-10-18 22:19, Kees Cook wrote:
> > > > On Tue, Oct 18, 2022 at 09:48:42PM -0700, Joao Moreira wrote:
> > > > > > > Is it useful to get the compiler to emit 0xcc with
> > > > > > > -fpatchable-function-entry under any circumstance? I can probably
> > > > > > > change
> > > > > > > that quickly if needed/useful.
> > > > > >
> > > > > > Having it emit 0xcc for the bytes in front of the symbol might be
> > > > > > interesting. It would mean a few kernel changes, but nothing too hard.
> > >
> > > Should I push for this within clang? I have the patch semi-ready
> > > (below) and
> > > would have some cycles this week for polishing it.
> >
> > Sure! While the NOP vs CC issue isn't very interesting when IBT is
> > available, it's nice for non-IBT to make attackers have to target
> > addresses precisely.
> >
> > If it's really invasive or hard to maintain in Clang (or objtool),
> > then I'd say leave it as-is.
>
> The Clang implementation is actually quite simple and, IIRC, I heard in the
> past someone mentioning that trapping instructions actually provide benefits
> for holding undesired straight-line speculation. Maybe someone can comment
> on that, or even if that is really relevant.
>
> Meanwhile I'll work on pushing it then.
I happened to be looking at in-memory CFI preambles again and noticed
that there's still a NOP sled at every function that got a __cfi_...
target (which only matters in the non-IBT world).
I can't find a PR for your NOP->INT3 patch:
https://github.com/lvwr/llvm-project/commit/ca9029c4536d0544e35dff85e4806803e256841f
Are you able to get this refreshed and landed?
Thanks!
-Kees
--
Kees Cook
next prev parent reply other threads:[~2024-05-06 17:36 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-18 13:35 [PATCH] x86/ibt: Implement FineIBT Peter Zijlstra
2022-10-18 14:43 ` David Laight
2022-10-18 15:58 ` Joao Moreira
2022-10-18 17:20 ` Kees Cook
2022-10-18 20:09 ` Joao Moreira
2022-10-19 5:33 ` Kees Cook
2022-10-18 21:27 ` David Laight
2022-10-18 14:47 ` Peter Zijlstra
2022-10-18 18:09 ` Kees Cook
2022-10-18 19:56 ` Peter Zijlstra
2022-10-18 23:31 ` Josh Poimboeuf
2022-10-19 5:22 ` Kees Cook
2022-10-19 11:38 ` Peter Zijlstra
2022-10-19 5:14 ` Kees Cook
2022-10-18 19:59 ` Peter Zijlstra
2022-10-18 21:09 ` Peter Zijlstra
2022-10-19 5:05 ` Kees Cook
2022-10-19 12:03 ` Peter Zijlstra
2022-10-19 15:22 ` Sami Tolvanen
2022-10-20 11:04 ` Peter Zijlstra
2022-10-18 19:59 ` Joao Moreira
2022-10-19 5:32 ` Kees Cook
2022-10-19 19:35 ` Joao Moreira
2022-10-18 20:05 ` Peter Zijlstra
2022-10-19 5:00 ` Kees Cook
2022-10-18 20:09 ` Peter Zijlstra
2022-10-18 20:17 ` Joao Moreira
2022-10-18 20:30 ` Peter Zijlstra
2022-10-19 4:48 ` Joao Moreira
2022-10-19 5:19 ` Kees Cook
2022-10-31 19:13 ` Joao Moreira
2022-11-01 21:39 ` Kees Cook
2022-11-01 21:50 ` Joao Moreira
2024-05-06 17:36 ` Kees Cook [this message]
2024-05-07 1:45 ` Joao Moreira
2022-10-19 5:18 ` Kees Cook
2022-10-19 5:16 ` Kees Cook
2022-10-20 11:05 ` Peter Zijlstra
2022-10-18 23:38 ` Josh Poimboeuf
2022-10-19 7:29 ` Peter Zijlstra
2022-10-21 23:08 ` Josh Poimboeuf
2022-10-22 15:03 ` Peter Zijlstra
2022-10-24 17:15 ` Sami Tolvanen
2022-10-24 18:38 ` Joao Moreira
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=202405061031.43EE1C4@keescook \
--to=keescook@chromium.org \
--cc=joao@overdrivepizza.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=peterz@infradead.org \
--cc=samitolvanen@google.com \
--cc=x86@kernel.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