lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250528042503.GA1278@sol>
Date: Tue, 27 May 2025 21:25:03 -0700
From: Eric Biggers <ebiggers@...nel.org>
To: kernel test robot <oliver.sang@...el.com>
Cc: oe-lkp@...ts.linux.dev, lkp@...el.com, Ayush Jain <Ayush.Jain3@....com>,
	linux-kernel@...r.kernel.org, x86@...nel.org,
	linux-crypto@...r.kernel.org, linux-pm@...r.kernel.org,
	Borislav Petkov <bp@...en8.de>,
	Thomas Gleixner <tglx@...utronix.de>,
	Herbert Xu <herbert@...dor.apana.org.au>,
	Ard Biesheuvel <ardb@...nel.org>
Subject: Re: [PATCH v3 2/2] x86/fpu: Fix irq_fpu_usable() to return false
 during CPU onlining

On Wed, May 28, 2025 at 10:04:39AM +0800, kernel test robot wrote:
> 
> Hello,
> 
> kernel test robot noticed "WARNING:at_arch/x86/kernel/fpu/init.c:#fpu__init_cpu" on:
> 
> commit: b88c4665c7f43e1898f695642fd159c6c542e49b ("[PATCH v3 2/2] x86/fpu: Fix irq_fpu_usable() to return false during CPU onlining")
> url: https://github.com/intel-lab-lkp/linux/commits/Eric-Biggers/x86-fpu-Replace-in_kernel_fpu-with-kernel_fpu_allowed/20250520-233322
> patch link: https://lore.kernel.org/all/20250520152938.21881-3-ebiggers@kernel.org/
> patch subject: [PATCH v3 2/2] x86/fpu: Fix irq_fpu_usable() to return false during CPU onlining

Right, this is because fpu__init_cpu() is actually called twice on the boot CPU.
So the WARN_ON_FPU I added in v2 of this patch trips.  Fortunately, the version
that was applied was v1, and it does not have the problematic WARN_ON_FPU.

I wonder if fpu__init_cpu() really should be called twice.  The flow is:

    arch_cpu_finalize_init()
        fpu__init_system()
            fpu__init_system_early_generic()
            fpu__init_cpu()
            fpu__init_system_generic();
            fpu__init_system_xstate_size_legacy();
            fpu__init_system_xstate(fpu_kernel_cfg.max_size);
            fpu__init_task_struct_size();
        fpu__init_cpu()

- Eric

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ