Quantcast

SSSE3 fails when built with GCC 4.6.3

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

SSSE3 fails when built with GCC 4.6.3

Ineiev
As of 9b651fb632f369, on one of my machines tests/basic fails like

AES-128 test decryption failed.
basic: pass 0, algo 7, mode 1, gcry_cipher_setkey failed: Selftest failed
basic: pass 0, algo 7, mode 2, gcry_cipher_setkey failed: Selftest failed
...
basic: cipher-ocb, gcry_cipher_setkey failed (large, algo 7): Selftest failed
basic: cipher-ocb, gcry_cipher_setkey failed (large, algo 7): Selftest failed
basic: stopped after 50 errors.

It seems related to SSSE3 because when I
#undef HAVE_GCC_INLINE_ASM_SSSE3
in config.h, the test succeeds; it also succeeds when compiled without
optimization (CFLAGS=-g2).

$ gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
...

(When built with gcc 6.2.0, it passes the test.)

$ uname -srvmpio
Linux 3.2.0-118-generic #1trisquel1 SMP Tue Dec 6 16:49:50 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Core(TM)2 Duo CPU     E7400  @ 2.80GHz
stepping        : 10
microcode       : 0xa07
cpu MHz         : 1603.000
cache size      : 3072 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm dtherm tpr_shadow vnmi flexpriority
...

_______________________________________________
Gcrypt-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SSSE3 fails when built with GCC 4.6.3

Jussi Kivilinna-2
Hello,

Does the attached patch help?

-Jussi

On 15.05.2017 14:46, Ineiev wrote:

> As of 9b651fb632f369, on one of my machines tests/basic fails like
>
> AES-128 test decryption failed.
> basic: pass 0, algo 7, mode 1, gcry_cipher_setkey failed: Selftest failed
> basic: pass 0, algo 7, mode 2, gcry_cipher_setkey failed: Selftest failed
> ...
> basic: cipher-ocb, gcry_cipher_setkey failed (large, algo 7): Selftest failed
> basic: cipher-ocb, gcry_cipher_setkey failed (large, algo 7): Selftest failed
> basic: stopped after 50 errors.
>
> It seems related to SSSE3 because when I
> #undef HAVE_GCC_INLINE_ASM_SSSE3
> in config.h, the test succeeds; it also succeeds when compiled without
> optimization (CFLAGS=-g2).
>
> $ gcc --version
> gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
> ...
>
> (When built with gcc 6.2.0, it passes the test.)
>
> $ uname -srvmpio
> Linux 3.2.0-118-generic #1trisquel1 SMP Tue Dec 6 16:49:50 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
>
> $ cat /proc/cpuinfo
> processor       : 0
> vendor_id       : GenuineIntel
> cpu family      : 6
> model           : 23
> model name      : Intel(R) Core(TM)2 Duo CPU     E7400  @ 2.80GHz
> stepping        : 10
> microcode       : 0xa07
> cpu MHz         : 1603.000
> cache size      : 3072 KB
> physical id     : 0
> siblings        : 2
> core id         : 0
> cpu cores       : 2
> apicid          : 0
> initial apicid  : 0
> fpu             : yes
> fpu_exception   : yes
> cpuid level     : 13
> wp              : yes
> flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm dtherm tpr_shadow vnmi flexpriority
> ...
>
>
>
> _______________________________________________
> Gcrypt-devel mailing list
> [hidden email]
> http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
>

_______________________________________________
Gcrypt-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel

06-rijndael-ssse3-fix-functions.patch (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SSSE3 fails when built with GCC 4.6.3

Ineiev
Hello, Jussi;

On Tue, May 16, 2017 at 09:24:14PM +0300, Jussi Kivilinna wrote:
>
> Does the attached patch help?

Yes; 'make check' runs successfully.

_______________________________________________
Gcrypt-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel

signature.asc (499 bytes) Download Attachment
Loading...