All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Dave Hansen <dave.hansen@intel.com>
Cc: Javier Pello <devel@otheo.eu>,
	linux-kernel@vger.kernel.org, x86@kernel.org,
	 Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	 Dave Hansen <dave.hansen@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH 1/1] x86/mm/pae: Align up pteval_t, pmdval_t and pudval_t to avoid split locks
Date: Thu, 4 Apr 2024 08:26:29 -0700	[thread overview]
Message-ID: <Zg7GpY0_U_7yhe6P@google.com> (raw)
In-Reply-To: <7db8d0a8-c668-44be-a348-58120a97fc2b@intel.com>

On Wed, Apr 03, 2024, Dave Hansen wrote:
> On 4/3/24 08:54, Javier Pello wrote:
> > - The third way would be to disable split lock detection on x86-32.
> > This can be as simple as setting the default to "none" in
> > sld_state_setup(). Not the most elegant of solutions, but beats
> > having unresponsive tasks.
> > 
> > Would going for the first one be worth the trouble?
> 
> No, it's not worth it.  Let's just disable split lock detection on
> 32-bit and move on with life.

Please don't paper over the kernel flaw by disabling split lock detection.  As
Brian alluded to with his question:

 : What would happen if you ran a 32-bit VM on such hardware?  If the
 : split lock detection on the guest were disabled, would the host get
 : the fault instead?

running these kernels under a hypervisor that has enabled split-lock detection,
or Intel's newfangled BUS_LOCK_DETECTION VM-Exit, will result in silently
degraded performance for the guest kernel.  The split-lock will trap to the
hypervisor, which will likely throttle the vCPU to guard against a DoS attack,
e.g. under KVM, IIRC the default behavior for split-lock is to stall the task
for 10 _milliseconds_.

In other words, practically speaking this isn't about supporting a new hardware
feature on 32-bit kernels, it's about preserving performance in real world
scenarios when running 32-bit kernels on new hardware.  And that means keeping
split-lock detection enabled on 32-bit kernels is a good thing, as kernels bugs
that would cause hard-to-debug _customer_ issues when running 32-bit Linux in a
VM will show up as easy-to-debug splats when running 32-bit kernels on bare
metal.   I doubt there are many people that are still running 32-bit kernels on
bare metal, but any coverage we can get would be very nice to have.

  reply	other threads:[~2024-04-04 15:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-01 16:54 [PATCH 0/1] Split lock detected in kernel mode on x86-32 with PAE Javier Pello
2024-04-01 16:57 ` [PATCH 1/1] x86/mm/pae: Align up pteval_t, pmdval_t and pudval_t to avoid split locks Javier Pello
2024-04-01 17:56   ` Dave Hansen
2024-04-02 17:23     ` Javier Pello
2024-04-02 17:43       ` Dave Hansen
2024-04-03  7:57         ` Ingo Molnar
2024-04-03 11:08           ` Brian Gerst
2024-04-04  7:56             ` Ingo Molnar
2024-04-04 15:36               ` Brian Gerst
2024-04-04 16:29                 ` Dave Hansen
2024-04-03 15:54         ` Javier Pello
2024-04-03 15:58           ` Dave Hansen
2024-04-04 15:26             ` Sean Christopherson [this message]
2024-04-04 18:31               ` Dave Hansen
2024-04-04 21:55                 ` Sean Christopherson

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=Zg7GpY0_U_7yhe6P@google.com \
    --to=seanjc@google.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=devel@otheo.eu \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.