Re: [PATCH v7 2/5] KEYS: trusted: Change -EINVAL to -E2BIG

From: Jarkko Sakkinen
Date: Wed May 29 2024 - 08:20:51 EST


On Wed May 29, 2024 at 4:50 AM EEST, Stefan Berger wrote:
>
>
> On 5/28/24 17:08, Jarkko Sakkinen wrote:
> > Report -E2BIG instead of -EINVAL when too large size for the key blob is
> > requested.
> >
> > Signed-off-by: Jarkko Sakkinen <jarkko@xxxxxxxxxx>
>
> Reviewed-by: Stefan Berger <stefanb@xxxxxxxxxxxxx>

Thank you.

Hmm... I'd like to add even:

Cc: stable@xxxxxxxxxxxxxxx # v5.13+
Fixes: f2219745250f ("security: keys: trusted: use ASN.1 TPM2 key format for the blobs")

It turned out to be useful error message and would be useful also for
stable kernels. So if no decent counter-arguments, I'll just pick it
to my master branch.

BR, Jarkko