Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp2998957imc; Wed, 13 Mar 2019 06:32:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqxXaw27pV3PtlcczEoY2Qz+N1/DhVq8MQaxaFeBZfcuetTGr5DnDfY9UaqJtfTgtIgWwyG/ X-Received: by 2002:a17:902:7682:: with SMTP id m2mr46398900pll.311.1552483972572; Wed, 13 Mar 2019 06:32:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552483972; cv=none; d=google.com; s=arc-20160816; b=KhK0gOFEGK+IyANhB9gKXxLqGCRKzhvLY7eICMFHYqs9oecHjujNuX3gT3Iv3wG7dW DyMgQMOvRalG/qTUl6RKumtxv8J2/9gHA0K2b9hzKaR/oP+i9KInerfGfVpGHrq4GmM9 IThkvhyI7lEt1DwtOCzefKA0LBvKN5blxJnpxAO2dKxRREARoLF2lyZbllXB0S+6Ioqi /7Eg9rjqWpeW7atvkoWNq6AbV4BNU0sQT+991axuR2SQivgm9ErMHvONyKTYF9Qv+ks4 T9o8z43lPkk7pi1WemVWdzH8QyONRuJglJmQZwDO5T8hKlzB37Q5sbxkWKgmi0pKwOgq 75rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=+Ed+go8XuQ9edPh/yFhFeCaWZZo8FAN0UNYeFtrc0rI=; b=Dh/gC+KbGlP6ZSRw8qDrZUPMmPje7p3MXy2enSJkMC7202n+BZfMllZQkemjyZaKL2 zQ8kJBA4KENm+DliROD6zDfOXt/foZojuDGnyHMzOsFQvo2oFDtzHs7Q+pHyl6OqghZC 5//BYpPaOuXOV1Jznfk1lgM5wJ2CWUsarEmCwkjglEpWJxCVLYxoUEBKd7jICrz+wVhF LyVd2TxutOYQHf046EPi90sCGyeE+/ES7BjaL+uSu2Iu+i8Ekd2rDGZx/Xx+LKNKHE8p lns5vHFBeFZ/7vvqQznGRPLFaHUBhFL0ezYfvnvrFiDBazuPQGIwD+vvuyADsCuSi8TP Ql8w== 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 d11si10710344pls.255.2019.03.13.06.32.36; Wed, 13 Mar 2019 06:32:52 -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 S1726684AbfCMNcH convert rfc822-to-8bit (ORCPT + 99 others); Wed, 13 Mar 2019 09:32:07 -0400 Received: from lithops.sigma-star.at ([195.201.40.130]:42590 "EHLO lithops.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725856AbfCMNcG (ORCPT ); Wed, 13 Mar 2019 09:32:06 -0400 Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 0F0E8609184E; Wed, 13 Mar 2019 14:32:04 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id tA1jAXsCSzwY; Wed, 13 Mar 2019 14:32:03 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id B3C7E609186C; Wed, 13 Mar 2019 14:32:03 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id lDlepYWN4fLJ; Wed, 13 Mar 2019 14:32:03 +0100 (CET) Received: from blindfold.localnet (unknown [82.150.214.1]) by lithops.sigma-star.at (Postfix) with ESMTPSA id 56435609184E; Wed, 13 Mar 2019 14:32:03 +0100 (CET) From: Richard Weinberger To: Miklos Szeredi Cc: linux-fsdevel@vger.kernel.org, linux-fscrypt@vger.kernel.org, overlayfs , linux-kernel@vger.kernel.org Subject: Re: overlayfs vs. fscrypt Date: Wed, 13 Mar 2019 14:32:02 +0100 Message-ID: <4066872.KGdO14EQMx@blindfold> In-Reply-To: References: <4603533.ZIfxmiEf7K@blindfold> <1854703.ve7plDhYWt@blindfold> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="iso-8859-1" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Mittwoch, 13. M?rz 2019, 14:24:47 CET schrieb Miklos Szeredi: > > The use case is that you can delete these files if the DAC/MAC permissions allow it. > > Just like on NTFS. If a user encrypts files, the admin cannot read them but can > > remove them if the user is gone or loses the key. > > There's the underlying filesystem view where admin can delete files, > etc. And there's the fscrypt layer stacked on top of the underlying > fs, which en/decrypts files *in case the user has the key*. What if > one user has a key, but the other one doesn't? Will d_revalidate > constantly switch the set of dentries between the encrypted filenames > and the decrypted ones? Sounds crazy. And the fact that NTFS does > this doesn't make it any less crazy... Well, I didn't come up with this feature. :-) If one user has the key and the other not, a classic multi-user system, then you need to make sure that the affected fscrypt instances are not visible by both. For example by using mount namespaces to make sure that user a can only see /home/foo and user b only /home/bar. Or removing the search permission on /home/foo and /home/bar. I know, I know, but that's how it is... Maybe Ted or Eric can give more details on why they chose this approach. Thanks, //richard