aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* qemu: give up and accept a mips64r2 worldJason A. Donenfeld2018-10-023-6/+8
| | | | | | | | We can't do SMP this way, and we also fall back to using the default N32 ABI, which is a bummer. But the mips64r6 toolchain is too much of a hassle to build with Gentoo's crossdev, and at least this works. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ratelimiter: prefer IS_ENABLEDJason A. Donenfeld2018-10-021-3/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: change BUG_ON to WARN_ONJason A. Donenfeld2018-10-024-27/+19
| | | | | Suggested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* poly1305: document rationale for base 2^26->2^64/32 conversionJason A. Donenfeld2018-10-022-0/+20
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: use ZINC_ARCH macrosJason A. Donenfeld2018-10-022-9/+9
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* chacha20: no need to align ctxJason A. Donenfeld2018-10-021-1/+1
| | | | | | | We don't use vmovdqa any more. Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* chacha20: split chacha20_ctx into unionJason A. Donenfeld2018-10-025-45/+50
| | | | | | This avoids casts and makes counter increments obvious. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* qemu: support m68kJason A. Donenfeld2018-10-022-1/+18
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: add missing static keyword to fpu init functionsJason A. Donenfeld2018-10-024-4/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: document what's used from <crypto/ beside #includeJason A. Donenfeld2018-10-024-4/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: WARN_ON in module_init if selftest failsJason A. Donenfeld2018-10-025-5/+5
| | | | | | | | If it's a built-in and initcall fails, it won't be fatal. So we should at least be loud. Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* simd: refactor simd availability handlingJason A. Donenfeld2018-10-022-16/+24
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* simd: return a bool from simd_relaxJason A. Donenfeld2018-10-021-1/+3
| | | | | Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: prefix all functions with wg_Jason A. Donenfeld2018-10-0228-602/+624
| | | | | | | | | | | | | | I understand why this must be done, though I'm not so happy about having to do it. In some places, it puts us over 80 chars and we have to break lines up in further ugly ways. And in general, I think this makes things harder to read. Yet another thing we must do to please upstream. Maybe this can be replaced in the future by some kind of automatic module namespacing logic in the linker, or even combined with LTO and aggressive symbol stripping. Suggested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* poly1305-mips64: use compiler-defined macros in assemblyJason A. Donenfeld2018-10-021-5/+10
| | | | | | | | Andy and I agreed it's more correct to use the compiler-defined macros in assembly code, and not the project specific macros. Suggested-by: Andy Polyakov <appro@openssl.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* blake2s: rename arch function and use slicker le32 helperJason A. Donenfeld2018-10-023-11/+15
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* blake2s: feed fpu functions PAGE_SIZE at a timeJason A. Donenfeld2018-10-021-14/+28
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* poly1305: feed fpu functions PAGE_SIZE at a timeJason A. Donenfeld2018-10-024-29/+49
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* chacha20: feed fpu functions PAGE_SIZE at a timeJason A. Donenfeld2018-10-024-23/+54
| | | | | Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* chacha20: test multiple page span in selftestJason A. Donenfeld2018-10-022-3/+27
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* chacha20: break out of zero loops in selftestJason A. Donenfeld2018-10-021-0/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: prefer IS_ENABLED to ifdefsJason A. Donenfeld2018-10-028-135/+73
| | | | | Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: ignore ARMv3Jason A. Donenfeld2018-10-021-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* compat: kernels < 3.17 don't have read_cpuid_partNathan Chancellor2018-10-021-0/+4
| | | | | | | | | Use read_cpuid_part_number, which was the same thing before upstream commit af040ffc9ba1 ("ARM: make it easier to check the CPU part number correctly"). Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* qemu: support more arm big endian platformsJason A. Donenfeld2018-10-025-4/+43
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: rename DEBUG to SELFTESTJason A. Donenfeld2018-09-2511-59/+59
| | | | | | | Also we make selftest errors of type err, so that they're obvious in dmesg. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* poly1305-arm: swap endianness in base 2^26 conversionJason A. Donenfeld2018-09-251-1/+5
| | | | | | | | These are actually 32-bit limbs, so we have to swap them back after the 64-bit arithmetic. Also, change type of boolean for 64-bit. Suggested-by: Andy Polyakov <appro@openssl.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* curve25519-arm: disable on big-endianJason A. Donenfeld2018-09-252-3/+3
| | | | | | | The qhasm was only written for little-endian systems, and we don't want disaster to ensue. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* chacha20-arm,poly1305-arm: fix big-endian aarch64Jason A. Donenfeld2018-09-252-21/+21
| | | | | Suggested-by: Andy Polyakov <appro@openssl.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* curve25519: show all failures in test caseJason A. Donenfeld2018-09-251-2/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* version: bump snapshotJason A. Donenfeld2018-09-252-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* curve25519-hacl64: reduce stack usage under KASANJason A. Donenfeld2018-09-251-2/+1
| | | | | Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* chacha20: add bounds checking to selftestsJason A. Donenfeld2018-09-251-1/+45
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* chacha20-mips32r2: reduce stack and branches in loop, refactor jumptable handlingRené van Dorst2018-09-251-79/+94
| | | | | Signed-off-by: René van Dorst <opensource@vdorst.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* qemu: bump muslJason A. Donenfeld2018-09-251-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: make constant naming scheme consistentJason A. Donenfeld2018-09-2517-168/+168
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* hchacha20: keep in native endian in wordsJason A. Donenfeld2018-09-258-42/+46
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* chacha20-arm: remove unused preamblesJason A. Donenfeld2018-09-242-30/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* chacha20-arm: updated scalar code from AndyJason A. Donenfeld2018-09-231-310/+273
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* poly1305-mips64: remove useless preprocessor errorJason A. Donenfeld2018-09-231-4/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto-arm: rework KERNEL_MODE_NEON handling againJason A. Donenfeld2018-09-238-27/+16
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: flatten out makefileJason A. Donenfeld2018-09-231-47/+33
| | | | | | This brings us more in line with the integration tree's style. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* curve25519-fiat32: work around m68k compiler stack frame bugJason A. Donenfeld2018-09-231-6/+4
| | | | | | | | | The m68k compiler generates a 1032 byte stack frame. Moving these variables inside the loop fixes that. It also means we're not explicitly memzeroing it any more either, but hopefully that memory is reused anyway by the multiplications. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* allowedips: work around kasan stack frame bug in selftestJason A. Donenfeld2018-09-231-2/+9
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* chacha20-arm: use new scalar implementationJason A. Donenfeld2018-09-232-519/+1158
| | | | | | | It turns out this is faster than NEON on some chips, so it's nice to have. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto-arm: rework KERNEL_MODE_NEON handlingJason A. Donenfeld2018-09-232-9/+16
| | | | | | It might be defined even if the compiler doesn't support it. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: reduce stack frame sizeJason A. Donenfeld2018-09-234-27/+36
| | | | | | This brings it under 1280 on 64-bit and under 1024 on 32-bit systems. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* chacha20: add chunked selftest and test sliding alignments and hchacha20Jason A. Donenfeld2018-09-232-1160/+2467
| | | | | | | This ensures we're properly updating state[12] and that we're handling all unaligned acceses (in the jump tables for MIPS). Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* chacha20-mips32r2: reduce jumptable entry size and stack usageRené van Dorst2018-09-221-39/+48
| | | | | Signed-off-by: René van Dorst <opensource@vdorst.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* chacha20-mips32r2: use simpler calling conventionJason A. Donenfeld2018-09-212-177/+141
| | | | | | | | | Since we now set up the block in the generic code, we can rely on that to use fewer variables and reduce stack pressure within the MIPS code. This in turn means we have more registers and more uniformity, so we're able to rewrite quite a bit. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>