aboutsummaryrefslogtreecommitdiff
path: root/net/dccp/sysctl.c
diff options
context:
space:
mode:
authorDavid Rientjes2022-12-30 14:18:46 -0800
committerGreg Kroah-Hartman2023-03-10 09:32:52 +0100
commitc65b76f6f3e51398dc04ce838e65595aaf049e18 (patch)
tree2062eb07a285068dde97ab7b58a42b0b5c0dcd41 /net/dccp/sysctl.c
parent553d8b25cc5ef1742459904bca468363c9b401ec (diff)
crypto: ccp - Avoid page allocation failure warning for SEV_GET_ID2
[ Upstream commit 91dfd98216d817ec5f1c55890bacb7b4fe9b068a ] For SEV_GET_ID2, the user provided length does not have a specified limitation because the length of the ID may change in the future. The kernel memory allocation, however, is implicitly limited to 4MB on x86 by the page allocator, otherwise the kzalloc() will fail. When this happens, it is best not to spam the kernel log with the warning. Simply fail the allocation and return ENOMEM to the user. Fixes: d6112ea0cb34 ("crypto: ccp - introduce SEV_GET_ID2 command") Reported-by: Andy Nguyen <theflow@google.com> Reported-by: Peter Gonda <pgonda@google.com> Suggested-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David Rientjes <rientjes@google.com> Acked-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/dccp/sysctl.c')
0 files changed, 0 insertions, 0 deletions