From: Josh Poimboeuf <jpoimboe@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Kees Cook <keescook@chromium.org>,
x86@kernel.org, Sami Tolvanen <samitolvanen@google.com>,
Joao Moreira <joao@overdrivepizza.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: Tue, 18 Oct 2022 16:31:48 -0700 [thread overview]
Message-ID: <20221018233148.lgoiis2tws7caw3l@treble> (raw)
In-Reply-To: <Y08E9DgGD0lPB85O@hirez.programming.kicks-ass.net>
On Tue, Oct 18, 2022 at 09:56:36PM +0200, Peter Zijlstra wrote:
> On Tue, Oct 18, 2022 at 11:09:13AM -0700, Kees Cook wrote:
> > > +config FINEIBT
> > > + def_bool y
> > > + depends on X86_KERNEL_IBT && CFI_CLANG
> > > + select CALL_PADDING
> >
> > To that end, can we please make this a prompted choice?
>
> How about something like so instead?
>
> ---
> Subject: x86/cfi: Boot time selection of CFI scheme
> From: Peter Zijlstra <peterz@infradead.org>
> Date: Tue Oct 18 21:50:54 CEST 2022
>
> Add the "cfi=" boot parameter to allow users to select a scheme at
> boot time.
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> ---
> arch/x86/kernel/alternative.c | 103 +++++++++++++++++++++++++++++++++---------
> 1 file changed, 83 insertions(+), 20 deletions(-)
>
> --- a/arch/x86/kernel/alternative.c
> +++ b/arch/x86/kernel/alternative.c
> @@ -702,6 +702,47 @@ void __init_or_module noinline apply_ibt
> #endif /* CONFIG_X86_KERNEL_IBT */
>
> #ifdef CONFIG_FINEIBT
> +
> +enum cfi_mode {
> + CFI_DEFAULT,
> + CFI_OFF,
> + CFI_KCFI,
> + CFI_FINEIBT,
> +};
Is there a reason not to default to FineIBT if the hardware supports it?
If we're going to give the user choices then my previous rant about
documentation still applies:
https://lkml.kernel.org/lkml/20220503220244.vyz5flk3gg3y6rbw@treble
--
Josh
next prev parent reply other threads:[~2022-10-18 23:31 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-18 13:35 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 [this message]
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
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=20221018233148.lgoiis2tws7caw3l@treble \
--to=jpoimboe@kernel.org \
--cc=joao@overdrivepizza.com \
--cc=jpoimboe@redhat.com \
--cc=keescook@chromium.org \
--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
all inboxes | Powered by JetHome®