From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758257AbcIVWki (ORCPT ); Thu, 22 Sep 2016 18:40:38 -0400 Received: from imap.thunk.org ([74.207.234.97]:53100 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758200AbcIVWkg (ORCPT ); Thu, 22 Sep 2016 18:40:36 -0400 Date: Thu, 22 Sep 2016 18:38:03 -0400 From: "Theodore Ts'o" To: Eric Biggers Cc: Richard Weinberger , adilger.kernel@dilger.ca, linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org, david@sigma-star.at, jaegeuk@kernel.org Subject: Re: [PATCH] ext4: Check for encryption feature before fscrypt_process_policy() Message-ID: <20160922223803.ggz2qodtqtht7oot@thunk.org> Mail-Followup-To: Theodore Ts'o , Eric Biggers , Richard Weinberger , adilger.kernel@dilger.ca, linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org, david@sigma-star.at, jaegeuk@kernel.org References: <1474527054-24207-1-git-send-email-richard@nod.at> <20160922194931.GA53380@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160922194931.GA53380@google.com> User-Agent: NeoMutt/ (1.7.0) 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 Thu, Sep 22, 2016 at 12:49:31PM -0700, Eric Biggers wrote: > > Ted had actually pointed out that the reason this hasn't already been fixed is > that some users, e.g. Android, do not set the feature flag but still expect the > filesystem encryption code to work. Maybe he can chime in with regards to when > (if ever) it would make sense to make this change. I think it's fine to fix it now in upstream. It might cause some problems for Cyanogen developers if they want to try to use an upstream kernel and also enable the ext4 encryption feature, but the fix to make_ext4fs isn't all that hard. > Also, it seems the default block size for mkfs.ext4 is determined by a heuristic > and isn't guaranteed to be 1 KiB. So the commit message probably should say > something more general like "filesystems created with a block size other than > PAGE_SIZE". In fact mke2fs only uses 1k block sizes for filessystems smaller than 512M. If you were take a census of all ext4 file systems out there, the most common block size you would see is 4k. Cheers, - Ted