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: <20221020113749.6621-2-mario.limonciello@amd.com>
Date:   Thu, 20 Oct 2022 06:37:49 -0500
From:   Mario Limonciello <mario.limonciello@....com>
To:     <mario.limonciello@....com>,
        Shyam Sundar S K <Shyam-sundar.S-k@....com>,
        Hans de Goede <hdegoede@...hat.com>
CC:     Anson Tsao <anson.tsao@....com>,
        You-Sheng Yang <vicamo.yang@...onical.com>,
        <stable@...r.kernel.org>, Mark Gross <markgross@...nel.org>,
        <platform-driver-x86@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: [PATCH 1/1] platform/x86/amd: pmc: Read SMU version during suspend on Cezanne systems

commit b0c07116c8943 ("platform/x86: amd-pmc: Avoid reading SMU version at
probe time") adjusted the behavior for amd-pmc to avoid reading the SMU version
at startup but rather on first use to improve boot time.

However the SMU version is also used to decide whether to place a timer based
wakeup in the OS_HINT message.  If the idlemask hasn't been read before this
message was sent then the SMU version will not have been cached.

Ensure the SMU version has been read before deciding whether or not to run this
codepath.

Cc: stable@...r.kernel.org # 6.0
Reported-by: You-Sheng Yang <vicamo.yang@...onical.com>
Tested-by: Anson Tsao <anson.tsao@....com>
Fixes: b0c07116c8943 ("platform/x86: amd-pmc: Avoid reading SMU version at probe time")
Signed-off-by: Mario Limonciello <mario.limonciello@....com>
---
 drivers/platform/x86/amd/pmc.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/platform/x86/amd/pmc.c b/drivers/platform/x86/amd/pmc.c
index ce859b300712b..96e790e639a21 100644
--- a/drivers/platform/x86/amd/pmc.c
+++ b/drivers/platform/x86/amd/pmc.c
@@ -663,6 +663,13 @@ static int amd_pmc_verify_czn_rtc(struct amd_pmc_dev *pdev, u32 *arg)
 	struct rtc_time tm;
 	int rc;
 
+	/* we haven't yet read SMU version */
+	if (!pdev->major) {
+		rc = amd_pmc_get_smu_version(pdev);
+		if (rc)
+			return rc;
+	}
+
 	if (pdev->major < 64 || (pdev->major == 64 && pdev->minor < 53))
 		return 0;
 
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ