From: Randy Dunlap <rdunlap@infradead.org>
To: Stephen Rothwell <sfr@canb.auug.org.au>,
Linux Next Mailing List <linux-next@vger.kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
Tero Kristo <t-kristo@ti.com>, Keerthy <j-keerthy@ti.com>
Subject: Re: linux-next: Tree for Jul 29 (drivers/crypto/sa2ul.c)
Date: Wed, 29 Jul 2020 09:05:25 -0700 [thread overview]
Message-ID: <14aed575-cd6a-ff64-d040-323c2847df93@infradead.org> (raw)
In-Reply-To: <20200729222201.0d1ec18a@canb.auug.org.au>
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@infradead.org>
prev parent reply other threads:[~2020-07-29 16:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-29 12:22 linux-next: Tree for Jul 29 Stephen Rothwell
2020-07-29 16:05 ` Randy Dunlap [this message]
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=14aed575-cd6a-ff64-d040-323c2847df93@infradead.org \
--to=rdunlap@infradead.org \
--cc=j-keerthy@ti.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=t-kristo@ti.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).