[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrULOhzyTjd+K5ByeRZ2Sn2-EjpaMJd2DosZ-V1X5DUojA@mail.gmail.com>
Date: Tue, 8 Dec 2020 20:10:17 -0800
From: Andy Lutomirski <luto@...nel.org>
To: Andy Lutomirski <luto@...nel.org>
Cc: X86 ML <x86@...nel.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
LKML <linux-kernel@...r.kernel.org>,
Nicholas Piggin <npiggin@...il.com>,
Arnd Bergmann <arnd@...db.de>,
Anton Blanchard <anton@...abs.org>,
stable <stable@...r.kernel.org>
Subject: Re: [PATCH v3 1/4] x86/membarrier: Get rid of a dubious optimization
On Thu, Dec 3, 2020 at 9:07 PM Andy Lutomirski <luto@...nel.org> wrote:
>
> sync_core_before_usermode() had an incorrect optimization. If we're
> in an IRQ, we can get to usermode without IRET -- we just have to
> schedule to a different task in the same mm and do SYSRET.
> Fortunately, there were no callers of sync_core_before_usermode()
> that could have had in_irq() or in_nmi() equal to true, because it's
> only ever called from the scheduler.
>
> While we're at it, clarify a related comment.
>
Fixes: ac1ab12a3e6e ("lockin/x86: Implement sync_core_before_usermode()")
> Cc: stable@...r.kernel.org
> Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
> Signed-off-by: Andy Lutomirski <luto@...nel.org>
Powered by blists - more mailing lists