summaryrefslogtreecommitdiff
path: root/crypto/xts.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2017-03-17 20:34:30 +0100
committerThomas Gleixner <tglx@linutronix.de>2017-03-17 20:34:30 +0100
commitf64f1f8858052adbde6475a9c160e1acd5b0f0a7 (patch)
treef849e8432047d3e0fc04590ddfb6a76ba953f9b6 /crypto/xts.c
parent080dd9646e870581657c76f8d1c0cd153fbdb962 (diff)
parent4c6427919ee920d5963cf826de76292286342aa0 (diff)
downloadlinux-crypto-f64f1f8858052adbde6475a9c160e1acd5b0f0a7.tar.gz
linux-crypto-f64f1f8858052adbde6475a9c160e1acd5b0f0a7.zip
Merge tag 'efi-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi into efi/urgent
Pull a single UEFI fix from Ard: - Reduce the severity of the notice that appears when the ESRT table points to memory that is not covered by the memory map. It is scaring our users and interfering with their nice splash screens. Note that the ESRT may still be perfectly usable, and is currently (to my knowledge) not widely used to begin with.
Diffstat (limited to 'crypto/xts.c')
-rw-r--r--crypto/xts.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/crypto/xts.c b/crypto/xts.c
index 410a2e29..baeb34dd 100644
--- a/crypto/xts.c
+++ b/crypto/xts.c
@@ -463,6 +463,7 @@ static int create(struct crypto_template *tmpl, struct rtattr **tb)
struct xts_instance_ctx *ctx;
struct skcipher_alg *alg;
const char *cipher_name;
+ u32 mask;
int err;
algt = crypto_get_attr_type(tb);
@@ -483,18 +484,19 @@ static int create(struct crypto_template *tmpl, struct rtattr **tb)
ctx = skcipher_instance_ctx(inst);
crypto_set_skcipher_spawn(&ctx->spawn, skcipher_crypto_instance(inst));
- err = crypto_grab_skcipher(&ctx->spawn, cipher_name, 0,
- crypto_requires_sync(algt->type,
- algt->mask));
+
+ mask = crypto_requires_off(algt->type, algt->mask,
+ CRYPTO_ALG_NEED_FALLBACK |
+ CRYPTO_ALG_ASYNC);
+
+ err = crypto_grab_skcipher(&ctx->spawn, cipher_name, 0, mask);
if (err == -ENOENT) {
err = -ENAMETOOLONG;
if (snprintf(ctx->name, CRYPTO_MAX_ALG_NAME, "ecb(%s)",
cipher_name) >= CRYPTO_MAX_ALG_NAME)
goto err_free_inst;
- err = crypto_grab_skcipher(&ctx->spawn, ctx->name, 0,
- crypto_requires_sync(algt->type,
- algt->mask));
+ err = crypto_grab_skcipher(&ctx->spawn, ctx->name, 0, mask);
}
if (err)