* [jarkko-tpmdd:tpm2key-v7 8/9] crypto/asymmetric_keys/tpm2_key_rsa.c:636 tpm2_key_rsa_preparse() error: uninitialized symbol 'ret'.
@ 2024-05-29 7:12 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2024-05-29 7:12 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Jarkko Sakkinen <jarkko@kernel.org>
CC: James Prestwood <prestwoj@gmail.com>
tree: git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git tpm2key-v7
head: 892305fec7841bf841a9c19e01c999c5f4b4e831
commit: 4970b8d723c3af732b21a8bf7c1eebfb03792457 [8/9] keys: asymmetric: Add tpm2_key_rsa
:::::: branch date: 10 hours ago
:::::: commit date: 19 hours ago
config: alpha-randconfig-r081-20240529 (https://download.01.org/0day-ci/archive/20240529/202405291528.FxUKVyP2-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 13.2.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202405291528.FxUKVyP2-lkp@intel.com/
smatch warnings:
crypto/asymmetric_keys/tpm2_key_rsa.c:636 tpm2_key_rsa_preparse() error: uninitialized symbol 'ret'.
vim +/ret +636 crypto/asymmetric_keys/tpm2_key_rsa.c
4970b8d723c3af Jarkko Sakkinen 2024-05-26 625
4970b8d723c3af Jarkko Sakkinen 2024-05-26 626 /*
4970b8d723c3af Jarkko Sakkinen 2024-05-26 627 * Attempt to parse a data blob for a key as a TPM private key blob.
4970b8d723c3af Jarkko Sakkinen 2024-05-26 628 */
4970b8d723c3af Jarkko Sakkinen 2024-05-26 629 static int tpm2_key_rsa_preparse(struct key_preparsed_payload *prep)
4970b8d723c3af Jarkko Sakkinen 2024-05-26 630 {
4970b8d723c3af Jarkko Sakkinen 2024-05-26 631 struct tpm2_key *key;
4970b8d723c3af Jarkko Sakkinen 2024-05-26 632 int ret;
4970b8d723c3af Jarkko Sakkinen 2024-05-26 633
4970b8d723c3af Jarkko Sakkinen 2024-05-26 634 key = tpm2_key_decode(prep->data, prep->datalen);
4970b8d723c3af Jarkko Sakkinen 2024-05-26 635 if (IS_ERR(key))
4970b8d723c3af Jarkko Sakkinen 2024-05-26 @636 return ret;
4970b8d723c3af Jarkko Sakkinen 2024-05-26 637
4970b8d723c3af Jarkko Sakkinen 2024-05-26 638 if (key->oid != OID_TPMLoadableKey) {
4970b8d723c3af Jarkko Sakkinen 2024-05-26 639 kfree(key);
4970b8d723c3af Jarkko Sakkinen 2024-05-26 640 return -EBADMSG;
4970b8d723c3af Jarkko Sakkinen 2024-05-26 641 }
4970b8d723c3af Jarkko Sakkinen 2024-05-26 642
4970b8d723c3af Jarkko Sakkinen 2024-05-26 643 ret = __tpm2_key_rsa_preparse(key);
4970b8d723c3af Jarkko Sakkinen 2024-05-26 644 if (ret < 0) {
4970b8d723c3af Jarkko Sakkinen 2024-05-26 645 kfree(key);
4970b8d723c3af Jarkko Sakkinen 2024-05-26 646 return ret;
4970b8d723c3af Jarkko Sakkinen 2024-05-26 647 }
4970b8d723c3af Jarkko Sakkinen 2024-05-26 648
4970b8d723c3af Jarkko Sakkinen 2024-05-26 649 prep->payload.data[asym_subtype] = &tpm2_key_rsa_subtype;
4970b8d723c3af Jarkko Sakkinen 2024-05-26 650 prep->payload.data[asym_key_ids] = NULL;
4970b8d723c3af Jarkko Sakkinen 2024-05-26 651 prep->payload.data[asym_crypto] = key;
4970b8d723c3af Jarkko Sakkinen 2024-05-26 652 prep->payload.data[asym_auth] = NULL;
4970b8d723c3af Jarkko Sakkinen 2024-05-26 653 prep->quotalen = 100;
4970b8d723c3af Jarkko Sakkinen 2024-05-26 654
4970b8d723c3af Jarkko Sakkinen 2024-05-26 655 return 0;
4970b8d723c3af Jarkko Sakkinen 2024-05-26 656 }
4970b8d723c3af Jarkko Sakkinen 2024-05-26 657
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread
* [jarkko-tpmdd:tpm2key-v7 8/9] crypto/asymmetric_keys/tpm2_key_rsa.c:636 tpm2_key_rsa_preparse() error: uninitialized symbol 'ret'.
@ 2024-05-29 14:36 Dan Carpenter
2024-05-29 15:42 ` Jarkko Sakkinen
0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2024-05-29 14:36 UTC (permalink / raw)
To: oe-kbuild, Jarkko Sakkinen; +Cc: lkp, oe-kbuild-all, James Prestwood
tree: git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git tpm2key-v7
head: 892305fec7841bf841a9c19e01c999c5f4b4e831
commit: 4970b8d723c3af732b21a8bf7c1eebfb03792457 [8/9] keys: asymmetric: Add tpm2_key_rsa
config: alpha-randconfig-r081-20240529 (https://download.01.org/0day-ci/archive/20240529/202405291528.FxUKVyP2-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 13.2.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202405291528.FxUKVyP2-lkp@intel.com/
smatch warnings:
crypto/asymmetric_keys/tpm2_key_rsa.c:636 tpm2_key_rsa_preparse() error: uninitialized symbol 'ret'.
vim +/ret +636 crypto/asymmetric_keys/tpm2_key_rsa.c
4970b8d723c3af Jarkko Sakkinen 2024-05-26 629 static int tpm2_key_rsa_preparse(struct key_preparsed_payload *prep)
4970b8d723c3af Jarkko Sakkinen 2024-05-26 630 {
4970b8d723c3af Jarkko Sakkinen 2024-05-26 631 struct tpm2_key *key;
4970b8d723c3af Jarkko Sakkinen 2024-05-26 632 int ret;
4970b8d723c3af Jarkko Sakkinen 2024-05-26 633
4970b8d723c3af Jarkko Sakkinen 2024-05-26 634 key = tpm2_key_decode(prep->data, prep->datalen);
4970b8d723c3af Jarkko Sakkinen 2024-05-26 635 if (IS_ERR(key))
4970b8d723c3af Jarkko Sakkinen 2024-05-26 @636 return ret;
^^^^^^^^^^
Same. return PTR_ERR(key);
4970b8d723c3af Jarkko Sakkinen 2024-05-26 637
4970b8d723c3af Jarkko Sakkinen 2024-05-26 638 if (key->oid != OID_TPMLoadableKey) {
4970b8d723c3af Jarkko Sakkinen 2024-05-26 639 kfree(key);
4970b8d723c3af Jarkko Sakkinen 2024-05-26 640 return -EBADMSG;
4970b8d723c3af Jarkko Sakkinen 2024-05-26 641 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [jarkko-tpmdd:tpm2key-v7 8/9] crypto/asymmetric_keys/tpm2_key_rsa.c:636 tpm2_key_rsa_preparse() error: uninitialized symbol 'ret'.
2024-05-29 14:36 [jarkko-tpmdd:tpm2key-v7 8/9] crypto/asymmetric_keys/tpm2_key_rsa.c:636 tpm2_key_rsa_preparse() error: uninitialized symbol 'ret' Dan Carpenter
@ 2024-05-29 15:42 ` Jarkko Sakkinen
0 siblings, 0 replies; 3+ messages in thread
From: Jarkko Sakkinen @ 2024-05-29 15:42 UTC (permalink / raw)
To: Dan Carpenter, oe-kbuild; +Cc: lkp, oe-kbuild-all, James Prestwood
On Wed May 29, 2024 at 5:36 PM EEST, Dan Carpenter wrote:
> tree: git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git tpm2key-v7
> head: 892305fec7841bf841a9c19e01c999c5f4b4e831
> commit: 4970b8d723c3af732b21a8bf7c1eebfb03792457 [8/9] keys: asymmetric: Add tpm2_key_rsa
> config: alpha-randconfig-r081-20240529 (https://download.01.org/0day-ci/archive/20240529/202405291528.FxUKVyP2-lkp@intel.com/config)
> compiler: alpha-linux-gcc (GCC) 13.2.0
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> | Closes: https://lore.kernel.org/r/202405291528.FxUKVyP2-lkp@intel.com/
>
> smatch warnings:
> crypto/asymmetric_keys/tpm2_key_rsa.c:636 tpm2_key_rsa_preparse() error: uninitialized symbol 'ret'.
>
> vim +/ret +636 crypto/asymmetric_keys/tpm2_key_rsa.c
>
> 4970b8d723c3af Jarkko Sakkinen 2024-05-26 629 static int tpm2_key_rsa_preparse(struct key_preparsed_payload *prep)
> 4970b8d723c3af Jarkko Sakkinen 2024-05-26 630 {
> 4970b8d723c3af Jarkko Sakkinen 2024-05-26 631 struct tpm2_key *key;
> 4970b8d723c3af Jarkko Sakkinen 2024-05-26 632 int ret;
> 4970b8d723c3af Jarkko Sakkinen 2024-05-26 633
> 4970b8d723c3af Jarkko Sakkinen 2024-05-26 634 key = tpm2_key_decode(prep->data, prep->datalen);
> 4970b8d723c3af Jarkko Sakkinen 2024-05-26 635 if (IS_ERR(key))
> 4970b8d723c3af Jarkko Sakkinen 2024-05-26 @636 return ret;
> ^^^^^^^^^^
> Same. return PTR_ERR(key);
>
> 4970b8d723c3af Jarkko Sakkinen 2024-05-26 637
> 4970b8d723c3af Jarkko Sakkinen 2024-05-26 638 if (key->oid != OID_TPMLoadableKey) {
> 4970b8d723c3af Jarkko Sakkinen 2024-05-26 639 kfree(key);
> 4970b8d723c3af Jarkko Sakkinen 2024-05-26 640 return -EBADMSG;
> 4970b8d723c3af Jarkko Sakkinen 2024-05-26 641 }
Thanks for spotting this!
BR, Jarkko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-05-29 15:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-29 14:36 [jarkko-tpmdd:tpm2key-v7 8/9] crypto/asymmetric_keys/tpm2_key_rsa.c:636 tpm2_key_rsa_preparse() error: uninitialized symbol 'ret' Dan Carpenter
2024-05-29 15:42 ` Jarkko Sakkinen
-- strict thread matches above, loose matches on Subject: below --
2024-05-29 7:12 kernel test robot
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.