[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3d0a380b-ea75-6c99-0515-0988d6ecab1c@pengutronix.de>
Date: Thu, 29 Jul 2021 00:27:23 +0200
From: Ahmad Fatoum <a.fatoum@...gutronix.de>
To: Jarkko Sakkinen <jarkko@...nel.org>
Cc: "Theodore Y. Ts'o" <tytso@....edu>,
Jaegeuk Kim <jaegeuk@...nel.org>,
Eric Biggers <ebiggers@...nel.org>,
James Morris <jmorris@...ei.org>,
"Serge E. Hallyn" <serge@...lyn.com>,
James Bottomley <jejb@...ux.ibm.com>,
Mimi Zohar <zohar@...ux.ibm.com>,
Sumit Garg <sumit.garg@...aro.org>,
David Howells <dhowells@...hat.com>,
linux-fscrypt@...r.kernel.org, linux-crypto@...r.kernel.org,
linux-integrity@...r.kernel.org,
linux-security-module@...r.kernel.org, keyrings@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH v1] fscrypt: support encrypted and trusted keys
Hello Jarkko,
On 29.07.21 00:22, Jarkko Sakkinen wrote:
> On Tue, Jul 27, 2021 at 04:43:49PM +0200, Ahmad Fatoum wrote:
>> For both v1 and v2 key setup mechanisms, userspace supplies the raw key
>> material to the kernel after which it is never again disclosed to
>> userspace.
>>
>> Use of encrypted and trusted keys offers stronger guarantees:
>> The key material is generated within the kernel and is never disclosed to
>> userspace in clear text and, in the case of trusted keys, can be
>> directly rooted to a trust source like a TPM chip.
>>
>> Add support for trusted and encrypted keys by repurposing
>> fscrypt_add_key_arg::raw to hold the key description when the new
>> FSCRYPT_KEY_ARG_TYPE_DESC flag is supplied. The location of the flag
>> was previously reserved and enforced by ioctl code to be zero, so this
>> change won't break backwards compatibility.
>>
>> Corresponding userspace patches are available for fscryptctl:
>> https://github.com/google/fscryptctl/pull/23
>>
>> Signed-off-by: Ahmad Fatoum <a.fatoum@...gutronix.de>
>> ---
>> key_extract_material used by this patch is added in
>> <cover.b2fdd70b830d12853b12a12e32ceb0c8162c1346.1626945419.git-series.a.fatoum@...gutronix.de>
>> which still awaits feedback.
>>
>> Sending this RFC out anyway to get some feedback from the fscrypt
>> developers whether this is the correct way to go about it.
>>
>> To: "Theodore Y. Ts'o" <tytso@....edu>
>> To: Jaegeuk Kim <jaegeuk@...nel.org>
>> To: Eric Biggers <ebiggers@...nel.org>
>> Cc: Jarkko Sakkinen <jarkko@...nel.org>
>> Cc: James Morris <jmorris@...ei.org>
>> Cc: "Serge E. Hallyn" <serge@...lyn.com>
>> Cc: James Bottomley <jejb@...ux.ibm.com>
>> Cc: Mimi Zohar <zohar@...ux.ibm.com>
>> Cc: Sumit Garg <sumit.garg@...aro.org>
>> Cc: David Howells <dhowells@...hat.com>
>> Cc: linux-fscrypt@...r.kernel.org
>> Cc: linux-crypto@...r.kernel.org
>> Cc: linux-integrity@...r.kernel.org
>> Cc: linux-security-module@...r.kernel.org
>> Cc: keyrings@...r.kernel.org
>> Cc: linux-kernel@...r.kernel.org
>> ---
>> Documentation/filesystems/fscrypt.rst | 24 ++++++++---
>> fs/crypto/keyring.c | 59 ++++++++++++++++++++++++---
>> include/uapi/linux/fscrypt.h | 16 +++++++-
>> 3 files changed, 87 insertions(+), 12 deletions(-)
>>
>> diff --git a/Documentation/filesystems/fscrypt.rst b/Documentation/filesystems/fscrypt.rst
>> index 44b67ebd6e40..83738af2afa3 100644
>> --- a/Documentation/filesystems/fscrypt.rst
>> +++ b/Documentation/filesystems/fscrypt.rst
>> @@ -681,11 +681,15 @@ It can be executed on any file or directory on the target filesystem,
>> but using the filesystem's root directory is recommended. It takes in
>> a pointer to struct fscrypt_add_key_arg, defined as follows::
>>
>> + #define FSCRYPT_KEY_ADD_RAW_ASIS 0
>> + #define FSCRYPT_KEY_ADD_RAW_DESC 1
>
> Would be nice to have these documented.
They have explanatory comments in the uAPI header. The Documentation file
purposefully omits these comments and describes each field separately after
the code block. I am just following suit.
FWIW, I intend to drop these flags for v2 anyway.
Cheers,
Ahmad
>
> /Jarkko
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Powered by blists - more mailing lists