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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 7 Jul 2015 19:51:45 +0300
From:	"Michael S. Tsirkin" <mst@...hat.com>
To:	Thomas Huth <thuth@...hat.com>
Cc:	Greg Kurz <gkurz@...ux.vnet.ibm.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	KVM list <kvm@...r.kernel.org>,
	virtualization <virtualization@...ts.linux-foundation.org>,
	Network Development <netdev@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Cornelia Huck <cornelia.huck@...ibm.com>, kraxel@...hat.com
Subject: Re: [PULL] virtio/vhost: cross endian support

On Tue, Jul 07, 2015 at 06:36:53PM +0200, Thomas Huth wrote:
> On Thu, 2 Jul 2015 11:32:52 +0200
> "Michael S. Tsirkin" <mst@...hat.com> wrote:
> 
> > On Thu, Jul 02, 2015 at 11:12:56AM +0200, Greg Kurz wrote:
> > > On Thu, 2 Jul 2015 08:01:28 +0200
> > > "Michael S. Tsirkin" <mst@...hat.com> wrote:
> ...
> > > > Yea, well - support for legacy BE guests on the new LE hosts is
> > > > exactly the motivation for this.
> > > > 
> > > > I dislike it too, but there are two redeeming properties that
> > > > made me merge this:
> > > > 
> > > > 1.  It's a trivial amount of code: since we wrap host/guest accesses
> > > >     anyway, almost all of it is well hidden from drivers.
> > > > 
> > > > 2.  Sane platforms would never set flags like VHOST_CROSS_ENDIAN_LEGACY -
> > > >     and when it's clear, there's zero overhead (as some point it was
> > > >     tested by compiling with and without the patches, got the same
> > > >     stripped binary).
> > > > 
> > > > Maybe we could create a Kconfig symbol to enforce point (2): prevent
> > > > people from enabling it e.g. on x86. I will look into this - but it can
> > > > be done by a patch on top, so I think this can be merged as is.
> > > > 
> > > 
> > > This cross-endian *oddity* is targeting PowerPC book3s_64 processors... I
> > > am not aware of any other users. Maybe create a symbol that would
> > > be only selected by PPC_BOOK3S_64 ?
> > 
> > I think some ARM systems are trying to support cross-endian
> > configurations as well.
> > 
> > Besides that, yes, this is more or less what I had in mind.
> 
> Would something simple like this already do the job:
> 
> diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig
> --- a/drivers/vhost/Kconfig
> +++ b/drivers/vhost/Kconfig
> @@ -35,6 +35,7 @@ config VHOST
>  
>  config VHOST_CROSS_ENDIAN_LEGACY
>  	bool "Cross-endian support for vhost"
> +	depends on KVM_BOOK3S_64 || KVM_ARM_HOST
>  	default n
>  	---help---
>  	  This option allows vhost to support guests with a different byte
> 
> ?

Do all ARM hosts support this dynamic endian-ness?

> If that looks acceptable, I can submit a proper patch if you like.
> 
>  Thomas

I think I prefer some kind of symbol defined by these arches,
so I don't get to maintain an arch list in vhost.

-- 
MST
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ