* [PATCH RESEND] KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails
@ 2019-05-29 21:01 Eric Biggers
2019-05-29 21:48 ` James Morris
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: Eric Biggers @ 2019-05-29 21:01 UTC (permalink / raw)
To: keyrings
From: Eric Biggers <ebiggers@google.com>
No error code was being set on this error path.
Fixes: ad4b1eb5fb33 ("KEYS: asym_tpm: Implement encryption operation [ver #2]")
Fixes: c08fed737126 ("KEYS: Implement encrypt, decrypt and sign for software asymmetric key [ver #2]")
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
crypto/asymmetric_keys/asym_tpm.c | 1 +
crypto/asymmetric_keys/public_key.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/crypto/asymmetric_keys/asym_tpm.c b/crypto/asymmetric_keys/asym_tpm.c
index 76d2ce3a1b5b1..5154e280ada22 100644
--- a/crypto/asymmetric_keys/asym_tpm.c
+++ b/crypto/asymmetric_keys/asym_tpm.c
@@ -486,6 +486,7 @@ static int tpm_key_encrypt(struct tpm_key *tk,
if (ret < 0)
goto error_free_tfm;
+ ret = -ENOMEM;
req = akcipher_request_alloc(tfm, GFP_KERNEL);
if (!req)
goto error_free_tfm;
diff --git a/crypto/asymmetric_keys/public_key.c b/crypto/asymmetric_keys/public_key.c
index 364b9df9d631f..d7f43d4ea925a 100644
--- a/crypto/asymmetric_keys/public_key.c
+++ b/crypto/asymmetric_keys/public_key.c
@@ -184,6 +184,7 @@ static int software_key_eds_op(struct kernel_pkey_params *params,
if (IS_ERR(tfm))
return PTR_ERR(tfm);
+ ret = -ENOMEM;
req = akcipher_request_alloc(tfm, GFP_KERNEL);
if (!req)
goto error_free_tfm;
--
2.22.0.rc1.257.g3120a18244-goog
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH RESEND] KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails
2019-05-29 21:01 [PATCH RESEND] KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails Eric Biggers
@ 2019-05-29 21:48 ` James Morris
2019-08-22 15:35 ` Eric Biggers
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: James Morris @ 2019-05-29 21:48 UTC (permalink / raw)
To: keyrings
On Wed, 29 May 2019, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> No error code was being set on this error path.
>
> Fixes: ad4b1eb5fb33 ("KEYS: asym_tpm: Implement encryption operation [ver #2]")
> Fixes: c08fed737126 ("KEYS: Implement encrypt, decrypt and sign for software asymmetric key [ver #2]")
> Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: James Morris <jamorris@linux.microsoft.com>
--
James Morris
<jmorris@namei.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH RESEND] KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails
2019-05-29 21:01 [PATCH RESEND] KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails Eric Biggers
2019-05-29 21:48 ` James Morris
@ 2019-08-22 15:35 ` Eric Biggers
2019-10-09 23:03 ` Eric Biggers
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Eric Biggers @ 2019-08-22 15:35 UTC (permalink / raw)
To: keyrings
From: Eric Biggers <ebiggers@google.com>
No error code was being set on this error path.
Fixes: ad4b1eb5fb33 ("KEYS: asym_tpm: Implement encryption operation [ver #2]")
Fixes: c08fed737126 ("KEYS: Implement encrypt, decrypt and sign for software asymmetric key [ver #2]")
Reviewed-by: James Morris <jamorris@linux.microsoft.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
crypto/asymmetric_keys/asym_tpm.c | 1 +
crypto/asymmetric_keys/public_key.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/crypto/asymmetric_keys/asym_tpm.c b/crypto/asymmetric_keys/asym_tpm.c
index 76d2ce3a1b5b..5154e280ada2 100644
--- a/crypto/asymmetric_keys/asym_tpm.c
+++ b/crypto/asymmetric_keys/asym_tpm.c
@@ -486,6 +486,7 @@ static int tpm_key_encrypt(struct tpm_key *tk,
if (ret < 0)
goto error_free_tfm;
+ ret = -ENOMEM;
req = akcipher_request_alloc(tfm, GFP_KERNEL);
if (!req)
goto error_free_tfm;
diff --git a/crypto/asymmetric_keys/public_key.c b/crypto/asymmetric_keys/public_key.c
index 364b9df9d631..d7f43d4ea925 100644
--- a/crypto/asymmetric_keys/public_key.c
+++ b/crypto/asymmetric_keys/public_key.c
@@ -184,6 +184,7 @@ static int software_key_eds_op(struct kernel_pkey_params *params,
if (IS_ERR(tfm))
return PTR_ERR(tfm);
+ ret = -ENOMEM;
req = akcipher_request_alloc(tfm, GFP_KERNEL);
if (!req)
goto error_free_tfm;
--
2.22.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH RESEND] KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails
2019-05-29 21:01 [PATCH RESEND] KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails Eric Biggers
2019-05-29 21:48 ` James Morris
2019-08-22 15:35 ` Eric Biggers
@ 2019-10-09 23:03 ` Eric Biggers
2019-10-14 19:48 ` Jarkko Sakkinen
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Eric Biggers @ 2019-10-09 23:03 UTC (permalink / raw)
To: keyrings
From: Eric Biggers <ebiggers@google.com>
No error code was being set on this error path.
Fixes: ad4b1eb5fb33 ("KEYS: asym_tpm: Implement encryption operation [ver #2]")
Fixes: c08fed737126 ("KEYS: Implement encrypt, decrypt and sign for software asymmetric key [ver #2]")
Reviewed-by: James Morris <jamorris@linux.microsoft.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
crypto/asymmetric_keys/asym_tpm.c | 1 +
crypto/asymmetric_keys/public_key.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/crypto/asymmetric_keys/asym_tpm.c b/crypto/asymmetric_keys/asym_tpm.c
index 76d2ce3a1b5b1..5154e280ada22 100644
--- a/crypto/asymmetric_keys/asym_tpm.c
+++ b/crypto/asymmetric_keys/asym_tpm.c
@@ -486,6 +486,7 @@ static int tpm_key_encrypt(struct tpm_key *tk,
if (ret < 0)
goto error_free_tfm;
+ ret = -ENOMEM;
req = akcipher_request_alloc(tfm, GFP_KERNEL);
if (!req)
goto error_free_tfm;
diff --git a/crypto/asymmetric_keys/public_key.c b/crypto/asymmetric_keys/public_key.c
index 364b9df9d631f..d7f43d4ea925a 100644
--- a/crypto/asymmetric_keys/public_key.c
+++ b/crypto/asymmetric_keys/public_key.c
@@ -184,6 +184,7 @@ static int software_key_eds_op(struct kernel_pkey_params *params,
if (IS_ERR(tfm))
return PTR_ERR(tfm);
+ ret = -ENOMEM;
req = akcipher_request_alloc(tfm, GFP_KERNEL);
if (!req)
goto error_free_tfm;
--
2.23.0.581.g78d2f28ef7-goog
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH RESEND] KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails
2019-05-29 21:01 [PATCH RESEND] KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails Eric Biggers
` (2 preceding siblings ...)
2019-10-09 23:03 ` Eric Biggers
@ 2019-10-14 19:48 ` Jarkko Sakkinen
2019-11-11 18:20 ` Eric Biggers
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Jarkko Sakkinen @ 2019-10-14 19:48 UTC (permalink / raw)
To: keyrings
On Wed, Oct 09, 2019 at 04:03:49PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> No error code was being set on this error path.
>
> Fixes: ad4b1eb5fb33 ("KEYS: asym_tpm: Implement encryption operation [ver #2]")
> Fixes: c08fed737126 ("KEYS: Implement encrypt, decrypt and sign for software asymmetric key [ver #2]")
> Reviewed-by: James Morris <jamorris@linux.microsoft.com>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
Cc: stable@vger.kernel.org
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
I can pick this up to my tree given the TPM association. David?
/Jarkko
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH RESEND] KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails
2019-05-29 21:01 [PATCH RESEND] KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails Eric Biggers
` (3 preceding siblings ...)
2019-10-14 19:48 ` Jarkko Sakkinen
@ 2019-11-11 18:20 ` Eric Biggers
2019-11-12 20:09 ` Jarkko Sakkinen
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Eric Biggers @ 2019-11-11 18:20 UTC (permalink / raw)
To: keyrings
On Mon, Oct 14, 2019 at 10:48:46PM +0300, Jarkko Sakkinen wrote:
> On Wed, Oct 09, 2019 at 04:03:49PM -0700, Eric Biggers wrote:
> > From: Eric Biggers <ebiggers@google.com>
> >
> > No error code was being set on this error path.
> >
> > Fixes: ad4b1eb5fb33 ("KEYS: asym_tpm: Implement encryption operation [ver #2]")
> > Fixes: c08fed737126 ("KEYS: Implement encrypt, decrypt and sign for software asymmetric key [ver #2]")
> > Reviewed-by: James Morris <jamorris@linux.microsoft.com>
> > Signed-off-by: Eric Biggers <ebiggers@google.com>
>
> Cc: stable@vger.kernel.org
> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
>
> I can pick this up to my tree given the TPM association. David?
>
> /Jarkko
Ping.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH RESEND] KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails
2019-05-29 21:01 [PATCH RESEND] KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails Eric Biggers
` (4 preceding siblings ...)
2019-11-11 18:20 ` Eric Biggers
@ 2019-11-12 20:09 ` Jarkko Sakkinen
2019-12-09 20:19 ` Eric Biggers
2019-12-12 21:46 ` Jarkko Sakkinen
7 siblings, 0 replies; 9+ messages in thread
From: Jarkko Sakkinen @ 2019-11-12 20:09 UTC (permalink / raw)
To: keyrings
On Mon, Nov 11, 2019 at 10:20:55AM -0800, Eric Biggers wrote:
> On Mon, Oct 14, 2019 at 10:48:46PM +0300, Jarkko Sakkinen wrote:
> > On Wed, Oct 09, 2019 at 04:03:49PM -0700, Eric Biggers wrote:
> > > From: Eric Biggers <ebiggers@google.com>
> > >
> > > No error code was being set on this error path.
> > >
> > > Fixes: ad4b1eb5fb33 ("KEYS: asym_tpm: Implement encryption operation [ver #2]")
> > > Fixes: c08fed737126 ("KEYS: Implement encrypt, decrypt and sign for software asymmetric key [ver #2]")
> > > Reviewed-by: James Morris <jamorris@linux.microsoft.com>
> > > Signed-off-by: Eric Biggers <ebiggers@google.com>
> >
> > Cc: stable@vger.kernel.org
> > Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> >
> > I can pick this up to my tree given the TPM association. David?
> >
> > /Jarkko
>
> Ping.
I can pick this up to my v5.5-rc2 PR (already sent one for rc1).
/Jarkko
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH RESEND] KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails
2019-05-29 21:01 [PATCH RESEND] KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails Eric Biggers
` (5 preceding siblings ...)
2019-11-12 20:09 ` Jarkko Sakkinen
@ 2019-12-09 20:19 ` Eric Biggers
2019-12-12 21:46 ` Jarkko Sakkinen
7 siblings, 0 replies; 9+ messages in thread
From: Eric Biggers @ 2019-12-09 20:19 UTC (permalink / raw)
To: keyrings
On Tue, Nov 12, 2019 at 10:09:08PM +0200, Jarkko Sakkinen wrote:
> On Mon, Nov 11, 2019 at 10:20:55AM -0800, Eric Biggers wrote:
> > On Mon, Oct 14, 2019 at 10:48:46PM +0300, Jarkko Sakkinen wrote:
> > > On Wed, Oct 09, 2019 at 04:03:49PM -0700, Eric Biggers wrote:
> > > > From: Eric Biggers <ebiggers@google.com>
> > > >
> > > > No error code was being set on this error path.
> > > >
> > > > Fixes: ad4b1eb5fb33 ("KEYS: asym_tpm: Implement encryption operation [ver #2]")
> > > > Fixes: c08fed737126 ("KEYS: Implement encrypt, decrypt and sign for software asymmetric key [ver #2]")
> > > > Reviewed-by: James Morris <jamorris@linux.microsoft.com>
> > > > Signed-off-by: Eric Biggers <ebiggers@google.com>
> > >
> > > Cc: stable@vger.kernel.org
> > > Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> > >
> > > I can pick this up to my tree given the TPM association. David?
> > >
> > > /Jarkko
> >
> > Ping.
>
> I can pick this up to my v5.5-rc2 PR (already sent one for rc1).
>
> /Jarkko
Ping.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH RESEND] KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails
2019-05-29 21:01 [PATCH RESEND] KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails Eric Biggers
` (6 preceding siblings ...)
2019-12-09 20:19 ` Eric Biggers
@ 2019-12-12 21:46 ` Jarkko Sakkinen
7 siblings, 0 replies; 9+ messages in thread
From: Jarkko Sakkinen @ 2019-12-12 21:46 UTC (permalink / raw)
To: keyrings
On Wed, Oct 09, 2019 at 04:03:49PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> No error code was being set on this error path.
>
> Fixes: ad4b1eb5fb33 ("KEYS: asym_tpm: Implement encryption operation [ver #2]")
> Fixes: c08fed737126 ("KEYS: Implement encrypt, decrypt and sign for software asymmetric key [ver #2]")
> Reviewed-by: James Morris <jamorris@linux.microsoft.com>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
Applied to git://git.infradead.org/users/jjs/linux-tpmdd.git
/Jarkko
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-12-12 21:46 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-29 21:01 [PATCH RESEND] KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails Eric Biggers
2019-05-29 21:48 ` James Morris
2019-08-22 15:35 ` Eric Biggers
2019-10-09 23:03 ` Eric Biggers
2019-10-14 19:48 ` Jarkko Sakkinen
2019-11-11 18:20 ` Eric Biggers
2019-11-12 20:09 ` Jarkko Sakkinen
2019-12-09 20:19 ` Eric Biggers
2019-12-12 21:46 ` Jarkko Sakkinen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.