From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1034290AbcIWV5E (ORCPT ); Fri, 23 Sep 2016 17:57:04 -0400 Received: from mail-pf0-f182.google.com ([209.85.192.182]:36225 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933405AbcIWV5D (ORCPT ); Fri, 23 Sep 2016 17:57:03 -0400 Date: Fri, 23 Sep 2016 14:56:54 -0700 From: Eric Biggers To: "Theodore Ts'o" , 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: <20160923215654.GB106495@google.com> References: <1474527054-24207-1-git-send-email-richard@nod.at> <20160922194931.GA53380@google.com> <20160922223803.ggz2qodtqtht7oot@thunk.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160922223803.ggz2qodtqtht7oot@thunk.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 22, 2016 at 06:38:03PM -0400, Theodore Ts'o wrote: > > 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. Would it make sense to at least provide a helpful error message in the kernel log? For example: if (!ext4_has_feature_encrypt(sb)) { ext4_msg(sb, KERN_INFO, "warning: process `%s' tried to set " "encryption policy on filesystem without " "encryption enabled. This is not supported. " "Use 'tune2fs -O encrypt' to enable the " "encryption feature flag first.", current->comm); return -EOPNOTSUPP; } Eric