lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <14aed575-cd6a-ff64-d040-323c2847df93@infradead.org>
Date:   Wed, 29 Jul 2020 09:05:25 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Stephen Rothwell <sfr@...b.auug.org.au>,
        Linux Next Mailing List <linux-next@...r.kernel.org>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Crypto Mailing List <linux-crypto@...r.kernel.org>,
        Tero Kristo <t-kristo@...com>, Keerthy <j-keerthy@...com>
Subject: Re: linux-next: Tree for Jul 29 (drivers/crypto/sa2ul.c)

On 7/29/20 5:22 AM, Stephen Rothwell wrote:
> Hi all,
> 
> Changes since 20200728:
> 

on i386:

ld: drivers/crypto/sa2ul.o: in function `sa_sha_digest':
sa2ul.c:(.text+0x1faf): undefined reference to `sha512_zero_message_hash'


sa2ul.c uses sha512_zero_message_hash, sha1_zero_message_hash,
and sha256_zero_message_hash, but it does not 'select' any of the
Kconfig symbols that cause those hashes to be present.

Should it select the needed Kconfig symbols or should it use
#ifdef blocks as needed?

like so:


static int zero_message_process(struct ahash_request *req)
{
	struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
	int sa_digest_size = crypto_ahash_digestsize(tfm);

	switch (sa_digest_size) {
#ifdef CONFIG_CRYPTO_SHA1
	case SHA1_DIGEST_SIZE:
		memcpy(req->result, sha1_zero_message_hash, sa_digest_size);
		break;
#endif
#ifdef CONFIG_CRYPTO_SHA256
	case SHA256_DIGEST_SIZE:
		memcpy(req->result, sha256_zero_message_hash, sa_digest_size);
		break;
#endif
#ifdef CONFIG_CRYPTO_SHA512
	case SHA512_DIGEST_SIZE:
		memcpy(req->result, sha512_zero_message_hash, sa_digest_size);
		break;
#endif
	default:
		return -EINVAL;
	}

	return 0;
}



-- 
~Randy
Reported-by: Randy Dunlap <rdunlap@...radead.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ