aboutsummaryrefslogtreecommitdiff
path: root/crypto/x86cpuid.pl
AgeCommit message (Collapse)AuthorFilesLines
2018-12-06Following the license change, modify the boilerplates in crypto/Richard Levitte1-1/+1
[skip ci] Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7827)
2018-03-08Fix issues in ia32 RDRAND asm leading to reduced entropyBryan Donlan1-13/+2
This patch fixes two issues in the ia32 RDRAND assembly code that result in a (possibly significant) loss of entropy. The first, less significant, issue is that, by returning success as 0 from OPENSSL_ia32_rdrand() and OPENSSL_ia32_rdseed(), a subtle bias was introduced. Specifically, because the assembly routine copied the remaining number of retries over the result when RDRAND/RDSEED returned 'successful but zero', a bias towards values 1-8 (primarily 8) was introduced. The second, more worrying issue was that, due to a mixup in registers, when a buffer that was not size 0 or 1 mod 8 was passed to OPENSSL_ia32_rdrand_bytes or OPENSSL_ia32_rdseed_bytes, the last (n mod 8) bytes were all the same value. This issue impacts only the 64-bit variant of the assembly. This change fixes both issues by first eliminating the only use of OPENSSL_ia32_rdrand, replacing it with OPENSSL_ia32_rdrand_bytes, and fixes the register mixup in OPENSSL_ia32_rdrand_bytes. It also adds a sanity test for OPENSSL_ia32_rdrand_bytes and OPENSSL_ia32_rdseed_bytes to help catch problems of this nature in the future. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5342)
2017-11-11Many spelling fixes/typo's corrected.Josh Soref1-1/+1
Around 138 distinct errors found and fixed; thanks! Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3459)
2017-05-11Remove filename argument to x86 asm_init.David Benjamin1-1/+1
The assembler already knows the actual path to the generated file and, in other perlasm architectures, is left to manage debug symbols itself. Notably, in OpenSSL 1.1.x's new build system, which allows a separate build directory, converting .pl to .s as the scripts currently do result in the wrong paths. This also avoids inconsistencies from some of the files using $0 and some passing in the filename. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3431)
2017-03-29More typo fixesFdaSilvaYY1-1/+1
Fix some comments too [skip ci] Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3069)
2017-03-13crypto/x86*cpuid.pl: move extended feature detection.Andy Polyakov1-20/+18
Exteneded feature flags were not pulled on AMD processors, as result a number of extensions were effectively masked on Ryzen. Original fix for x86_64cpuid.pl addressed this problem, but messed up processor vendor detection. This fix moves extended feature detection past basic feature detection where it belongs. 32-bit counterpart is harmonized too. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2017-02-28Remove OPENSSL_indirect_call()Benjamin Kaduk1-39/+0
It's undocumented and unused in the tree. The idea seems to have never gained much traction, and can be removed without breaking ABI compatibility. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2800)
2016-10-10Remove trailing whitespace from some files.David Benjamin1-1/+1
The prevailing style seems to not have trailing whitespace, but a few lines do. This is mostly in the perlasm files, but a few C files got them after the reformat. This is the result of: find . -name '*.pl' | xargs sed -E -i '' -e 's/( |'$'\t'')*$//' find . -name '*.c' | xargs sed -E -i '' -e 's/( |'$'\t'')*$//' find . -name '*.h' | xargs sed -E -i '' -e 's/( |'$'\t'')*$//' Then bn_prime.h was excluded since this is a generated file. Note mkerr.pl has some changes in a heredoc for some help output, but other lines there lack trailing whitespace too. Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-07-15crypto/x86[_64]cpuid.pl: add OPENSSL_ia32_rd[rand|seed]_bytes.Andy Polyakov1-9/+44
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-19Add assembly CRYPTO_memcmp.Andy Polyakov1-0/+25
GH: #102 Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-20Copyright consolidation: perl filesRich Salz1-1/+7
Add copyright to most .pl files This does NOT cover any .pl file that has other copyright in it. Most of those are Andy's but some are public domain. Fix typo's in some existing files. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-09Unified - adapt the generation of cpuid, uplink and buildinf to use GENERATERichard Levitte1-0/+6
This gets rid of the BEGINRAW..ENDRAW sections in crypto/build.info. This also moves the assembler generating perl scripts to take the output file name as last command line argument, where necessary. Reviewed-by: Andy Polyakov <appro@openssl.org>
2014-08-09Undo a90081576c94f9f54de1755188a00ccc1760549aRich Salz1-1/+36
Undo unapproved commit that removed DJGPP and WATT32
2014-08-08Remove DJGPP (and therefore WATT32) #ifdef's.Rich Salz1-36/+1
DJGPP is no longer a supported platform. Remove all #ifdef, etc., cases that refer to it. DJGPP also #define'd WATT32, so that is now removed as well.
2014-02-14x86[_64]cpuid.pl: add low-level RDSEED.Andy Polyakov1-0/+12
2013-06-10x86cpuid.pl: fix extended feature flags detection.Andy Polyakov1-9/+10
2013-03-04x86cpuid.pl: make it work with older CPUs.Andy Polyakov1-0/+2
PR: 3005
2012-11-17Extend OPENSSL_ia32cap_P with extra word to accomodate AVX2 capability.Andy Polyakov1-0/+13
2012-08-29x86cpuid.pl: hide symbols [backport from x86_64].Andy Polyakov1-0/+3
2012-06-04Revert random changes from commit#22606.Andy Polyakov1-1/+1
2012-06-03Version skew reduction: trivia (I hope).Ben Laurie1-1/+1
2012-04-28perlasm: fix symptom-less bugs, missing semicolons and 'my' declarations.Andy Polyakov1-3/+3
2012-02-28x86cpuid.pl: fix processor capability detection on pre-586.Andy Polyakov1-2/+3
2011-11-08x86cpuid.pl: compensate for imaginary virtual machines.Andy Polyakov1-2/+0
2011-11-05x86cpuid.pl: don't punish "last-year" OSes on "this-year" CPUs.Andy Polyakov1-1/+1
PR: 2633
2011-06-04x86[_64]cpuid.pl: add function accessing rdrand instruction.Andy Polyakov1-0/+12
2011-05-29x86cpuid.pl: last commit broke platforms with perl with 64-bit integer.Andy Polyakov1-5/+5
2011-05-27x86[_64]cpuid.pl: harmonize usage of reserved bits #20 and #30.Andy Polyakov1-4/+6
2011-05-16x86[_64]cpuid.pl: handle new extensions.Andy Polyakov1-16/+47
2011-04-17Multiple assembler packs: add experimental memory bus instrumentation.Andy Polyakov1-0/+102
2010-01-24OPENSSL_cleanse to accept zero length parameter [matching C implementation].Andy Polyakov1-0/+3
2009-05-14x86[_64]cpuid.pl: further refine shared cache detection.Andy Polyakov1-6/+32
2009-05-12x86cpuid.pl: sync OPENSSL_ia32_cpuid with x86_64cpuid.pl.Andy Polyakov1-2/+29
2008-01-05Update perl asm scripts include paths for perlasm.Dr. Stephen Henson1-1/+2
2007-07-21x86*cpuid update.Andy Polyakov1-7/+10
2007-05-19x86cpuid fixes.Andy Polyakov1-1/+1
PR: 1526
2007-05-14Profiling revealed that OPENSSL_cleanse consumes *more* CPU time thanAndy Polyakov1-0/+31
sha1_block_data_order when hashing short messages. Move OPENSSL_cleanse to "cpuid" assembler module and gain 2x.
2007-04-01Update x86cpuid.pl to correctly detect shared cache and to support newAndy Polyakov1-0/+24
RC4_set_key.
2005-12-06Support for indirect calls in x86 assembler modules.Andy Polyakov1-1/+1
2005-12-03x86cpuid.pl update.Andy Polyakov1-0/+39
2005-06-24Replace emms with finit in x86cpuid.Andy Polyakov1-3/+2
2005-05-18Don't emit SSE2 instructions unless were asked to.Andy Polyakov1-11/+15
PR: 1073
2005-05-03Cpuid modules updates.Andy Polyakov1-0/+78
2004-09-09x86 assembler updates: more instructions, new OPENSSL_instrument_haltAndy Polyakov1-0/+34
[for DJGPP]...
2004-08-29OPENSSL_ia32cap final touches. Note that OPENSSL_ia32cap is no longer aAndy Polyakov1-4/+4
symbol, but a macro expanded as (*(OPENSSL_ia32cap_loc())). The latter is the only one to be exported to application.
2004-07-26Add framework for yet another assembler module dubbed "cpuid." IdeaAndy Polyakov1-0/+43
is to have a placeholder to small routines, which can be written only in assembler. In IA-32 case this includes processor capability identification and access to Time-Stamp Counter. As discussed earlier OPENSSL_ia32cap is introduced to control recently added SSE2 code pathes (see docs/crypto/OPENSSL_ia32cap.pod). For the moment the code is operational on ELF platforms only. I haven't checked it yet, but I have all reasons to believe that Windows build should fail to link too. I'll be looking into it shortly...