Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp3339126imc; Wed, 13 Mar 2019 15:26:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwURRpp0LQMEj0n4TWcZF2eGb41Up0XHWgwyxTlUQM8/w6mNriIHHvNal9LMJ3dx1Xryslx X-Received: by 2002:a17:902:9b96:: with SMTP id y22mr16166135plp.87.1552516009930; Wed, 13 Mar 2019 15:26:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552516009; cv=none; d=google.com; s=arc-20160816; b=0klETT70oA2ukOfz7vMSlYaiqI5jzeUOlITcfF62lldOfN69cyVvSYCRrEBb43VKhh /bHuk21rDtoCD8l0VROghJ3fABEHMRE8xApdc+kxofbOl0FCgNVzx4UjtBAMSFSaC/+W qVSFWEXv30x5wq60eR1uoHAk+O/ygsVgiq5D0BoSkIQCx1dtmaAtZwwCAJ6ckws5C6jV Iynk5wEuyPEXGp7YXz8AVnLRe5D3j8STcqvYxSY/mjO3LHnsWC8DFivge4BXgMP810Y4 qdNf9TmjPyMyORxFq1UrmDHw3chTGzNAa13bfHN/BX+OiJ+t4p/kw02qDkj7do9DKf7X DImA== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ac4elhFrOEQqrtPkQdq0bBm8yKoQ9pK0/dSoirtEYv4=; b=tM34+QcmuRSkxmgJIMZ8P4DR4jTlsHvHNpRkhdyy2ANfwZ/zjYVOuV4p/bU8796F7U fYNnuksSWTlgxSjGcDX5blsSql6h92Xkhg4IZ9nH+G+j8olismkupnfV7tRRv2mP6nYY S6bJCl6RIkJdY03wwYJICU+jquAoKQg38NU9LWg6rcmHL4duQa4jUCcOEpHJJ5qCasIP RkFKpp/TQn7oEwfyVR4ZxDFw4U2NZr7g21PQC+ylH8YE07itq0CbctmzU7PNQk8asMNw WUpQSL59uEvWZDKh4bWwaJjyLMCBVu5fSAiEnLBwkBIDXYNWCWq8fOzfAsVu8LKI4cYu GiMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0HsJGORJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k19si10879748pfi.31.2019.03.13.15.26.33; Wed, 13 Mar 2019 15:26:49 -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; dkim=pass header.i=@kernel.org header.s=default header.b=0HsJGORJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727151AbfCMW0O (ORCPT + 99 others); Wed, 13 Mar 2019 18:26:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:55162 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726263AbfCMW0N (ORCPT ); Wed, 13 Mar 2019 18:26:13 -0400 Received: from gmail.com (unknown [104.132.1.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9101F20811; Wed, 13 Mar 2019 22:26:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552515972; bh=mV9BsxTvOteaoJconYYYDeAORMsCSy6NbK2wxeTXpYQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=0HsJGORJd8eVptCV3Bgmi82YaibgCJ9IF7zb53Gc8Q9p2xXAJA7MQzifwvbQrOU0c lmLRGNgrHSbnSyDpC8XlVXon7LKKhNwLXhfWLTpZ5N3/Vk8QBVLoZIKO++98nGJFFS LVmd675NXbp+NCF/B6yWOAI4DOw++3KKRKVwBl94= Date: Wed, 13 Mar 2019 15:26:11 -0700 From: Eric Biggers To: Richard Weinberger Cc: Amir Goldstein , Miklos Szeredi , linux-fsdevel , linux-fscrypt@vger.kernel.org, overlayfs , linux-kernel , Paul Lawrence Subject: Re: overlayfs vs. fscrypt Message-ID: <20190313222610.GF10169@gmail.com> References: <4603533.ZIfxmiEf7K@blindfold> <4066872.KGdO14EQMx@blindfold> <15244624.W7e5yEypHC@blindfold> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <15244624.W7e5yEypHC@blindfold> 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 Wed, Mar 13, 2019 at 09:33:10PM +0100, Richard Weinberger wrote: > Am Mittwoch, 13. M?rz 2019, 15:26:54 CET schrieb Amir Goldstein: > > IMO, the best thing for UBIFS to do would be to modify fscrypt to support > > opting out of the revalidate behavior, IWO, sanitize your hack to an API. > > Given the WTF/s rate this thread has, this might me a good option. > Actually people already asked me how to disable this feature because > they saw no use of it. > Being able to delete encrypted files looks good on the feature list but in > reality it has very few users but causes confusion, IMHO. > > I propose a new fscrypt_operations flag, FS_CFLG_NO_CRYPT_FNAMES. > If this flag is set, a) fscrypt_setup_filename() will return -EPERM if > no key is found. > And b) __fscrypt_prepare_lookup() will not attach fscrypt_d_ops to the dentry. > > Eric, what do you think? > > Thanks, > //richard > What specifically is wrong with supporting the ciphertext "view" of encrypted directories, and why do you want to opt UBIFS out of it specifically but not ext4 and f2fs? (The fscrypt_operations are per-filesystem type, not per-filesystem instance, so I assume that's what you had in mind.) Note that we can't unconditionally remove it because people need it to delete files without the key. We could add a mount option to disable it, but why exactly? By the way, I suggest that people read Documentation/filesystems/fscrypt.rst for more information about what fscrypt is supposed to do, as there seems to be a lot of misconceptions. - Eric