[TESTING, DO NOT MERGE] crypto - add benchmark and testing module

Add a module which exposes a file /proc/cryptobench.  Writing commands
to this file triggers benchmarking and testing of crypto algorithms
(symmetric ciphers and hashes).

Examples:
    # echo 'algname=adiantum(xchacha12,aes) keysize=32' > /proc/cryptobench
    # cat /proc/cryptobench
    SUCCESS algname=adiantum(xchacha12,aes) driver_name=adiantum(xchacha12-software,aes-aesni,nhpoly1305-generic) measurement=0x30a5abd5776e0af enc_time=44831104 dec_time=38303077

    # echo 'algname=sha256 algtype=hash' > /proc/cryptobench
    # cat /proc/cryptobench
    SUCCESS algname=sha256 driver_name=sha256-avx2 measurement=0x2ed36e096cdb833c time=50339190

Signed-off-by: Eric Biggers <ebiggers@google.com>
5 files changed