[PATCH V3 2/2] evm: Allow non-SHA1 digital signatures

2018-06-08 Thread Matthew Garrett
SHA1 is reasonable in HMAC constructs, but it's desirable to be able to use stronger hashes in digital signatures. Modify the EVM crypto code so the hash type is imported from the digital signature and passed down to the hash calculation code, and return the digest size to higher layers for

[PATCH V3 1/2] evm: Don't deadlock if a crypto algorithm is unavailable

2018-06-08 Thread Matthew Garrett
When EVM attempts to appraise a file signed with a crypto algorithm the kernel doesn't have support for, it will cause the kernel to trigger a module load. If the EVM policy includes appraisal of kernel modules this will in turn call back into EVM - since EVM is holding a lock until the crypto

Support additional signature types in EVM

2018-06-08 Thread Matthew Garrett
Same as V2, but rebased on next-integrity

Re: [PATCH] crypto: don't optimize keccakf()

2018-06-08 Thread Ard Biesheuvel
On 8 June 2018 at 11:53, Dmitry Vyukov wrote: > keccakf() is the only function in kernel that uses __optimize() macro. > __optimize() breaks frame pointer unwinder as optimized code uses RBP, > and amusingly this always lead to degraded performance as gcc does not > inline across different

[PATCH] crypto: don't optimize keccakf()

2018-06-08 Thread Dmitry Vyukov
keccakf() is the only function in kernel that uses __optimize() macro. __optimize() breaks frame pointer unwinder as optimized code uses RBP, and amusingly this always lead to degraded performance as gcc does not inline across different optimizations levels, so keccakf() wasn't inlined into its

possible uninitialized walk.flags in skcipher_walk_virt?

2018-06-08 Thread Jia He
Hi Herbert I noticed that you ever were aware of there might be uninitializaed walk.flags issues at [1] which is commented by Eric Biggers I wonder whether you thought there is still such issue? I found this when I reviewed the codes. I haven't watched any exceptions/crashes [1]