Re: [PATCH v2] x86/split_lock: Handle unexpected split lock as fatal

From: Edgecombe, Rick P

Date: Wed Jan 07 2026 - 10:24:32 EST


On Wed, 2026-01-07 at 07:19 -0800, Dave Hansen wrote:
> On 1/7/26 05:49, Xiaoyao Li wrote:
> > + /*
> > + * If #AC occurs on split lock without
> > X86_FEATURE_SPLIT_LOCK_DETECT
> > + * the kernel cannot handle it by disabling the detection.
> > Treat it as
> > + * fatal regardless of the sld_state.
> > + */
> > + if (!cpu_feature_enabled(X86_FEATURE_SPLIT_LOCK_DETECT))
> > + return true;
>
> If #AC occurs on split lock without X86_FEATURE_SPLIT_LOCK_DETECT,
> that sounds more like a naughty hypervisor or buggy CPU that deserves
> a BUG_ON() rather than a situation where the kernel wants to move
> merrily along.

Can you clarify your feelings on BUG_ON()'s? I was under the impression
that new ones were basically banned, and we should WARN() here to try
to keep running.

Unless we could claim that continuing would destroy something or other
situation a user would never want.