Re: [PATCH v9 05/22] x86/cea: Use array indexing to simplify exception stack access

From: Borislav Petkov

Date: Fri Jan 30 2026 - 08:42:53 EST


On Sun, Oct 26, 2025 at 01:18:53PM -0700, Xin Li (Intel) wrote:
> +noinstr unsigned long __this_cpu_ist_top_va(enum exception_stack_ordering stack)
> +{

You better check this @stack is within the array bounds of event_stacks[].

> + return __this_cpu_ist_bottom_va(stack) + EXCEPTION_STKSZ;
> +}

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette