Re: [RESEND PATCH v3 0/3] x86/mm: LAM fixups and cleanups

From: Yosry Ahmed
Date: Tue Jul 02 2024 - 13:39:52 EST


On Tue, Jul 2, 2024 at 10:36 AM Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Tue, 2 Jul 2024 13:21:36 +0000 Yosry Ahmed <yosryahmed@xxxxxxxxxx> wrote:
>
> > This series has fixups and cleanups for LAM. Most importantly, patch 1
> > fixes a sycnhronization issue that may cause crashes of userspace
> > applications. This is a resend of v3, rebased on top of v6.10-rc6.
>
> "Crashes of userspace applications" is bad. Yet the patchset has been
> floating about for four months.
>
> It's unclear (to me) how serious this is. Can you please explain how
> common this is, what the userspace application needs to do to trigger
> this, etc?

I don't think it would be common. The bug only happens on new hardware
supporting LAM, and it happens in a specific scenario where a
userspace task enables LAM while a kthread is using (borrowing) its
mm_struct on another CPU.

So it is possible but I certainly wouldn't call it common or easily triggerable.