kernel-fxtec-pro1x/fs/verity
Eric Biggers 62810e0d59 fs-verity: use mempool for hash requests
When initializing an fs-verity hash algorithm, also initialize a mempool
that contains a single preallocated hash request object.  Then replace
the direct calls to ahash_request_alloc() and ahash_request_free() with
allocating and freeing from this mempool.

This eliminates the possibility of the allocation failing, which is
desirable for the I/O path.

This doesn't cause deadlocks because there's no case where multiple hash
requests are needed at a time to make forward progress.

Link: https://lore.kernel.org/r/20191231175545.20709-1-ebiggers@kernel.org
Reviewed-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Eric Biggers <ebiggers@google.com>
2020-02-13 15:14:20 -08:00
..
enable.c fs-verity: use mempool for hash requests 2020-02-13 15:14:20 -08:00
fsverity_private.h fs-verity: use mempool for hash requests 2020-02-13 15:14:20 -08:00
hash_algs.c fs-verity: use mempool for hash requests 2020-02-13 15:14:20 -08:00
init.c fs-verity: support builtin file signatures 2019-09-23 14:11:56 -07:00
Kconfig fs-verity: support builtin file signatures 2019-09-23 14:11:56 -07:00
Makefile fs-verity: support builtin file signatures 2019-09-23 14:11:56 -07:00
measure.c fs-verity: implement FS_IOC_MEASURE_VERITY ioctl 2019-09-23 14:11:56 -07:00
open.c fs-verity: use mempool for hash requests 2020-02-13 15:14:20 -08:00
signature.c fs-verity: support builtin file signatures 2019-09-23 14:11:56 -07:00
verify.c fs-verity: use mempool for hash requests 2020-02-13 15:14:20 -08:00