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] [thread-next>] [day] [month] [year] [list]
Message-Id: <B01C8160-4999-43B9-B89C-45913E94DA55@zytor.com>
Date: Wed, 21 Jan 2026 16:45:22 -0800
From: Xin Li <xin@...or.com>
To: Binbin Wu <binbin.wu@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
        linux-doc@...r.kernel.org, pbonzini@...hat.com, seanjc@...gle.com,
        corbet@....net, tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
        dave.hansen@...ux.intel.com, x86@...nel.org, hpa@...or.com,
        luto@...nel.org, peterz@...radead.org, andrew.cooper3@...rix.com,
        chao.gao@...el.com, hch@...radead.org, sohil.mehta@...el.com
Subject: Re: [PATCH v9 07/22] KVM: VMX: Initialize VMCS FRED fields



> On Jan 21, 2026, at 10:14 AM, Xin Li <xin@...or.com> wrote:
> 
> 
> 
>> On Jan 20, 2026, at 10:44 PM, Binbin Wu <binbin.wu@...ux.intel.com> wrote:
>> 
>>> +#ifdef CONFIG_X86_64
>> 
>> Nit:
>> 
>> Is this needed?
>> 
>> FRED is initialized by X86_64_F(), if CONFIG_X86_64 is not enabled, this
>> path is not reachable.
>> There should be no compilation issue without #ifdef CONFIG_X86_64 / #endif.
>> 
>> There are several similar patterns in this patch, using  #ifdef CONFIG_X86_64 / 
>> #endif or not seems not consistent. E.g. __vmx_vcpu_reset() and init_vmcs()
>> doesn't check the config, but here does.
> 
> 
> I tried removing all such #ifdef, and it turned out that I had to keep this
> per the last round of build checks.
> 
> Anyway, I will do another build check on x86_32.
> 


The trouble comes from __this_cpu_ist_top_va():

arch/x86/kvm/vmx/vmx.c: In function ‘vmx_vcpu_load_vmcs’:
arch/x86/kvm/vmx/vmx.c:1608:59: error: implicit declaration of function ‘__this_cpu_ist_top_va’ [-Werror=implicit-function-declaration]
 1608 |                         vmcs_write64(HOST_IA32_FRED_RSP1, __this_cpu_ist_top_va(ESTACK_DB));
      |                                                           ^~~~~~~~~~~~~~~~~~~~~
arch/x86/kvm/vmx/vmx.c:1608:81: error: ‘ESTACK_DB’ undeclared (first use in this function)
 1608 |                         vmcs_write64(HOST_IA32_FRED_RSP1, __this_cpu_ist_top_va(ESTACK_DB));
      |                                                                                 ^~~~~~~~~
arch/x86/kvm/vmx/vmx.c:1608:81: note: each undeclared identifier is reported only once for each function it appears in
  CC [M]  crypto/md4.o
  CC      lib/crypto/sha512.o
arch/x86/kvm/vmx/vmx.c:1609:81: error: ‘ESTACK_NMI’ undeclared (first use in this function)
 1609 |                         vmcs_write64(HOST_IA32_FRED_RSP2, __this_cpu_ist_top_va(ESTACK_NMI));
      |                                                                                 ^~~~~~~~~~
arch/x86/kvm/vmx/vmx.c:1610:81: error: ‘ESTACK_DF’ undeclared (first use in this function)
 1610 |                         vmcs_write64(HOST_IA32_FRED_RSP3, __this_cpu_ist_top_va(ESTACK_DF));
      |                                                                                 ^~~~~~~~~


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ