2022-01-21 19:02:32

by Jason A. Donenfeld

[permalink] [raw]
Subject: Re: [PATCH] lib/crypto: blake2s: fix a CFI failure

Hey again,

Actually... It looks like the issue is that in this file:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/crypto/internal/blake2s.h

this line

typedef void (*blake2s_compress_t)(struct blake2s_state *state,
const u8 *block, size_t nblocks, u32 inc);

should become

typedef void (*blake2s_compress_t)(struct blake2s_state *state,
const u8 *block, size_t nblocks, const u32 inc);

Does making that change fix things for you?

Thanks,
Jason


2022-01-21 19:03:16

by Miles Chen

[permalink] [raw]
Subject: Re: [PATCH] lib/crypto: blake2s: fix a CFI failure

>typedef void (*blake2s_compress_t)(struct blake2s_state *state,
> const u8 *block, size_t nblocks, u32 inc);
>
>should become
>
>typedef void (*blake2s_compress_t)(struct blake2s_state *state,
> const u8 *block, size_t nblocks, const u32 inc);
>
>Does making that change fix things for you?
>
>Thanks,
>Jason

Thanks for your fast response.
It does not work. I tried this before reverting the commit 6048fdcc5f26.

Miles