On Mon, Apr 28, 2025 at 12:19:50PM -0700, Dave Hansen wrote:
> On 4/28/25 11:38, Eric Biggers wrote:
> > -static int sgx_get_key_hash(const void *modulus, void *hash)
> > -{
> > - struct crypto_shash *tfm;
> > - int ret;
> > -
> > - tfm = crypto_alloc_shash("sha256", 0, CRYPTO_ALG_ASYNC);
> >
On 4/28/25 11:38, Eric Biggers wrote:
> -static int sgx_get_key_hash(const void *modulus, void *hash)
> -{
> - struct crypto_shash *tfm;
> - int ret;
> -
> - tfm = crypto_alloc_shash("sha256", 0, CRYPTO_ALG_ASYNC);
> - if (IS_ERR(tfm))
> - return PTR_ERR(tfm);
> -
> -
From: Eric Biggers
This user of SHA-256 does not support any other algorithm, so the
crypto_shash abstraction provides no value. Just use the SHA-256
library API instead, which is much simpler and easier to use.
Signed-off-by: Eric Biggers
---
This patch is targeting the x86 tree for 6.16.
On Fri, Apr 25, 2025 at 11:11:31PM -0700, Kees Cook wrote:
> In preparation for making the kmalloc family of allocators type aware,
> we need to make sure that the returned type from the allocation matches
> the type of the variable being assigned. (Before, the allocator would
> always return "void