summaryrefslogtreecommitdiff
path: root/lib/libcrypto/perlasm
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2014-06-02 15:08:39 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2014-06-02 15:08:39 +0000
commit65a5716c31363f5cd99e8b6b921312ba46982635 (patch)
treee219b5f16027abac88020de70d0f69610610b32e /lib/libcrypto/perlasm
parent0934f3ca2aa74197e9cceea2e807c4e4a031ae15 (diff)
A few months back there was a big community fuss regarding direct-use
of the intel RDRAND instruction. Consensus was RDRAND should probably only be used as an additional source of entropy in a mixer. Guess which library bends over backwards to provide easy access to RDRAND? Yep. Guess which applications are using this support? Not even one... but still, this is being placed as a trap for someone. Send this support straight to the abyss. ok kettenis
Diffstat (limited to 'lib/libcrypto/perlasm')
-rwxr-xr-xlib/libcrypto/perlasm/x86_64-xlate.pl13
-rw-r--r--lib/libcrypto/perlasm/x86asm.pl8
2 files changed, 0 insertions, 21 deletions
diff --git a/lib/libcrypto/perlasm/x86_64-xlate.pl b/lib/libcrypto/perlasm/x86_64-xlate.pl
index 56d9b64b6fb..2ad032c4ba5 100755
--- a/lib/libcrypto/perlasm/x86_64-xlate.pl
+++ b/lib/libcrypto/perlasm/x86_64-xlate.pl
@@ -759,19 +759,6 @@ my $pclmulqdq = sub {
}
};
-my $rdrand = sub {
- if (shift =~ /%[er](\w+)/) {
- my @opcode=();
- my $dst=$1;
- if ($dst !~ /[0-9]+/) { $dst = $regrm{"%e$dst"}; }
- rex(\@opcode,0,$1,8);
- push @opcode,0x0f,0xc7,0xf0|($dst&7);
- @opcode;
- } else {
- ();
- }
-};
-
if ($nasm) {
print <<___;
default rel
diff --git a/lib/libcrypto/perlasm/x86asm.pl b/lib/libcrypto/perlasm/x86asm.pl
index d74d1992f8d..5916ea4f893 100644
--- a/lib/libcrypto/perlasm/x86asm.pl
+++ b/lib/libcrypto/perlasm/x86asm.pl
@@ -130,14 +130,6 @@ sub ::pclmulqdq
{ &::generic("pclmulqdq",@_); }
}
-sub ::rdrand
-{ my ($dst)=@_;
- if ($dst =~ /(e[a-dsd][ixp])/)
- { &::data_byte(0x0f,0xc7,0xf0|$regrm{$dst}); }
- else
- { &::generic("rdrand",@_); }
-}
-
# label management
$lbdecor="L"; # local label decoration, set by package
$label="000";