Linux-Fsdevel Archive on lore.kernel.org
help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Cc: "dsterba@suse.cz" <dsterba@suse.cz>,
Johannes Thumshirn <jth@kernel.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
Eric Biggers <ebiggers@google.com>,
Richard Weinberger <richard@nod.at>,
Johannes Thumshirn <jthumshirn@suse.de>
Subject: Re: [PATCH v3 2/3] btrfs: add authentication support
Date: Mon, 1 Jun 2020 16:30:57 +0200 [thread overview]
Message-ID: <20200601143056.GT18421@twin.jikos.cz> (raw)
In-Reply-To: <SN4PR0401MB3598E973D98DB9A0363BD3C29BB10@SN4PR0401MB3598.namprd04.prod.outlook.com>
On Wed, May 27, 2020 at 06:04:57PM +0000, Johannes Thumshirn wrote:
> On 27/05/2020 15:25, David Sterba wrote:
> > The key for all userspace commands needs to be specified the same way as
> > for kernel, ie. "--auth-key btrfs:foo" and use the appropriate ioctls to
> > read the key bytes.
>
> Up to now I haven't been able to add a key to the kernel's keyring which
> can be read back to user-space.
This needs permissions on the key and I think keys from some keyrings
cannot be read back even with the permissions set. There's an ioctl
equivalent of 'keyctl read' which I used to emulate the reading. Setting
the permissions is cumbersome, as it needs to manually craft the hexa
value, but otherwise would seems a better way than either specifying the
key payload on command line or storing it in a file.
I've looked at other projects using keys, eg. ecryptfs-utils, it uses
keyctl_read_alloc, so that seems to be the preferred way.
> How about passing in a key file, like it is done in UBIFS? Should be doable
> both with libsodium and libgcrypt.
Keyfile would be better, that's what dm-crypt uses, but still.
next prev parent reply other threads:[~2020-06-01 14:31 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-14 9:24 [PATCH v3 0/3] Add file-system authentication to BTRFS Johannes Thumshirn
2020-05-14 9:24 ` [PATCH v3 1/3] btrfs: rename btrfs_parse_device_options back to btrfs_parse_early_options Johannes Thumshirn
2020-05-14 9:24 ` [PATCH v3 2/3] btrfs: add authentication support Johannes Thumshirn
2020-05-27 13:24 ` David Sterba
2020-05-27 13:54 ` Johannes Thumshirn
2020-05-27 14:01 ` Johannes Thumshirn
2020-05-27 18:04 ` Johannes Thumshirn
2020-06-01 14:30 ` David Sterba [this message]
2020-06-01 14:35 ` David Sterba
2020-05-14 9:24 ` [PATCH v3 3/3] btrfs: document btrfs authentication Johannes Thumshirn
2020-05-14 12:26 ` Jonathan Corbet
2020-05-14 14:54 ` Johannes Thumshirn
2020-05-14 15:14 ` Richard Weinberger
2020-05-14 16:00 ` Jonathan Corbet
2020-05-14 16:05 ` Richard Weinberger
2020-05-24 19:55 ` David Sterba
2020-05-25 10:57 ` Johannes Thumshirn
2020-05-25 11:26 ` David Sterba
2020-05-25 11:44 ` Johannes Thumshirn
2020-05-25 13:10 ` [PATCH v3 0/3] Add file-system authentication to BTRFS David Sterba
2020-05-26 7:50 ` Johannes Thumshirn
2020-05-26 11:53 ` David Sterba
2020-05-26 12:44 ` Johannes Thumshirn
2020-06-01 14:59 ` David Sterba
2020-05-27 2:08 ` Qu Wenruo
2020-05-27 11:27 ` David Sterba
2020-05-27 11:58 ` Qu Wenruo
2020-05-27 13:11 ` David Sterba
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=20200601143056.GT18421@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=Johannes.Thumshirn@wdc.com \
--cc=ebiggers@google.com \
--cc=jth@kernel.org \
--cc=jthumshirn@suse.de \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=richard@nod.at \
--subject='Re: [PATCH v3 2/3] btrfs: add authentication support' \
/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
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).