Re: [PATCHv6 08/16] x86/traps: Consolidate user fixups in exc_general_protection()

From: Dave Hansen
Date: Fri Jun 20 2025 - 10:47:49 EST


On 6/20/25 06:53, Kirill A. Shutemov wrote:
> @@ -819,6 +814,9 @@ DEFINE_IDTENTRY_ERRORCODE(exc_general_protection)
> if (fixup_vdso_exception(regs, X86_TRAP_GP, error_code, 0))
> goto exit;
>
> + if (cpu_feature_enabled(X86_FEATURE_UMIP) && fixup_umip_exception(regs))
> + goto exit;

I'd move the cpu_feature_enabled() check into fixup_umip_exception()
just to make the exc_general_protection() code easier to look at. It'll
force an extra (cheap) CALL, but this is a super cold code path anyway.

With that:

Acked-by: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>