From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754743AbcEEMoS (ORCPT ); Thu, 5 May 2016 08:44:18 -0400 Received: from imap.thunk.org ([74.207.234.97]:49510 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751190AbcEEMoQ (ORCPT ); Thu, 5 May 2016 08:44:16 -0400 Date: Thu, 5 May 2016 08:44:12 -0400 From: "Theodore Ts'o" To: Jaegeuk Kim Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org Subject: Re: [PATCH] ext4 crypto: migrate into vfs's crypto engine Message-ID: <20160505124412.GE10776@thunk.org> Mail-Followup-To: Theodore Ts'o , Jaegeuk Kim , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org References: <1461629736-16523-1-git-send-email-jaegeuk@kernel.org> <20160505032022.GC10776@thunk.org> <20160505042248.GB73673@jaegeuk.gateway> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160505042248.GB73673@jaegeuk.gateway> User-Agent: Mutt/1.6.0 (2016-04-01) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 04, 2016 at 09:22:48PM -0700, Jaegeuk Kim wrote: > > Got it. Let me add (*key_prefix(inode)) in fscrypt_operations so that filesystem > can give a specific prefix additionally. > Once fscrypto supports both of prefixes, does e4crypto have to set "fscrypto"? > The "ext4" should work all the time tho. Well, the question is what userspace tool should be used for the non-Android case? The other thing to consider is the cost of doing lookups in two keyrings all of the time. I'm not sure how much overhead there is, but if it's significant, it might be time to hang a keyring off the superblock, and to start migrating to a model where keys are globally available to the file system once they get their (either implicitly because they are on a user's keyring, or explicitly via a new ioctl), and when they are removed (either implicitly because a key has been invalidated, or explicitly via a new ioctl), when a key gets added or removed from the file system global keyring, we bump a sequence counter so we can invalidate negative or positve dcache entries as appropriate. This goes back to the problem where the page and dentry caches are global and the using per-user or per-session keyrings doesn't map cleanly to the page and dentry caches. - Ted