summaryrefslogtreecommitdiffhomepage
path: root/src
AgeCommit message (Collapse)Author
2018-10-07global: style nitsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-07crypto: clean up remaining .h->.cJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-07allowedips: document additional nobsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-07makefile: do more generic wildcard so as to avoid rename issuesJason A. Donenfeld
Commit ad5e4210 (global: rename include'd C files to be .c) breaks install target for dkms sources. Fix installing selftest/*.c. Suggested-by: Christian Hesse <mail@eworm.de> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-07crypto: use BIT(i) & bitmap instead of (bitmap >> i) & 1Jason A. Donenfeld
Pros: clearer if you're not familiar with the shift idiom, uses kernel macro. Cons: doesn't work any more if the lvalue ever ceases to be a bool. Neutral: generates the same machine code. Suggested-by: Sultan Alsawaf <sultanxda@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-07crypto: disable broken implementations in selftestsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-07compat: clang cannot handle __builtin_constant_pJason A. Donenfeld
Or, put differently, we don't want to go chasing down random versions of clang used by XDA users, so we just disable this checking on clang all together. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-07compat: make asm/simd.h conditional on its existenceJason A. Donenfeld
Android kernels backported it, complicating things. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-06compat: account for ancient ARM assemblerJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-06version: bump snapshotJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-06crypto: test all SIMD combinationsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-06global: rename include'd C files to be .cJason A. Donenfeld
This is done by 259 other files in the kernel tree: linux $ rg '#include.*\.c' -l | wc -l 259 Suggested-by: Sultan Alsawaf <sultanxda@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-06allowedips: remove ifdefs in favor of IS_ENABLEDJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-04curve25519-arm: rearrange multiplications for better in-order performanceJason A. Donenfeld
Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-04curve25519-arm: writeback to base register when possibleJason A. Donenfeld
Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-03blake2s: always put a simd, even if not use()'dJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-03simd: introduce useful disabling macroJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-03Kconfig: do now allow IPV6=m,WG=yJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-03curve25519-arm: adjust commentJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-03curve25519-arm: use new simd apiJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-02chacha20-arm: use proper reteq macro instead of bxeqJason A. Donenfeld
Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-02qemu: show more messages in console the right wayJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-02qemu: support powerpc64leJason A. Donenfeld
This uses ELFv2 ABI, which is the only ppc64 ABI musl supports. Big endian uses ELFv1 ABI, which musl doesn't support. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-02qemu: give up and accept a mips64r2 worldJason A. Donenfeld
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>
2018-10-02ratelimiter: prefer IS_ENABLEDJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-02global: change BUG_ON to WARN_ONJason A. Donenfeld
Suggested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-02poly1305: document rationale for base 2^26->2^64/32 conversionJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-02crypto: use ZINC_ARCH macrosJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-02chacha20: no need to align ctxJason A. Donenfeld
We don't use vmovdqa any more. Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-02chacha20: split chacha20_ctx into unionJason A. Donenfeld
This avoids casts and makes counter increments obvious. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-02qemu: support m68kJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-02crypto: add missing static keyword to fpu init functionsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-02crypto: document what's used from <crypto/ beside #includeJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-02crypto: WARN_ON in module_init if selftest failsJason A. Donenfeld
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>
2018-10-02simd: refactor simd availability handlingJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-02simd: return a bool from simd_relaxJason A. Donenfeld
Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-02global: prefix all functions with wg_Jason A. Donenfeld
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>
2018-10-02poly1305-mips64: use compiler-defined macros in assemblyJason A. Donenfeld
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>
2018-10-02blake2s: rename arch function and use slicker le32 helperJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-02blake2s: feed fpu functions PAGE_SIZE at a timeJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-02poly1305: feed fpu functions PAGE_SIZE at a timeJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-02chacha20: feed fpu functions PAGE_SIZE at a timeJason A. Donenfeld
Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-02chacha20: test multiple page span in selftestJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-02chacha20: break out of zero loops in selftestJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-02crypto: prefer IS_ENABLED to ifdefsJason A. Donenfeld
Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-02crypto: ignore ARMv3Jason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-02compat: kernels < 3.17 don't have read_cpuid_partNathan Chancellor
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>
2018-10-02qemu: support more arm big endian platformsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-09-25crypto: rename DEBUG to SELFTESTJason A. Donenfeld
Also we make selftest errors of type err, so that they're obvious in dmesg. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-09-25poly1305-arm: swap endianness in base 2^26 conversionJason A. Donenfeld
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>