summaryrefslogtreecommitdiff
path: root/drivers/amba/Kconfig
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2018-12-06 15:55:41 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-05 15:26:42 +0100
commita7d82370253ca12f8c32f6992f8e27e1fbce7468 (patch)
tree21a5477e70aa7bf1a1f9acd058c963c1bb2c3626 /drivers/amba/Kconfig
parent54878c24f874c1624a40e871580b4aa35d8ba37d (diff)
crypto: user - support incremental algorithm dumps
[ Upstream commit 0ac6b8fb23c724b015d9ca70a89126e8d1563166 ] CRYPTO_MSG_GETALG in NLM_F_DUMP mode sometimes doesn't return all registered crypto algorithms, because it doesn't support incremental dumps. crypto_dump_report() only permits itself to be called once, yet the netlink subsystem allocates at most ~64 KiB for the skb being dumped to. Thus only the first recvmsg() returns data, and it may only include a subset of the crypto algorithms even if the user buffer passed to recvmsg() is large enough to hold all of them. Fix this by using one of the arguments in the netlink_callback structure to keep track of the current position in the algorithm list. Then userspace can do multiple recvmsg() on the socket after sending the dump request. This is the way netlink dumps work elsewhere in the kernel; it's unclear why this was different (probably just an oversight). Also fix an integer overflow when calculating the dump buffer size hint. Fixes: a38f7907b926 ("crypto: Add userspace configuration API") Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/amba/Kconfig')
0 files changed, 0 insertions, 0 deletions