fscrypt: improve warnings for missing crypto API support
authorEric Biggers <ebiggers@google.com>
Wed, 24 Jul 2019 18:07:59 +0000 (11:07 -0700)
committerEric Biggers <ebiggers@google.com>
Tue, 13 Aug 2019 02:04:44 +0000 (19:04 -0700)
commita4d14e915bcb86e13b45231cd4fe2ce19bd9ba86
treeb514a293ce16edc1ba1a28e660ca5e545111e332
parent63f668f0def1b58ed1e480661c4043d2b11abc6c
fscrypt: improve warnings for missing crypto API support

Users of fscrypt with non-default algorithms will encounter an error
like the following if they fail to include the needed algorithms into
the crypto API when configuring the kernel (as per the documentation):

    Error allocating 'adiantum(xchacha12,aes)' transform: -2

This requires that the user figure out what the "-2" error means.
Make it more friendly by printing a warning like the following instead:

    Missing crypto API support for Adiantum (API name: "adiantum(xchacha12,aes)")

Also upgrade the log level for *other* errors to KERN_ERR.

Signed-off-by: Eric Biggers <ebiggers@google.com>
fs/crypto/keyinfo.c