summaryrefslogtreecommitdiffstats
path: root/crypto/x86cpuid.pl (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright yearMatt Caswell2020-04-231-1/+1
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11616)
* Also check for errors in x86_64-xlate.pl.David Benjamin2020-02-171-1/+1
| | | | | | | | | | | | | | In https://github.com/openssl/openssl/pull/10883, I'd meant to exclude the perlasm drivers since they aren't opening pipes and do not particularly need it, but I only noticed x86_64-xlate.pl, so arm-xlate.pl and ppc-xlate.pl got the change. That seems to have been fine, so be consistent and also apply the change to x86_64-xlate.pl. Checking for errors is generally a good idea. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: David Benjamin <davidben@google.com> (Merged from https://github.com/openssl/openssl/pull/10930)
* Do not silently truncate files on perlasm errorsDavid Benjamin2020-01-221-1/+1
| | | | | | | | | | | | | | | If one of the perlasm xlate drivers crashes, OpenSSL's build will currently swallow the error and silently truncate the output to however far the driver got. This will hopefully fail to build, but better to check such things. Handle this by checking for errors when closing STDOUT (which is a pipe to the xlate driver). Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10883)
* Unify all assembler file generatorsRichard Levitte2019-09-161-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They now generally conform to the following argument sequence: script.pl "$(PERLASM_SCHEME)" [ C preprocessor arguments ... ] \ $(PROCESSOR) <output file> However, in the spirit of being able to use these scripts manually, they also allow for no argument, or for only the flavour, or for only the output file. This is done by only using the last argument as output file if it's a file (it has an extension), and only using the first argument as flavour if it isn't a file (it doesn't have an extension). While we're at it, we make all $xlate calls the same, i.e. the $output argument is always quoted, and we always die on error when trying to start $xlate. There's a perl lesson in this, regarding operator priority... This will always succeed, even when it fails: open FOO, "something" || die "ERR: $!"; The reason is that '||' has higher priority than list operators (a function is essentially a list operator and gobbles up everything following it that isn't lower priority), and since a non-empty string is always true, so that ends up being exactly the same as: open FOO, "something"; This, however, will fail if "something" can't be opened: open FOO, "something" or die "ERR: $!"; The reason is that 'or' has lower priority that list operators, i.e. it's performed after the 'open' call. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9884)
* Following the license change, modify the boilerplates in crypto/Richard Levitte2018-12-061-1/+1
| | | | | | | [skip ci] Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7827)
* Fix issues in ia32 RDRAND asm leading to reduced entropyBryan Donlan2018-03-081-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)
* Many spelling fixes/typo's corrected.Josh Soref2017-11-121-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)
* Remove filename argument to x86 asm_init.David Benjamin2017-05-111-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)
* More typo fixesFdaSilvaYY2017-03-291-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)
* crypto/x86*cpuid.pl: move extended feature detection.Andy Polyakov2017-03-131-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>
* Remove OPENSSL_indirect_call()Benjamin Kaduk2017-03-011-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)
* Remove trailing whitespace from some files.David Benjamin2016-10-111-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>
* crypto/x86[_64]cpuid.pl: add OPENSSL_ia32_rd[rand|seed]_bytes.Andy Polyakov2016-07-151-9/+44
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Add assembly CRYPTO_memcmp.Andy Polyakov2016-05-191-0/+25
| | | | | | GH: #102 Reviewed-by: Richard Levitte <levitte@openssl.org>
* Copyright consolidation: perl filesRich Salz2016-04-201-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>
* Unified - adapt the generation of cpuid, uplink and buildinf to use GENERATERichard Levitte2016-03-091-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>
* Undo a90081576c94f9f54de1755188a00ccc1760549aRich Salz2014-08-091-1/+36
| | | | Undo unapproved commit that removed DJGPP and WATT32
* Remove DJGPP (and therefore WATT32) #ifdef's.Rich Salz2014-08-081-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.
* x86[_64]cpuid.pl: add low-level RDSEED.Andy Polyakov2014-02-141-0/+12
|
* x86cpuid.pl: fix extended feature flags detection.Andy Polyakov2013-06-101-9/+10
|
* x86cpuid.pl: make it work with older CPUs.Andy Polyakov2013-03-041-0/+2
| | | | PR: 3005
* Extend OPENSSL_ia32cap_P with extra word to accomodate AVX2 capability.Andy Polyakov2012-11-171-0/+13
|
* x86cpuid.pl: hide symbols [backport from x86_64].Andy Polyakov2012-08-291-0/+3
|
* Revert random changes from commit#22606.Andy Polyakov2012-06-051-1/+1
|
* Version skew reduction: trivia (I hope).Ben Laurie2012-06-041-1/+1
|
* perlasm: fix symptom-less bugs, missing semicolons and 'my' declarations.Andy Polyakov2012-04-281-3/+3
|
* x86cpuid.pl: fix processor capability detection on pre-586.Andy Polyakov2012-02-281-2/+3
|
* x86cpuid.pl: compensate for imaginary virtual machines.Andy Polyakov2011-11-081-2/+0
|
* x86cpuid.pl: don't punish "last-year" OSes on "this-year" CPUs.Andy Polyakov2011-11-051-1/+1
| | | | PR: 2633
* x86[_64]cpuid.pl: add function accessing rdrand instruction.Andy Polyakov2011-06-041-0/+12
|
* x86cpuid.pl: last commit broke platforms with perl with 64-bit integer.Andy Polyakov2011-05-291-5/+5
|
* x86[_64]cpuid.pl: harmonize usage of reserved bits #20 and #30.Andy Polyakov2011-05-271-4/+6
|
* x86[_64]cpuid.pl: handle new extensions.Andy Polyakov2011-05-161-16/+47
|
* Multiple assembler packs: add experimental memory bus instrumentation.Andy Polyakov2011-04-171-0/+102
|
* OPENSSL_cleanse to accept zero length parameter [matching C implementation].Andy Polyakov2010-01-241-0/+3
|
* x86[_64]cpuid.pl: further refine shared cache detection.Andy Polyakov2009-05-141-6/+32
|
* x86cpuid.pl: sync OPENSSL_ia32_cpuid with x86_64cpuid.pl.Andy Polyakov2009-05-121-2/+29
|
* Update perl asm scripts include paths for perlasm.Dr. Stephen Henson2008-01-051-1/+2
|
* x86*cpuid update.Andy Polyakov2007-07-211-7/+10
|
* x86cpuid fixes.Andy Polyakov2007-05-191-1/+1
| | | | PR: 1526
* Profiling revealed that OPENSSL_cleanse consumes *more* CPU time thanAndy Polyakov2007-05-141-0/+31
| | | | | sha1_block_data_order when hashing short messages. Move OPENSSL_cleanse to "cpuid" assembler module and gain 2x.
* Update x86cpuid.pl to correctly detect shared cache and to support newAndy Polyakov2007-04-011-0/+24
| | | | RC4_set_key.
* Support for indirect calls in x86 assembler modules.Andy Polyakov2005-12-061-1/+1
|
* x86cpuid.pl update.Andy Polyakov2005-12-031-0/+39
|
* Replace emms with finit in x86cpuid.Andy Polyakov2005-06-241-3/+2
|
* Don't emit SSE2 instructions unless were asked to.Andy Polyakov2005-05-181-11/+15
| | | | PR: 1073
* Cpuid modules updates.Andy Polyakov2005-05-031-0/+78
|
* x86 assembler updates: more instructions, new OPENSSL_instrument_haltAndy Polyakov2004-09-091-0/+34
| | | | [for DJGPP]...
* OPENSSL_ia32cap final touches. Note that OPENSSL_ia32cap is no longer aAndy Polyakov2004-08-291-4/+4
| | | | | symbol, but a macro expanded as (*(OPENSSL_ia32cap_loc())). The latter is the only one to be exported to application.
* Add framework for yet another assembler module dubbed "cpuid." IdeaAndy Polyakov2004-07-261-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...