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.02.1508051050330.11337@kaball.uk.xensource.com>
Date:	Wed, 5 Aug 2015 10:52:45 +0100
From:	Stefano Stabellini <stefano.stabellini@...citrix.com>
To:	Julien Grall <julien.grall@...rix.com>
CC:	<xen-devel@...ts.xenproject.org>, <ian.campbell@...rix.com>,
	<stefano.stabellini@...citrix.com>, <linux-kernel@...r.kernel.org>,
	"Russell King" <linux@....linux.org.uk>,
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v2 3/8] arm/xen: implement correctly pfn_to_mfn

On Tue, 4 Aug 2015, Julien Grall wrote:
> After the commit introducing convertion between DMA and guest address,
                                                                  ^ addresses

> all the callers of pfn_to_mfn are expecting to get a GFN (Guest Frame
> Number). On ARM, all the guests are auto-translated so the GFN is equal
> to the Linux PFN (Pseudo-physical Frame Number).
> 
> The current implementation may return an MFN if the caller is passing a
> PFN associated to a mapped foreign grant. In pratical, I haven't seen
                                               ^ practice


> the problem on running guest but we should fix it for the sake of
> correctness.
> 
> Correct the implementation by always returning the pfn passed in parameter.
> 
> A follow-up patch will take care to rename pfn_to_mfn to a suitable
> name.
> 
> Signed-off-by: Julien Grall <julien.grall@...rix.com>
> Cc: Stefano Stabellini <stefano.stabellini@...citrix.com>
> Cc: Russell King <linux@....linux.org.uk>
> Cc: linux-arm-kernel@...ts.infradead.org

Reviewed-by: Stefano Stabellini <stefano.stabellini@...citrix.com>


>  arch/arm/include/asm/xen/page.h | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h
> index bc5e77c..087d86e 100644
> --- a/arch/arm/include/asm/xen/page.h
> +++ b/arch/arm/include/asm/xen/page.h
> @@ -36,14 +36,6 @@ extern struct rb_root phys_to_mach;
>  
>  static inline unsigned long pfn_to_mfn(unsigned long pfn)
>  {
> -	unsigned long mfn;
> -
> -	if (phys_to_mach.rb_node != NULL) {
> -		mfn = __pfn_to_mfn(pfn);
> -		if (mfn != INVALID_P2M_ENTRY)
> -			return mfn;
> -	}
> -
>  	return pfn;
>  }
>  
> -- 
> 2.1.4
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ