Re: [PATCH] KEYS: encrypted: avoid encrypting/decrypting stack buffers

From: Eric Biggers
Date: Mon Apr 03 2017 - 14:22:07 EST


On Mon, Apr 03, 2017 at 11:55:42AM -0400, Mimi Zohar wrote:
>
> This patch removes calculating the "padlen".  Will this change break
> other use cases?
>

No, the number of bytes being encrypted is still 'encrypted_datalen' which is
passed to skcipher_request_set_crypt(). It's okay if the input scatterlist is
longer than that; only the first 'encrypted_datalen' bytes will be used.

- Eric