openssl: disable HT sidechannel attack mitigation
authorBert Belder <bertbelder@gmail.com>
Fri, 21 Sep 2012 16:07:08 +0000 (18:07 +0200)
committerisaacs <i@izs.me>
Tue, 25 Sep 2012 15:51:03 +0000 (08:51 -0700)
It used to be off before. It's extremely unlikely that such an attack
would be a viable attack against node. And it makes AES much slower.

deps/openssl/openssl/crypto/aes/asm/aes-586.pl
deps/openssl/openssl/crypto/aes/asm/aes-x86_64.pl

index aab40e6..fed3150 100755 (executable)
@@ -2054,8 +2054,8 @@ my $mark=&DWP(76+240,"esp");      # copy of aes_key->rounds
        &test   ($s2,15);
        &jnz    (&label("slow_way"));
                                        if (!$x86only) {
-       &bt     (&DWP(0,$s0),28);       # check for hyper-threading bit
-       &jc     (&label("slow_way"));
+       #&bt    (&DWP(0,$s0),28);       # check for hyper-threading bit
+       #&jc    (&label("slow_way"));
                                        }
        # pre-allocate aligned stack frame...
        &lea    ($acc,&DWP(-80-244,"esp"));
index a545e89..83aad23 100755 (executable)
@@ -1674,8 +1674,8 @@ AES_cbc_encrypt:
        jb      .Lcbc_slow_prologue
        test    \$15,%rdx
        jnz     .Lcbc_slow_prologue
-       bt      \$28,%r10d
-       jc      .Lcbc_slow_prologue
+       #bt     \$28,%r10d
+       #jc     .Lcbc_slow_prologue
 
        # allocate aligned stack frame...
        lea     -88-248(%rsp),$key