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:   Mon, 17 Aug 2020 17:04:41 +0800
From:   Libing Zhou <libing.zhou@...ia-sbell.com>
To:     tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, bp@...e.de,
        x86@...nel.org
Cc:     linux-kernel@...r.kernel.org, libing.zhou@...ia-sbell.com,
        hpa@...or.com
Subject: [PATCH] x86/nmi: Fix nmi_handle duration miscalculation

In nmi_check_duration(), the 'whole_msecs' value should
get from 'duration' to reflect actual time duration,
but not 'action->max_duration'.

Signed-off-by: Libing Zhou <libing.zhou@...ia-sbell.com>
---
 arch/x86/kernel/nmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c
index 4fc9954a9560..c51ee659e520 100644
--- a/arch/x86/kernel/nmi.c
+++ b/arch/x86/kernel/nmi.c
@@ -102,7 +102,7 @@ fs_initcall(nmi_warning_debugfs);
 
 static void nmi_check_duration(struct nmiaction *action, u64 duration)
 {
-	u64 whole_msecs = READ_ONCE(action->max_duration);
+	u64 whole_msecs = duration;
 	int remainder_ns, decimal_msecs;
 
 	if (duration < nmi_longest_ns || duration < action->max_duration)
-- 
2.22.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ