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-next>] [day] [month] [year] [list]
Date:   Wed, 28 Dec 2022 20:31:32 +0800
From:   Miaohe Lin <linmiaohe@...wei.com>
To:     "x86@...nel.org" <x86@...nel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
CC:     "tglx@...utronix.de" <tglx@...utronix.de>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "bp@...en8.de" <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>, <hpa@...or.com>
Subject: [BUG Report] undefined reference to `convert_to_fxsr'

Hi all:

When I compile the mainline kernel v6.2-rc1, the below link error occurs:

ld: arch/x86/kernel/fpu/signal.o: in function `__fpu_restore_sig':
/home/linmiaohe/linux-next/arch/x86/kernel/fpu/signal.c:421: undefined reference to `convert_to_fxsr'
make[1]: *** [scripts/Makefile.vmlinux:34: vmlinux] Error 1
make: *** [Makefile:1252: vmlinux] Error 2
make: *** Waiting for unfinished jobs....

I think it's because convert_to_fxsr() is only defined when CONFIG_X86_32 or CONFIG_IA32_EMULATION is enabled. But it can be
call from __fpu_restore_sig() via below path:

bool fpu__restore_sig(void __user *buf, int ia32_frame):

        if (!IS_ENABLED(CONFIG_X86_64) && !cpu_feature_enabled(X86_FEATURE_FPU)) {
                success = !fpregs_soft_set(current, NULL, 0,
                                           sizeof(struct user_i387_ia32_struct),
                                           NULL, buf);
        } else {
                success = __fpu_restore_sig(buf, buf_fx, ia32_fxstate); /* Will call convert_to_fxsr() later. */
        }

__fpu_restore_sig() will call convert_to_fxsr() even if neither CONFIG_X86_32 nor CONFIG_IA32_EMULATION is enabled. So the link error occurs.
But I'm not really sure how to fix it. Any reply or fix is appreciated.

Thanks,
Miaohe Lin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ