[integrity:next-integrity-queued 22/22] security/integrity/evm/evm_crypto.c:93: undefined reference to `hash_algo_name'

3 messages, 2 authors, 2018-06-15 · open the first message on its own page

[integrity:next-integrity-queued 22/22] security/integrity/evm/evm_crypto.c:93: undefined reference to `hash_algo_name'

From: kbuild test robot <hidden>
Date: 2018-06-14 01:07:00

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git next-integrity-queued
head:   6497009f11c75bae55a3329dedcd3eeb8e282eaf
commit: 6497009f11c75bae55a3329dedcd3eeb8e282eaf [22/22] evm: Allow non-SHA1 digital signatures
config: x86_64-randconfig-ws0-06140615 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        git checkout 6497009f11c75bae55a3329dedcd3eeb8e282eaf
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   security/integrity/evm/evm_crypto.o: In function `init_desc':
quoted
security/integrity/evm/evm_crypto.c:93: undefined reference to `hash_algo_name'
vim +93 security/integrity/evm/evm_crypto.c

    76	
    77	static struct shash_desc *init_desc(char type, uint8_t hash_algo)
    78	{
    79		long rc;
    80		const char *algo;
    81		struct crypto_shash **tfm;
    82		struct shash_desc *desc;
    83	
    84		if (type == EVM_XATTR_HMAC) {
    85			if (!(evm_initialized & EVM_INIT_HMAC)) {
    86				pr_err_once("HMAC key is not set\n");
    87				return ERR_PTR(-ENOKEY);
    88			}
    89			tfm = &hmac_tfm;
    90			algo = evm_hmac;
    91		} else {
    92			tfm = &evm_tfm[hash_algo];
  > 93			algo = hash_algo_name[hash_algo];
    94		}
    95	
    96		if (*tfm == NULL) {
    97			mutex_lock(&mutex);
    98			if (*tfm)
    99				goto out;
   100			*tfm = crypto_alloc_shash(algo, 0,
   101						  CRYPTO_ALG_ASYNC | CRYPTO_NOLOAD);
   102			if (IS_ERR(*tfm)) {
   103				rc = PTR_ERR(*tfm);
   104				pr_err("Can not allocate %s (reason: %ld)\n", algo, rc);
   105				*tfm = NULL;
   106				mutex_unlock(&mutex);
   107				return ERR_PTR(rc);
   108			}
   109			if (type == EVM_XATTR_HMAC) {
   110				rc = crypto_shash_setkey(*tfm, evmkey, evmkey_len);
   111				if (rc) {
   112					crypto_free_shash(*tfm);
   113					*tfm = NULL;
   114					mutex_unlock(&mutex);
   115					return ERR_PTR(rc);
   116				}
   117			}
   118	out:
   119			mutex_unlock(&mutex);
   120		}
   121	
   122		desc = kmalloc(sizeof(*desc) + crypto_shash_descsize(*tfm),
   123				GFP_KERNEL);
   124		if (!desc)
   125			return ERR_PTR(-ENOMEM);
   126	
   127		desc->tfm = *tfm;
   128		desc->flags = CRYPTO_TFM_REQ_MAY_SLEEP;
   129	
   130		rc = crypto_shash_init(desc);
   131		if (rc) {
   132			kfree(desc);
   133			return ERR_PTR(rc);
   134		}
   135		return desc;
   136	}
   137	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Re: [integrity:next-integrity-queued 22/22] security/integrity/evm/evm_crypto.c:93: undefined reference to `hash_algo_name'

From: Mimi Zohar <hidden>
Date: 2018-06-15 10:56:08

On Thu, 2018-06-14 at 09:07 +0800, kbuild test robot wrote:
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git next-integrity-queued
head:   6497009f11c75bae55a3329dedcd3eeb8e282eaf
commit: 6497009f11c75bae55a3329dedcd3eeb8e282eaf [22/22] evm: Allow non-SHA1 digital signatures
config: x86_64-randconfig-ws0-06140615 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        git checkout 6497009f11c75bae55a3329dedcd3eeb8e282eaf
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):
   security/integrity/evm/evm_crypto.o: In function `init_desc':
quoted
quoted
security/integrity/evm/evm_crypto.c:93: undefined reference to `hash_algo_name'
vim +93 security/integrity/evm/evm_crypto.c
Thanks! ?Removing the hash.h include should fix it. ?(commit updated.)

Mimi

--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [integrity:next-integrity-queued 22/22] security/integrity/evm/evm_crypto.c:93: undefined reference to `hash_algo_name'

From: Mimi Zohar <hidden>
Date: 2018-06-15 15:20:33

On Fri, 2018-06-15 at 06:55 -0400, Mimi Zohar wrote:
On Thu, 2018-06-14 at 09:07 +0800, kbuild test robot wrote:
quoted
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git next-integrity-queued
head:   6497009f11c75bae55a3329dedcd3eeb8e282eaf
commit: 6497009f11c75bae55a3329dedcd3eeb8e282eaf [22/22] evm: Allow non-SHA1 digital signatures
config: x86_64-randconfig-ws0-06140615 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        git checkout 6497009f11c75bae55a3329dedcd3eeb8e282eaf
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):
   security/integrity/evm/evm_crypto.o: In function `init_desc':
quoted
quoted
security/integrity/evm/evm_crypto.c:93: undefined reference to `hash_algo_name'
vim +93 security/integrity/evm/evm_crypto.c
Thanks! ?Removing the hash.h include should fix it. ?(commit updated.)
Reverting this change and selecting?CRYPTO_HASH_INFO instead.

--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help