From: Anand Jain <anand.jain@oracle.com>
To: Johannes Thumshirn <jth@kernel.org>, David Sterba <dsterba@suse.cz>
Cc: "linux-btrfs @ vger . kernel . org" <linux-btrfs@vger.kernel.org>,
Johannes Thumshirn <johannes.thumshirn@wdc.com>
Subject: Re: [PATCH v2 3/5] btrfs-progs: Add HMAC(SHA256) support
Date: Fri, 5 Jun 2020 16:10:58 +0800 [thread overview]
Message-ID: <73461894-89e4-dd29-660b-2bfa5376ed3f@oracle.com> (raw)
In-Reply-To: <20200514093433.6818-4-jth@kernel.org>
> diff --git a/crypto/hash.c b/crypto/hash.c
> index fc658475..b1cdfe67 100644
> --- a/crypto/hash.c
> +++ b/crypto/hash.c
> @@ -1,3 +1,7 @@
> +#include <gcrypt.h>
We don't need the libgcrypt library when configured with
--with-crypto=builtin
So this should come under the define CRYPTOPROVIDER_LIB...
> diff --git a/crypto/hash.h b/crypto/hash.h
> index fefccbd5..252ce9f9 100644
> --- a/crypto/hash.h
> +++ b/crypto/hash.h
> @@ -9,5 +9,7 @@ int hash_crc32c(const u8 *buf, size_t length, u8 *out);
> int hash_xxhash(const u8 *buf, size_t length, u8 *out);
> int hash_sha256(const u8 *buf, size_t length, u8 *out);
> int hash_blake2b(const u8 *buf, size_t length, u8 *out);
> +int hash_hmac_sha256(struct btrfs_fs_info *fs_info, const u8 *buf,
> + size_t length, u8 *out);
>
> #endif
> diff --git a/disk-io.c b/disk-io.c
> index 6221c3ce..5fa1f0c3 100644
> --- a/disk-io.c
> +++ b/disk-io.c
> @@ -153,6 +153,10 @@ int btrfs_csum_data(struct btrfs_fs_info *fs_info, u16 csum_type,
> return hash_sha256(data, len, out);
> case BTRFS_CSUM_TYPE_BLAKE2:
> return hash_blake2b(data, len, out);
> + case BTRFS_CSUM_TYPE_HMAC_SHA256:
> + if (!fs_info || !fs_info->auth_key)
> + return 0;
> + return hash_hmac_sha256(fs_info, data, len, out);
hash_hmac_sha256() is defined under CRYPTOPROVIDER_LIB...
So with default builtin option.
/Volumes/ws/btrfs-progs/disk-io.c:159: undefined reference to
`hash_hmac_sha256'
Thanks, Anand
next prev parent reply other threads:[~2020-06-05 8:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-14 9:34 [PATCH v2 0/5] btrfs-progs: support creating authenticated file-systems Johannes Thumshirn
2020-05-14 9:34 ` [PATCH v2 1/5] btrfs-progs: pass in fs_info to btrfs_csum_data Johannes Thumshirn
2020-05-14 9:34 ` [PATCH v2 2/5] btrfs-progs: add auth_key argument to open_ctree_fs_info Johannes Thumshirn
2020-05-14 9:34 ` [PATCH v2 3/5] btrfs-progs: Add HMAC(SHA256) support Johannes Thumshirn
2020-06-05 8:10 ` Anand Jain [this message]
2020-05-14 9:34 ` [PATCH v2 4/5] btrfs-progs: add --auth-key to dump-super Johannes Thumshirn
2020-05-14 9:34 ` [PATCH v2 5/5] btrfs-progs: add auth key to check Johannes Thumshirn
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=73461894-89e4-dd29-660b-2bfa5376ed3f@oracle.com \
--to=anand.jain@oracle.com \
--cc=dsterba@suse.cz \
--cc=johannes.thumshirn@wdc.com \
--cc=jth@kernel.org \
--cc=linux-btrfs@vger.kernel.org \
/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).