Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp4253825imc; Thu, 14 Mar 2019 16:44:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjplQxOgeWy+HHSUOPhWJIpKCExRmaQzAuCVLXhW2+JLV7QFbGiJALIGDauEB5bmn5e/Mn X-Received: by 2002:aa7:8249:: with SMTP id e9mr901512pfn.6.1552607061998; Thu, 14 Mar 2019 16:44:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552607061; cv=none; d=google.com; s=arc-20160816; b=UPx9P10VYXfjUwHlve+5xlEmH7N2Sn4CwiamWe9kgMThgSER2jYzHNIS7wY6hCuENH wCAYmIVnwP1QeYECAAUEcGZ+v9M2ao2CZWG73r2z0Cc0qQZwNM/Vo3YLqgT4JLkNHSlA YlpNQoHK4i1ArrowjL9WrhvCez6e4JrObz3HondEV2yO6u0vaQ0bk/AlZuiRXCS3hdnX 7GND4QQ8HeIOGTpdZnyK7QizB+m9xQmgmC/prfIQcx810FtgytXeBP7V1NvDZqYFS9Gs oKP/N5/qaewvfl44roTQwlTn2W2tUH7itRFlH0Fd8yuCuXuMbQgkGfBlwxPWMnnaNXlg P0OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date; bh=dDun/AmxDFgGXpZ8y+6+gnfmFL1AJ2NGpCQ5l/5el/c=; b=TGNKFwuv23k+lCch3gsYMEpKV8IL/oal9d4rLXLNg6KWFAdFt5/GZUDBy5Kf5IaPJi fBu1ULA42is4AWxyi+6YvuGhTowP9QtTmOCzY8Yozr8xnNKC8Wln1p09eaAUDmtHQkht 6d9C/PrCTThJ2SnH/7CU/7RssVYMJXpafbdHQbATEEMAfTMjShxv4IfUkZEDYMfPVs7M n0+r85TPSi6zKy8wWyK0T+nyxDDmUSR0jiRJ35y9CMqdSGJtt0QngDh4UfRQk42dUzWx 4ixvLUYHF2gac2dhvdROpErG74lpwCm471rSssqyJOswLNt8jnH4FddAu2nL6uSXbluj B7Ng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n5si357303pff.191.2019.03.14.16.43.52; Thu, 14 Mar 2019 16:44:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728022AbfCNXmq (ORCPT + 99 others); Thu, 14 Mar 2019 19:42:46 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:50539 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726843AbfCNXmp (ORCPT ); Thu, 14 Mar 2019 19:42:45 -0400 Received: from callcc.thunk.org (guestnat-104-133-0-99.corp.google.com [104.133.0.99] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x2ENgU4n031164 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Mar 2019 19:42:31 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id B8B06420AA8; Thu, 14 Mar 2019 19:42:30 -0400 (EDT) Date: Thu, 14 Mar 2019 19:42:30 -0400 From: "Theodore Ts'o" To: James Bottomley Cc: Richard Weinberger , linux-mtd@lists.infradead.org, linux-fscrypt@vger.kernel.org, jaegeuk@kernel.org, linux-unionfs@vger.kernel.org, miklos@szeredi.hu, amir73il@gmail.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, paullawrence@google.com Subject: Re: [PATCH 4/4] ubifs: Implement new mount option, fscrypt_key_required Message-ID: <20190314234230.GG6482@mit.edu> Mail-Followup-To: Theodore Ts'o , James Bottomley , Richard Weinberger , linux-mtd@lists.infradead.org, linux-fscrypt@vger.kernel.org, jaegeuk@kernel.org, linux-unionfs@vger.kernel.org, miklos@szeredi.hu, amir73il@gmail.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, paullawrence@google.com References: <20190314171559.27584-1-richard@nod.at> <20190314171559.27584-5-richard@nod.at> <1552605311.2571.6.camel@HansenPartnership.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1552605311.2571.6.camel@HansenPartnership.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 14, 2019 at 04:15:11PM -0700, James Bottomley wrote: > On Thu, 2019-03-14 at 18:15 +0100, Richard Weinberger wrote: > > Usually fscrypt allows limited access to encrypted files even > > if no key is available. > > Encrypted filenames are shown and based on this names users > > can unlink and move files. > > Shouldn't they be able to read/write and create as well (all with the > ciphertext name and contents, of course) ... otherwise how does backup > of encrypted files by admin without the key ever work? That's not currently supported. Michael Halcrow and I worked out some designs on how to do this, and I even had some prototype patches, but it's really, really, messy, and requires a lot of complex machinations in userspace on the save *and* restore, since there's a lot of crypto metadata that has to be saved, and you have to handle backing up the directory per-file keys, and restoring them when you recreate the directory on a restore, etc. The simpler approach would have allowed backup of encrypted files without the key, but would require the user's key to do the restore, and if we ever actually tried to get this feature supported, that's the approach I'd suggest. The fundamental reason why we never went did anything with this was that the original use case of fscrypt was for Chrome OS, where the original design premise was that you don't need to do backups, since everything is in the cloud. A video from 2010: https://www.youtube.com/watch?v=lm-Vnx58UYo And with Android, backups happen automatically while you have the encryption key. There was talk about using fscrypt for Ubuntu desktops as an ecryptfs replacement, and in that case, we would have use case that would have required backups of a shared desktop where you don't have all of the encryption keys for all of the users. Maybe someday as a Google Summer of Code project or maybe if some potential corporate user of fscrypt would be willing to fund the necessary engineering work? But again, I'll repeat this because it's so important: In the vast majority of cases, including single-user laptops, desktops, etc., the real right answer is dm-crypt and *not* fscrypt. Especially since time-sharing systems are *so* 1980's. :-) So I don't use fscrypt on my upstream development laptop (except for testing purposes) because it's simply not the right tool for the job. - Ted