[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aBcm_kkkJi8zGV6W@gmail.com>
Date: Sun, 4 May 2025 10:36:14 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: linux-kernel@...r.kernel.org, Andy Lutomirski <luto@...capital.net>,
Dave Hansen <dave@...1.net>, Brian Gerst <brgerst@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
Borislav Petkov <bp@...en8.de>, "H . Peter Anvin" <hpa@...or.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
"Chang S . Bae" <chang.seok.bae@...el.com>
Subject: Re: [PATCH tip/x86/fpu 6/6] x86/fpu: shift
fpregs_assert_state_consistent() from arch_exit_work() to its caller
* Oleg Nesterov <oleg@...hat.com> wrote:
> If CONFIG_X86_DEBUG_FPU=Y, arch_exit_to_user_mode_prepare() calls
> arch_exit_work() even if ti_work == 0. There only reason is that we
> want to call fpregs_assert_state_consistent() if TIF_NEED_FPU_LOAD
> is not set.
>
> This looks confusing. arch_exit_to_user_mode_prepare() can just call
> fpregs_assert_state_consistent() unconditionally, it depends on
> CONFIG_X86_DEBUG_FPU and checks TIF_NEED_FPU_LOAD itself.
>
> Signed-off-by: Oleg Nesterov <oleg@...hat.com>
> ---
> arch/x86/include/asm/entry-common.h | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
Thanks Oleg! I've applied these improvements to tip:x86/fpu.
Note that there's still a 32-bit hardened-usercopy regression/crash
that Boris reported against tip:x86/fpu:
https://lore.kernel.org/r/20250503120712.GJaBYG8A-D77MllFZ3@fat_crate.local
Which may result in the subsequent rebasing of your commits - but
otherwise your series looks good to me.
Thanks,
Ingo
Powered by blists - more mailing lists