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]
Date:	Wed, 4 Feb 2015 07:50:33 +1100
From:	NeilBrown <neilb@...e.de>
To:	Paul Bolle <pebolle@...cali.nl>
Cc:	Jan Beulich <JBeulich@...e.com>,
	Valentin Rothberg <valentinrothberg@...il.com>, mingo@...e.hu,
	tglx@...utronix.de, hpa@...or.com, james.t.kukunas@...ux.intel.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/raid6: correctly check for assembler capabilities

On Tue, 03 Feb 2015 21:31:30 +0100 Paul Bolle <pebolle@...cali.nl> wrote:

> On Fri, 2015-01-23 at 08:29 +0000, Jan Beulich wrote:
> > Just like for AVX2 (which simply needs an #if -> #ifdef conversion),
> > SSSE3 assembler support should be checked for before using it.
> > 
> > Signed-off-by: Jan Beulich <jbeulich@...e.com>
> > Cc: Jim Kukunas <james.t.kukunas@...ux.intel.com>
> > Cc: Neil Brown <neilb@...e.de>
> 
> This patch became commit be46ac86a81b ("x86/raid6: correctly check for
> assembler capabilities") in today's linux-next (ie, next-20150203). I
> noticed because a script I use to check linux-next spotted a potential
> problem with it.
> 
> > ---
> >  arch/x86/Makefile       |    1 +
> >  lib/raid6/algos.c       |    2 +-
> >  lib/raid6/recov_avx2.c  |    2 +-
> >  lib/raid6/recov_ssse3.c |    6 ++++++
> >  4 files changed, 9 insertions(+), 2 deletions(-)
> > 
> > --- 3.19-rc5/arch/x86/Makefile
> > +++ 3.19-rc5-raid6-SSSE3/arch/x86/Makefile
> > @@ -148,6 +148,7 @@ cfi-sections := $(call as-instr,.cfi_sec
> >  
> >  # does binutils support specific instructions?
> >  asinstr := $(call as-instr,fxsaveq (%rax),-DCONFIG_AS_FXSAVEQ=1)
> > +asinstr += $(call as-instr,pshufb %xmm0$(comma)%xmm0,-DCONFIG_AS_SSSE3=1)
> 
> This Makefile defines a preprocessor macro with a CONFIG_ prefix. Almost
> all macros with that prefix are defined through the kconfig system. A
> handful, like CONFIG_AS_SSSE3 and a few other macros defined in this
> Makefile, are not. Apparently this is a pet peeve I share with few
> people, but would any other prefix than CONFIG_ work for you too?

Actually the prefix of this macro is "CONFIG_AS_", not "CONFIG_" :-)
CONFIG_AS_ is reserved for assembly magic, and is never used by the the
kconfig system.

(Well..... I might have made bits of that up, but "git grep 'config AS_'"
doesn't find anything).

NeilBrown


> 
> >  asinstr += $(call as-instr,crc32l %eax$(comma)%eax,-DCONFIG_AS_CRC32=1)
> >  avx_instr := $(call as-instr,vxorps %ymm0$(comma)%ymm1$(comma)%ymm2,-DCONFIG_AS_AVX=1)
> >  avx2_instr :=$(call as-instr,vpbroadcastb %xmm0$(comma)%ymm1,-DCONFIG_AS_AVX2=1)
> 
> 
> Paul Bolle


Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ