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:	Thu, 5 Feb 2015 00:41:34 +1100
From:	'David Gibson' <david@...son.dropbear.id.au>
To:	David Laight <David.Laight@...LAB.COM>
Cc:	"benh@...nel.crashing.org" <benh@...nel.crashing.org>,
	"mpe@...erman.id.au" <mpe@...erman.id.au>,
	"paulus@...ba.org" <paulus@...ba.org>,
	"agraf@...e.de" <agraf@...e.de>, "aik@...abs.ru" <aik@...abs.ru>,
	"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"mdroth@...ibm.com" <mdroth@...ibm.com>
Subject: Re: [PATCH 0/5] powerpc: Get rid of redundant arch specific swab
 functions

On Wed, Feb 04, 2015 at 11:54:39AM +0000, David Laight wrote:
> From: David Gibson
> > arch/powerpc/include/asm/swab.h includes some powerpc specific
> > byteswapping functions, which are implemented in terms of powerpc's
> > built in byte reversed load/store instructions.  There are two problems with this:
> > 
> > 1) They're not necessary - gcc is perfectly capable of generating the
> >    byte-reversed load and store instructions when using the normal,
> >    generic byteswapping functions (tested with gcc (GCC) 4.8.3
> >    20140911 (Red Hat 4.8.3-9))
> 
> Should you be worrying about older versions of gcc?
> IIRC the internal byteswap 'stuff' is relatively recent (like
> the last couple of years) so people building current kernels
> on older distributions might have issues.

Well.. even then, surely the worst that will happen is that there will
be a few extra instructions to do the byteswap in registers.  Given
that these are mostly used for IO, I find it hard to imagine that
would make a measurable performance difference.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ