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: <alpine.DEB.2.10.1701031003050.17742@sstabellini-ThinkPad-X260>
Date:   Tue, 3 Jan 2017 10:03:59 -0800 (PST)
From:   Stefano Stabellini <sstabellini@...nel.org>
To:     Juergen Gross <jgross@...e.com>
cc:     Jiandi An <anjiandi@...eaurora.org>, boris.ostrovsky@...cle.com,
        xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org,
        sstabellini@...nel.org, julien.grall@....com
Subject: Re: [PATCH V2] Xen: ARM: Zero reserved fields of xatp before making
 hypervisor call

On Mon, 2 Jan 2017, Juergen Gross wrote:
> On 28/12/16 01:47, Jiandi An wrote:
> > 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>
> > ---
> > Changed zeroing xatp to a static initialization
> > of .domid and .space for xatp.
> > 
> >  drivers/xen/arm-device.c | 8 +++++---
> >  1 file changed, 5 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/xen/arm-device.c b/drivers/xen/arm-device.c
> > index 778acf8..85dd20e 100644
> > --- a/drivers/xen/arm-device.c
> > +++ b/drivers/xen/arm-device.c
> > @@ -58,9 +58,13 @@ static int xen_map_device_mmio(const struct resource *resources,
> >  	xen_pfn_t *gpfns;
> >  	xen_ulong_t *idxs;
> >  	int *errs;
> > -	struct xen_add_to_physmap_range xatp;
> >  
> >  	for (i = 0; i < count; i++) {
> > +		struct xen_add_to_physmap_range xatp = {
> > +			.domid = DOMID_SELF,
> > +			.space = XENMAPSPACE_dev_mmio
> > +		};
> > +
> 
> I still don't see the need to re-initialize the input parts of xatp
> on each loop iteration unless you can show the need for it (e.g. a
> buggy hypervisor version not conforming to the interface specification).
> 
> OTOH I don't feel really strong about it and let Stefano being the
> maintainer for the ARM parts decide.

I don't feel strongly about this either - I think this patch is good
enough. I'll apply to xentip.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ