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: <1482116198-28940-1-git-send-email-anjiandi@codeaurora.org>
Date:   Sun, 18 Dec 2016 20:56:38 -0600
From:   Jiandi An <anjiandi@...eaurora.org>
To:     boris.ostrovsky@...cle.com, jgross@...e.com,
        xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org
Cc:     julien.grall@....com, sstabellini@...nel.org,
        shankerd@...eaurora.org, shannon.zhao@...aro.org,
        Jiandi An <anjiandi@...eaurora.org>
Subject: [PATCH] Xen: ARM: Zero reserved fields of xatp before making hypervisor call

Ensure all reserved fields of xatp are zero before making hypervisor
call to XEN in xen_map_device_mmio().  xenmem_add_to_physmap_one() in
XEN fails the mapping request if extra.res reserved field in xatp is
not zero for XENMAPSPACE_dev_mmio request.

Signed-off-by: Jiandi An <anjiandi@...eaurora.org>
---
 drivers/xen/arm-device.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/xen/arm-device.c b/drivers/xen/arm-device.c
index 778acf8..208273b 100644
--- a/drivers/xen/arm-device.c
+++ b/drivers/xen/arm-device.c
@@ -87,6 +87,9 @@ static int xen_map_device_mmio(const struct resource *resources,
 			idxs[j] = XEN_PFN_DOWN(r->start) + j;
 		}
 
+		/* Ensure reserved fields are set to zero */
+		memset(&xatp, 0, sizeof(xatp));
+
 		xatp.domid = DOMID_SELF;
 		xatp.size = nr;
 		xatp.space = XENMAPSPACE_dev_mmio;
-- 
Jiandi An
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ