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]
Message-ID: <2FA59E9E3461354C+20240825081741.3890887-1-wangyuli@uniontech.com>
Date: Sun, 25 Aug 2024 16:17:41 +0800
From: WangYuli <wangyuli@...ontech.com>
To: tglx@...utronix.de,
	mingo@...hat.com,
	bp@...en8.de,
	dave.hansen@...ux.intel.com,
	hpa@...or.com,
	wangyuli@...ontech.com,
	seanjc@...gle.com,
	xiangzelong@...ontech.com
Cc: x86@...nel.org,
	linux-kernel@...r.kernel.org,
	wubo@...ontech.com,
	guanwentao@...ontech.com,
	linux-sgx@...r.kernel.org,
	jarkko@...nel.org,
	haitao.huang@...ux.intel.com,
	sean.j.christopherson@...el.com,
	kai.huang@...el.com,
	bp@...e.de
Subject: [PATCH v3] x86/cpu: Adjust the error message when BIOS does not support SGX

When SGX is not supported by the BIOS, the kernel log still output
the error 'SGX disabled by BIOS', which can be confusing since
there might not be an SGX-related option in the BIOS settings.

As a kernel, it's difficult to distinguish between the BIOS not
supporting SGX and the BIOS supporting SGX but it's disabled.

Therefore, update the error message to
'SGX disabled or unsupported by BIOS' to make it easier for those
reading kernel logs to understand what's happening.

Reported-by: Bo Wu <wubo@...ontech.com>
Closes: https://github.com/linuxdeepin/developer-center/issues/10032
Acked-by: Kai Huang <kai.huang@...el.com>
Link: https://lore.kernel.org/all/a30f7700c7817b3e7e2f2bdb37d5c10a318b2c3b.camel@intel.com/
Signed-off-by: Zelong Xiang <xiangzelong@...ontech.com>
Signed-off-by: WangYuli <wangyuli@...ontech.com>
---
 arch/x86/kernel/cpu/feat_ctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/feat_ctl.c b/arch/x86/kernel/cpu/feat_ctl.c
index 1640ae76548f..4a4118784c13 100644
--- a/arch/x86/kernel/cpu/feat_ctl.c
+++ b/arch/x86/kernel/cpu/feat_ctl.c
@@ -188,7 +188,7 @@ void init_ia32_feat_ctl(struct cpuinfo_x86 *c)
 update_sgx:
 	if (!(msr & FEAT_CTL_SGX_ENABLED)) {
 		if (enable_sgx_kvm || enable_sgx_driver)
-			pr_err_once("SGX disabled by BIOS.\n");
+			pr_err_once("SGX disabled or unsupported by BIOS.\n");
 		clear_cpu_cap(c, X86_FEATURE_SGX);
 		return;
 	}
-- 
2.43.4


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ