Re: [PATCH 11/11] x86/fineibt: Add FineIBT+BHI mitigation
From: Kees Cook
Date: Fri Feb 14 2025 - 13:02:22 EST
On Fri, Feb 07, 2025 at 01:15:40PM +0100, Peter Zijlstra wrote:
> Due to FineIBT weakness, add an additional mitigation for BHI.
> [...]
> @@ -1020,6 +1036,8 @@ static __init int cfi_parse_cmdline(char
> cfi_mode = CFI_KCFI;
> } else if (!strcmp(str, "fineibt")) {
> cfi_mode = CFI_FINEIBT;
> + } else if (IS_ENABLED(CONFIG_FINEIBT_BHI) && !strcmp(str, "fineibt+bhi")) {
> + cfi_mode = CFI_FINEIBT_BHI;
> } else if (!strcmp(str, "norand")) {
> cfi_rand = false;
> } else {
While looking at FineIBT vs entry, I noticed that FineIBT+BHI must be
explicitly selected at boot. Did you want it to be enabled automatically
when the compiler supports it and FineIBT is enabled? Does there need to
be a check for BHI added?
--
Kees Cook