lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 14 Jan 2020 13:32:39 -0800 From: Eric Biggers <ebiggers@...nel.org> To: linux-fscrypt@...r.kernel.org Cc: linux-ext4@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net Subject: Re: [PATCH] fs-verity: use mempool for hash requests On Tue, Dec 31, 2019 at 11:55:45AM -0600, Eric Biggers wrote: > From: Eric Biggers <ebiggers@...gle.com> > > 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. > > Signed-off-by: Eric Biggers <ebiggers@...gle.com> > --- > fs/verity/enable.c | 8 +-- > fs/verity/fsverity_private.h | 16 ++++-- > fs/verity/hash_algs.c | 98 +++++++++++++++++++++++++++--------- > fs/verity/open.c | 4 +- > fs/verity/verify.c | 17 +++---- > 5 files changed, 97 insertions(+), 46 deletions(-) > Applied to fscrypt.git#fsverity for 5.6. - Eric
Powered by blists - more mailing lists