[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y6wDJd3hfztLoCp1@gondor.apana.org.au>
Date: Wed, 28 Dec 2022 16:49:41 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: David Rientjes <rientjes@...gle.com>
Cc: Peter Gonda <pgonda@...gle.com>, Andy Nguyen <theflow@...gle.com>,
stable@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-crypto@...r.kernel.org, John Allen <john.allen@....com>,
"Thomas . Lendacky" <thomas.lendacky@....com>
Subject: Re: [PATCH] crypto: ccp - Limit memory allocation in SEV_GET_ID2
ioctl
On Tue, Dec 27, 2022 at 05:42:31PM -0800, David Rientjes wrote:
>
> The goal was to be more explicit about that, but setting __GFP_NOWARN
> would result in the same functional behavior. If we're to go that route,
> it would likely be best to add a comment about the limitation.
>
> That said, if AMD would prefer this to be an EINVAL instead of a ENOMEM by
> introducing a more formal limitation on the length that can be used, that
> would be preferred so that we don't need to rely on the page allocator's
> max length to enforce this arbitrarily.
Ideally the limit should be set according to the object that
you're trying to allocate. But if that is truly unlimited,
and you don't want to see a warning, then GFP_NOWARN seems to
fit the bill.
Thanks,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists