linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Stefan Berger <stefanb@linux.ibm.com>,
	keyrings@vger.kernel.org, linux-crypto@vger.kernel.org,
	davem@davemloft.net, herbert@gondor.apana.org.au,
	dhowells@redhat.com, zohar@linux.ibm.com
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	patrick@puiterwijk.org, linux-integrity@vger.kernel.org,
	Stefan Berger <stefanb@linux.ibm.com>
Subject: Re: [PATCH v7 3/4] x509: Add support for parsing x509 certs with ECDSA keys
Date: Thu, 11 Feb 2021 16:03:11 +0800	[thread overview]
Message-ID: <202102111531.JYJl0c7G-lkp@intel.com> (raw)
In-Reply-To: <20210201151910.1465705-4-stefanb@linux.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 3207 bytes --]

Hi Stefan,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on cryptodev/master]
[also build test ERROR on crypto/master security/next-testing v5.11-rc7 next-20210125]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Stefan-Berger/Add-support-for-x509-certs-with-NIST-p256-and-p192-keys/20210201-232803
base:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: x86_64-randconfig-a011-20200911 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/6e1523b0e77785c263bcb639b87a862ae59731a4
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Stefan-Berger/Add-support-for-x509-certs-with-NIST-p256-and-p192-keys/20210201-232803
        git checkout 6e1523b0e77785c263bcb639b87a862ae59731a4
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   ld: crypto/asymmetric_keys/public_key.o: in function `software_key_determine_akcipher':
>> crypto/asymmetric_keys/public_key.c:97: undefined reference to `parse_OID'


vim +97 crypto/asymmetric_keys/public_key.c

    61	
    62	/*
    63	 * Determine the crypto algorithm name.
    64	 */
    65	static
    66	int software_key_determine_akcipher(const char *encoding,
    67					    const char *hash_algo,
    68					    const struct public_key *pkey,
    69					    char alg_name[CRYPTO_MAX_ALG_NAME])
    70	{
    71		int n;
    72	
    73		if (strcmp(encoding, "pkcs1") == 0) {
    74			/* The data wangled by the RSA algorithm is typically padded
    75			 * and encoded in some manner, such as EMSA-PKCS1-1_5 [RFC3447
    76			 * sec 8.2].
    77			 */
    78			if (!hash_algo)
    79				n = snprintf(alg_name, CRYPTO_MAX_ALG_NAME,
    80					     "pkcs1pad(%s)",
    81					     pkey->pkey_algo);
    82			else
    83				n = snprintf(alg_name, CRYPTO_MAX_ALG_NAME,
    84					     "pkcs1pad(%s,%s)",
    85					     pkey->pkey_algo, hash_algo);
    86			return n >= CRYPTO_MAX_ALG_NAME ? -EINVAL : 0;
    87		}
    88	
    89		if (strcmp(encoding, "raw") == 0) {
    90			strcpy(alg_name, pkey->pkey_algo);
    91			return 0;
    92		}
    93	
    94		if (strcmp(encoding, "x962") == 0) {
    95			enum OID oid;
    96	
  > 97			if (parse_OID(pkey->params, pkey->paramlen, &oid) != 0)
    98				return -EBADMSG;
    99	
   100			switch (oid) {
   101			case OID_id_prime192v1:
   102				strcpy(alg_name, "ecdsa-nist-p192");
   103				return 0;
   104			case OID_id_prime256v1:
   105				strcpy(alg_name, "ecdsa-nist-p256");
   106				return 0;
   107			default:
   108				return -EINVAL;
   109			}
   110		}
   111	
   112		return -ENOPKG;
   113	}
   114	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35945 bytes --]

  reply	other threads:[~2021-02-11  8:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-01 15:19 [PATCH v7 0/4] Add support for x509 certs with NIST p256 and p192 keys Stefan Berger
2021-02-01 15:19 ` [PATCH v7 1/4] crypto: Add support for ECDSA signature verification Stefan Berger
2021-02-04  5:27   ` Herbert Xu
2021-02-04  5:43     ` Stefan Berger
2021-02-04 14:58     ` Jarkko Sakkinen
2021-02-01 15:19 ` [PATCH v7 2/4] x509: Detect sm2 keys by their parameters OID Stefan Berger
2021-02-01 15:19 ` [PATCH v7 3/4] x509: Add support for parsing x509 certs with ECDSA keys Stefan Berger
2021-02-11  8:03   ` kernel test robot [this message]
2021-02-11 17:30     ` Stefan Berger
2021-02-11 18:18       ` Stefan Berger
2021-02-01 15:19 ` [PATCH v7 4/4] ima: Support EC keys for signature verification Stefan Berger
2021-02-05 12:24   ` Mimi Zohar
2021-02-01 16:13 ` [PATCH v7 0/4] Add support for x509 certs with NIST p256 and p192 keys David Howells
2021-02-01 16:28   ` Stefan Berger
2021-02-01 16:36   ` David Howells
2021-02-01 16:45     ` Stefan Berger
2021-02-02  3:59       ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202102111531.JYJl0c7G-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=kbuild-all@lists.01.org \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patrick@puiterwijk.org \
    --cc=stefanb@linux.ibm.com \
    --cc=zohar@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).