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: <20231213232620.5apm2yt4bthw7ksc@box.shutemov.name>
Date:   Thu, 14 Dec 2023 02:26:20 +0300
From:   kirill.shutemov@...ux.intel.com
To:     Kai Huang <kai.huang@...el.com>
Cc:     dave.hansen@...el.com, arnd@...nel.org,
        linux-kernel@...r.kernel.org, x86@...nel.org, bp@...en8.de,
        peterz@...radead.org, tglx@...utronix.de, tony.luck@...el.com,
        mingo@...hat.com, hpa@...or.com
Subject: Re: [PATCH] x86/virt/tdx: Make TDX host depend on X86_MCE

On Thu, Dec 14, 2023 at 11:28:25AM +1300, Kai Huang wrote:
> A build failure was reported that when INTEL_TDX_HOST is enabled but
> X86_MCE is not, the tdx_dump_mce_info() function fails to link:
> 
>   ld: vmlinux.o: in function `tdx_dump_mce_info':
>   ...: undefined reference to `mce_is_memory_error'
>   ...: undefined reference to `mce_usable_address'
> 
> The reason is in such configuration, despite there's no caller of
> tdx_dump_mce_info() it is still built and there's no implementation for
> the two "mce_*()" functions.
> 
> Make INTEL_TDX_HOST depend on X86_MCE to fix.
> 
> It makes sense to enable MCE support for the TDX host anyway.  Because
> the only way that TDX has to report integrity errors is an MCE, and it
> is not good to silently ignore such MCE.  The TDX spec also suggests
> the host VMM is expected to implement the MCE handler.
> 
> Note it also makes sense to make INTEL_TDX_HOST select X86_MCE but this
> generates "recursive dependency detected!" error in the Kconfig.
> 
> Reported-by: Arnd Bergmann <arnd@...nel.org>
> Closes: https://lore.kernel.org/all/20231212214612.GHZXjUpBFa1IwVMTI7@fat_crate.local/T/
> Fixes: 70060463cb2b ("x86/mce: Differentiate real hardware #MCs from TDX erratum ones")
> Link: https://lore.kernel.org/all/20231212214612.GHZXjUpBFa1IwVMTI7@fat_crate.local/T/#m1a109c29324b2bbd0b3b1d45c218012cd3a13be6
> Signed-off-by: Kai Huang <kai.huang@...el.com>

Reviewed-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>

-- 
  Kiryl Shutsemau / Kirill A. Shutemov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ