From: Ben Laurie Date: Wed, 5 May 2010 15:50:13 +0000 (+0000) Subject: Non-executable stack in asm. X-Git-Tag: OpenSSL-fips-2_0-rc1~1106 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0e3ef596e55654a7782ae7ce302f8933b4817f12;p=oweals%2Fopenssl.git Non-executable stack in asm. --- diff --git a/CHANGES b/CHANGES index 6f713d9e87..c9f2226600 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,9 @@ Changes between 1.0.0 and 1.1.0 [xx XXX xxxx] + *) Make generated asm have non-executable stack. + [Contributed by Google ] + *) New function OPENSSL_gmtime_diff to find the difference in days and seconds between two tm structures. This will be used to provide additional functionality for ASN1_TIME. diff --git a/crypto/aes/asm/aes-x86_64.pl b/crypto/aes/asm/aes-x86_64.pl index a545e892ae..a757b47146 100755 --- a/crypto/aes/asm/aes-x86_64.pl +++ b/crypto/aes/asm/aes-x86_64.pl @@ -42,7 +42,8 @@ $verticalspin=1; # unlike 32-bit version $verticalspin performs # ~15% better on both AMD and Intel cores $speed_limit=512; # see aes-586.pl for details -$code=".text\n"; +$code=".section .note.GNU-stack,\"\",\@progbits\n"; +$code.=".text\n"; $s0="%eax"; $s1="%ebx"; diff --git a/crypto/bn/asm/x86_64-mont.pl b/crypto/bn/asm/x86_64-mont.pl index 3b7a6f243f..b62373f567 100755 --- a/crypto/bn/asm/x86_64-mont.pl +++ b/crypto/bn/asm/x86_64-mont.pl @@ -45,6 +45,7 @@ $m0="%rbx"; $m1="%rbp"; $code=<<___; +.section .note.GNU-stack,"",\@progbits .text .globl bn_mul_mont diff --git a/crypto/md5/asm/md5-x86_64.pl b/crypto/md5/asm/md5-x86_64.pl index 867885435e..b75cf3b7a4 100755 --- a/crypto/md5/asm/md5-x86_64.pl +++ b/crypto/md5/asm/md5-x86_64.pl @@ -123,6 +123,7 @@ no warnings qw(uninitialized); open STDOUT,"| $^X $xlate $flavour $output"; $code .= <