From: Gabriel Krisman Bertazi <krisman@collabora.com>
To: tytso@mit.edu
Cc: kernel@collabora.com, linux-ext4@vger.kernel.org,
Gabriel Krisman Bertazi <krisman@collabora.co.uk>
Subject: [PATCH v3 07/12] tune2fs: Prevent enabling encryption flag on encoding-aware fs
Date: Mon, 26 Nov 2018 17:19:44 -0500 [thread overview]
Message-ID: <20181126221949.12172-8-krisman@collabora.com> (raw)
In-Reply-To: <20181126221949.12172-1-krisman@collabora.com>
From: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
The kernel will refuse to mount filesystems with the encryption and
encoding features enabled at the same time. The encoding feature can
only be set at mount time, so we can just prevent encryption from being
set at a later time by tune2fs.
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
---
misc/tune2fs.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index a680b461cc86..4c92bee30b38 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -1459,6 +1459,12 @@ mmp_error:
}
if (FEATURE_ON(E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_ENCRYPT)) {
+ if (ext2fs_has_feature_fname_encoding(sb)) {
+ fputs(_("Cannot enable encrypt feature on filesystems "
+ "with the encoding feature enabled.\n"),
+ stderr);
+ return 1;
+ }
fs->super->s_encrypt_algos[0] =
EXT4_ENCRYPTION_MODE_AES_256_XTS;
fs->super->s_encrypt_algos[1] =
--
2.19.2
next prev parent reply other threads:[~2018-11-27 9:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-26 22:19 [PATCH e2fsprogs v3 00/12] Support encoding awareness and casefold Gabriel Krisman Bertazi
2018-11-26 22:19 ` [PATCH v3 01/12] libe2p: Helpers for configuring the encoding superblock fields Gabriel Krisman Bertazi
2018-11-30 15:42 ` Theodore Y. Ts'o
2018-11-30 20:46 ` Gabriel Krisman Bertazi
2018-11-26 22:19 ` [PATCH v3 02/12] mke2fs: Configure encoding during superblock initialization Gabriel Krisman Bertazi
2018-11-26 22:19 ` [PATCH v3 03/12] chattr/lsattr: Support casefold attribute Gabriel Krisman Bertazi
2018-11-26 22:19 ` [PATCH v3 04/12] lib/ext2fs: Implement NLS support Gabriel Krisman Bertazi
2018-11-30 15:54 ` Theodore Y. Ts'o
2018-11-26 22:19 ` [PATCH v3 05/12] lib/ext2fs: Support encoding when calculating dx hashes Gabriel Krisman Bertazi
2018-11-26 22:19 ` [PATCH v3 06/12] debugfs/htree: Support encoding when printing the file hash Gabriel Krisman Bertazi
2018-11-26 22:19 ` Gabriel Krisman Bertazi [this message]
2018-11-26 22:19 ` [PATCH v3 09/12] ext4.5: Add fname_encoding feature to ext4 man page Gabriel Krisman Bertazi
2018-11-26 22:19 ` [PATCH v3 10/12] mke2fs.8: Document fname_encoding options Gabriel Krisman Bertazi
2018-11-30 15:59 ` Theodore Y. Ts'o
2018-11-26 22:19 ` [PATCH v3 11/12] mke2fs.conf.5: Document fname_encoding configuration option Gabriel Krisman Bertazi
2018-11-26 22:19 ` [PATCH v3 12/12] chattr.1: Document the casefold attribute Gabriel Krisman Bertazi
[not found] ` <20181126221949.12172-9-krisman@collabora.com>
2018-11-30 16:12 ` [PATCH v3 08/12] ext2fs: nls: Support UTF-8 11.0 with NFKD normalization Theodore Y. Ts'o
2018-11-30 16:53 ` Theodore Y. Ts'o
2018-11-30 18:48 ` Gabriel Krisman Bertazi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181126221949.12172-8-krisman@collabora.com \
--to=krisman@collabora.com \
--cc=kernel@collabora.com \
--cc=krisman@collabora.co.uk \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).