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: <tip-9cd05ad2910b55238e3c720c99ad896dc538301b@git.kernel.org>
Date:   Thu, 28 Feb 2019 03:04:02 -0800
From:   tip-bot for Lan Tianyu <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     mingo@...nel.org, Tianyu.Lan@...rosoft.com, hpa@...or.com,
        tglx@...utronix.de, linux-kernel@...r.kernel.org
Subject: [tip:x86/urgent] x86/hyper-v: Fix definition of
 HV_MAX_FLUSH_REP_COUNT

Commit-ID:  9cd05ad2910b55238e3c720c99ad896dc538301b
Gitweb:     https://git.kernel.org/tip/9cd05ad2910b55238e3c720c99ad896dc538301b
Author:     Lan Tianyu <Tianyu.Lan@...rosoft.com>
AuthorDate: Mon, 25 Feb 2019 22:31:14 +0800
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Thu, 28 Feb 2019 11:58:29 +0100

x86/hyper-v: Fix definition of HV_MAX_FLUSH_REP_COUNT

The max flush rep count of HvFlushGuestPhysicalAddressList hypercall is
equal with how many entries of union hv_gpa_page_range can be populated
into the input parameter page.

The code lacks parenthesis around PAGE_SIZE - 2 * sizeof(u64) which results
in bogus computations. Add them.

Fixes: cc4edae4b924 ("x86/hyper-v: Add HvFlushGuestAddressList hypercall support")
Signed-off-by: Lan Tianyu <Tianyu.Lan@...rosoft.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Cc: kys@...rosoft.com
Cc: haiyangz@...rosoft.com
Cc: sthemmin@...rosoft.com
Cc: sashal@...nel.org
Cc: bp@...en8.de
Cc: hpa@...or.com
Cc: gregkh@...uxfoundation.org
Cc: devel@...uxdriverproject.org
Cc: stable@...r.kernel.org
Link: https://lkml.kernel.org/r/20190225143114.5149-1-Tianyu.Lan@microsoft.com
---
 arch/x86/include/asm/hyperv-tlfs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/hyperv-tlfs.h b/arch/x86/include/asm/hyperv-tlfs.h
index 705dafc2d11a..2bdbbbcfa393 100644
--- a/arch/x86/include/asm/hyperv-tlfs.h
+++ b/arch/x86/include/asm/hyperv-tlfs.h
@@ -841,7 +841,7 @@ union hv_gpa_page_range {
  * count is equal with how many entries of union hv_gpa_page_range can
  * be populated into the input parameter page.
  */
-#define HV_MAX_FLUSH_REP_COUNT (PAGE_SIZE - 2 * sizeof(u64) /	\
+#define HV_MAX_FLUSH_REP_COUNT ((PAGE_SIZE - 2 * sizeof(u64)) /	\
 				sizeof(union hv_gpa_page_range))
 
 struct hv_guest_mapping_flush_list {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ