All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
* [Devel] [PATCH hci-8.2 0/8] ext4: port the ioctls to set and get superblock parameters
@ 2026-11-19 12:03 Denis V. Lunev
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 1/8] ms/ext4: avoid potential buffer over-read in parse_apply_sb_mount_options() Denis V. Lunev
                   ` (9 more replies)
  0 siblings, 10 replies; 27+ messages in thread
From: Denis V. Lunev @ 2026-11-19 12:03 UTC (permalink / raw)
  To: ptikhomirov, vasileios.almpanis; +Cc: devel

libploop sets the reserved blocks of a mounted ext4 after a balloon
resize with ioctl 'f' 44, the vz7-only EXT4_IOC_SET_RSV_BLOCKS. vz8
never got it, and since upstream 6.0 that number is EXT4_IOC_SETFSUUID,
so on vz9 and vz10 the call fails and the reserved blocks keep the
size of the old file system.

Port EXT4_IOC_GET_TUNE_SB_PARAM and EXT4_IOC_SET_TUNE_SB_PARAM from
upstream 6.18, with the two commits they build on and the upstream
fixes to all three. They set the reserved blocks and other tune2fs
parameters on a mounted file system. libploop will use them and fall
back to tune2fs on kernels without them.

https://virtuozzo.atlassian.net/browse/VSTOR-155988

Tested in an HCI 8.2 VM: the reserved block count follows a balloon
resize through the new ioctl, out of range counts are refused, fsck is
clean, and the ploop test suite passes.

Arnd Bergmann (1):
  ms/ext4: fix ext4_tune_sb_params padding

Fedor Pchelkin (2):
  ms/ext4: fix string copying in parse_apply_sb_mount_options()
  ms/ext4: check if mount_opts is NUL-terminated in
    ext4_ioctl_set_tune_sb()

Jiazi Liu (1):
  ms/ext4: fix incorrect function call when initializing s_resgid

Theodore Ts'o (3):
  ms/ext4: avoid potential buffer over-read in
    parse_apply_sb_mount_options()
  ms/ext4: add support for 32-bit default reserved uid and gid values
  ms/ext4: implemet new ioctls to set and get superblock parameters

guzebing (1):
  ms/ext4: only update tune mount options when requested

 fs/ext4/ext4.h            |  16 +-
 fs/ext4/ioctl.c           | 317 +++++++++++++++++++++++++++++++++++++-
 fs/ext4/super.c           |  26 ++--
 include/uapi/linux/ext4.h |  53 +++++++
 4 files changed, 388 insertions(+), 24 deletions(-)

-- 
2.55.0

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Devel] [PATCH hci-8.2 1/8] ms/ext4: avoid potential buffer over-read in parse_apply_sb_mount_options()
  2026-11-19 12:03 [Devel] [PATCH hci-8.2 0/8] ext4: port the ioctls to set and get superblock parameters Denis V. Lunev
@ 2026-11-19 12:03 ` Denis V. Lunev
  2026-11-19 12:07   ` no-reply
  2026-11-19 16:49   ` Konstantin Khorenko
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 2/8] ms/ext4: fix string copying " Denis V. Lunev
                   ` (8 subsequent siblings)
  9 siblings, 2 replies; 27+ messages in thread
From: Denis V. Lunev @ 2026-11-19 12:03 UTC (permalink / raw)
  To: ptikhomirov, vasileios.almpanis; +Cc: devel

From: Theodore Ts'o <tytso@mit.edu>

Unlike other strings in the ext4 superblock, we rely on tune2fs to
make sure s_mount_opts is NUL terminated.  Harden
parse_apply_sb_mount_options() by treating s_mount_opts as a potential
__nonstring.

Cc: stable@vger.kernel.org
Fixes: 8b67f04ab9de ("ext4: Add mount options in superblock")
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Message-ID: <20250916-tune2fs-v2-1-d594dc7486f0@mit.edu>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
(cherry picked from commit 8ecb790ea8c3fc69e77bace57f14cf0d7c177bd8)

https://virtuozzo.atlassian.net/browse/VSTOR-155988
Feature: fix ms/ext4

Signed-off-by: Denis V. Lunev <den@openvz.org>
---
 fs/ext4/super.c | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index e450ea1df71d..b10bfec7499b 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2494,7 +2494,7 @@ static int parse_apply_sb_mount_options(struct super_block *sb,
 					struct ext4_fs_context *m_ctx)
 {
 	struct ext4_sb_info *sbi = EXT4_SB(sb);
-	char *s_mount_opts = NULL;
+	char s_mount_opts[65];
 	struct ext4_fs_context *s_ctx = NULL;
 	struct fs_context *fc = NULL;
 	int ret = -ENOMEM;
@@ -2502,15 +2502,11 @@ static int parse_apply_sb_mount_options(struct super_block *sb,
 	if (!sbi->s_es->s_mount_opts[0])
 		return 0;
 
-	s_mount_opts = kstrndup(sbi->s_es->s_mount_opts,
-				sizeof(sbi->s_es->s_mount_opts),
-				GFP_KERNEL);
-	if (!s_mount_opts)
-		return ret;
+	strscpy_pad(s_mount_opts, sbi->s_es->s_mount_opts);
 
 	fc = kzalloc(sizeof(struct fs_context), GFP_KERNEL);
 	if (!fc)
-		goto out_free;
+		return -ENOMEM;
 
 	s_ctx = kzalloc(sizeof(struct ext4_fs_context), GFP_KERNEL);
 	if (!s_ctx)
@@ -2542,11 +2538,8 @@ static int parse_apply_sb_mount_options(struct super_block *sb,
 	ret = 0;
 
 out_free:
-	if (fc) {
-		ext4_fc_free(fc);
-		kfree(fc);
-	}
-	kfree(s_mount_opts);
+	ext4_fc_free(fc);
+	kfree(fc);
 	return ret;
 }
 
-- 
2.55.0

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Devel] [PATCH hci-8.2 2/8] ms/ext4: fix string copying in parse_apply_sb_mount_options()
  2026-11-19 12:03 [Devel] [PATCH hci-8.2 0/8] ext4: port the ioctls to set and get superblock parameters Denis V. Lunev
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 1/8] ms/ext4: avoid potential buffer over-read in parse_apply_sb_mount_options() Denis V. Lunev
@ 2026-11-19 12:03 ` Denis V. Lunev
  2026-11-19 12:08   ` no-reply
  2026-11-19 16:49   ` Konstantin Khorenko
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 3/8] ms/ext4: add support for 32-bit default reserved uid and gid values Denis V. Lunev
                   ` (7 subsequent siblings)
  9 siblings, 2 replies; 27+ messages in thread
From: Denis V. Lunev @ 2026-11-19 12:03 UTC (permalink / raw)
  To: ptikhomirov, vasileios.almpanis; +Cc: devel

From: Fedor Pchelkin <pchelkin@ispras.ru>

strscpy_pad() can't be used to copy a non-NUL-term string into a NUL-term
string of possibly bigger size.  Commit 0efc5990bca5 ("string.h: Introduce
memtostr() and memtostr_pad()") provides additional information in that
regard.  So if this happens, the following warning is observed:

strnlen: detected buffer overflow: 65 byte read of buffer size 64
WARNING: CPU: 0 PID: 28655 at lib/string_helpers.c:1032 __fortify_report+0x96/0xc0 lib/string_helpers.c:1032
Modules linked in:
CPU: 0 UID: 0 PID: 28655 Comm: syz-executor.3 Not tainted 6.12.54-syzkaller-00144-g5f0270f1ba00 #0
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:__fortify_report+0x96/0xc0 lib/string_helpers.c:1032
Call Trace:
 <TASK>
 __fortify_panic+0x1f/0x30 lib/string_helpers.c:1039
 strnlen include/linux/fortify-string.h:235 [inline]
 sized_strscpy include/linux/fortify-string.h:309 [inline]
 parse_apply_sb_mount_options fs/ext4/super.c:2504 [inline]
 __ext4_fill_super fs/ext4/super.c:5261 [inline]
 ext4_fill_super+0x3c35/0xad00 fs/ext4/super.c:5706
 get_tree_bdev_flags+0x387/0x620 fs/super.c:1636
 vfs_get_tree+0x93/0x380 fs/super.c:1814
 do_new_mount fs/namespace.c:3553 [inline]
 path_mount+0x6ae/0x1f70 fs/namespace.c:3880
 do_mount fs/namespace.c:3893 [inline]
 __do_sys_mount fs/namespace.c:4103 [inline]
 __se_sys_mount fs/namespace.c:4080 [inline]
 __x64_sys_mount+0x280/0x300 fs/namespace.c:4080
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x64/0x140 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x76/0x7e

Since userspace is expected to provide s_mount_opts field to be at most 63
characters long with the ending byte being NUL-term, use a 64-byte buffer
which matches the size of s_mount_opts, so that strscpy_pad() does its job
properly.  Return with error if the user still managed to provide a
non-NUL-term string here.

Found by Linux Verification Center (linuxtesting.org) with Syzkaller.

Fixes: 8ecb790ea8c3 ("ext4: avoid potential buffer over-read in parse_apply_sb_mount_options()")
Cc: stable@vger.kernel.org
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Reviewed-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Message-ID: <20251101160430.222297-1-pchelkin@ispras.ru>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
(cherry picked from commit ee5a977b4e771cc181f39d504426dbd31ed701cc)

https://virtuozzo.atlassian.net/browse/VSTOR-155988
Feature: fix ms/ext4

Signed-off-by: Denis V. Lunev <den@openvz.org>
---
 fs/ext4/super.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index b10bfec7499b..bf42593efcea 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2494,7 +2494,7 @@ static int parse_apply_sb_mount_options(struct super_block *sb,
 					struct ext4_fs_context *m_ctx)
 {
 	struct ext4_sb_info *sbi = EXT4_SB(sb);
-	char s_mount_opts[65];
+	char s_mount_opts[64];
 	struct ext4_fs_context *s_ctx = NULL;
 	struct fs_context *fc = NULL;
 	int ret = -ENOMEM;
@@ -2502,7 +2502,8 @@ static int parse_apply_sb_mount_options(struct super_block *sb,
 	if (!sbi->s_es->s_mount_opts[0])
 		return 0;
 
-	strscpy_pad(s_mount_opts, sbi->s_es->s_mount_opts);
+	if (strscpy_pad(s_mount_opts, sbi->s_es->s_mount_opts) < 0)
+		return -E2BIG;
 
 	fc = kzalloc(sizeof(struct fs_context), GFP_KERNEL);
 	if (!fc)
-- 
2.55.0

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Devel] [PATCH hci-8.2 3/8] ms/ext4: add support for 32-bit default reserved uid and gid values
  2026-11-19 12:03 [Devel] [PATCH hci-8.2 0/8] ext4: port the ioctls to set and get superblock parameters Denis V. Lunev
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 1/8] ms/ext4: avoid potential buffer over-read in parse_apply_sb_mount_options() Denis V. Lunev
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 2/8] ms/ext4: fix string copying " Denis V. Lunev
@ 2026-11-19 12:03 ` Denis V. Lunev
  2026-11-19 12:09   ` no-reply
  2026-11-19 16:49   ` Konstantin Khorenko
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 4/8] ms/ext4: fix incorrect function call when initializing s_resgid Denis V. Lunev
                   ` (6 subsequent siblings)
  9 siblings, 2 replies; 27+ messages in thread
From: Denis V. Lunev @ 2026-11-19 12:03 UTC (permalink / raw)
  To: ptikhomirov, vasileios.almpanis; +Cc: devel

From: Theodore Ts'o <tytso@mit.edu>

Support for specifying the default user id and group id that is
allowed to use the reserved block space was added way back when Linux
only supported 16-bit uid's and gid's.  (Yeah, that long ago.)  It's
not a commonly used feature, but let's add support for 32-bit user and
group id's.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Message-ID: <20250916-tune2fs-v2-2-d594dc7486f0@mit.edu>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
(cherry picked from commit 12c84dd4d308551568d85203fd6ed2685e861fda)

https://virtuozzo.atlassian.net/browse/VSTOR-155988
Feature: fix ms/ext4

Signed-off-by: Denis V. Lunev <den@openvz.org>
---
 fs/ext4/ext4.h  | 16 +++++++++++++++-
 fs/ext4/super.c |  8 ++++----
 2 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 3de0fc6e77f2..e9d1b471a8cc 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1447,7 +1447,9 @@ struct ext4_super_block {
 	__le16  s_encoding;		/* Filename charset encoding */
 	__le16  s_encoding_flags;	/* Filename charset encoding flags */
 	__le32  s_orphan_file_inum;	/* Inode for tracking orphan inodes */
-	__le32	s_reserved[94];		/* Padding to the end of the block */
+	__le16	s_def_resuid_hi;
+	__le16	s_def_resgid_hi;
+	__le32	s_reserved[93];		/* Padding to the end of the block */
 	__le32	s_checksum;		/* crc32c(superblock) */
 };
 
@@ -1821,6 +1823,18 @@ static inline int ext4_valid_inum(struct super_block *sb, unsigned long ino)
 		 ino <= le32_to_cpu(EXT4_SB(sb)->s_es->s_inodes_count));
 }
 
+static inline int ext4_get_resuid(struct ext4_super_block *es)
+{
+	return le16_to_cpu(es->s_def_resuid) |
+		le16_to_cpu(es->s_def_resuid_hi) << 16;
+}
+
+static inline int ext4_get_resgid(struct ext4_super_block *es)
+{
+	return le16_to_cpu(es->s_def_resgid) |
+		le16_to_cpu(es->s_def_resgid_hi) << 16;
+}
+
 /*
  * Returns: sbi->field[index]
  * Used to access an array element from the following sbi fields which require
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index bf42593efcea..a6581dee49ed 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2986,11 +2986,11 @@ static int _ext4_show_options(struct seq_file *seq, struct super_block *sb,
 	}
 
 	if (nodefs || !uid_eq(sbi->s_resuid, make_kuid(&init_user_ns, EXT4_DEF_RESUID)) ||
-	    le16_to_cpu(es->s_def_resuid) != EXT4_DEF_RESUID)
+	    ext4_get_resuid(es) != EXT4_DEF_RESUID)
 		SEQ_OPTS_PRINT("resuid=%u",
 				from_kuid_munged(&init_user_ns, sbi->s_resuid));
 	if (nodefs || !gid_eq(sbi->s_resgid, make_kgid(&init_user_ns, EXT4_DEF_RESGID)) ||
-	    le16_to_cpu(es->s_def_resgid) != EXT4_DEF_RESGID)
+	    ext4_get_resgid(es) != EXT4_DEF_RESGID)
 		SEQ_OPTS_PRINT("resgid=%u",
 				from_kgid_munged(&init_user_ns, sbi->s_resgid));
 	def_errors = nodefs ? -1 : le16_to_cpu(es->s_errors);
@@ -5366,8 +5366,8 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb)
 
 	ext4_set_def_opts(sb, es);
 
-	sbi->s_resuid = make_kuid(&init_user_ns, le16_to_cpu(es->s_def_resuid));
-	sbi->s_resgid = make_kgid(&init_user_ns, le16_to_cpu(es->s_def_resgid));
+	sbi->s_resuid = make_kuid(&init_user_ns, ext4_get_resuid(es));
+	sbi->s_resgid = make_kgid(&init_user_ns, ext4_get_resuid(es));
 	sbi->s_commit_interval = JBD2_DEFAULT_MAX_COMMIT_AGE * HZ;
 	sbi->s_min_batch_time = EXT4_DEF_MIN_BATCH_TIME;
 	sbi->s_max_batch_time = EXT4_DEF_MAX_BATCH_TIME;
-- 
2.55.0

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Devel] [PATCH hci-8.2 4/8] ms/ext4: fix incorrect function call when initializing s_resgid
  2026-11-19 12:03 [Devel] [PATCH hci-8.2 0/8] ext4: port the ioctls to set and get superblock parameters Denis V. Lunev
                   ` (2 preceding siblings ...)
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 3/8] ms/ext4: add support for 32-bit default reserved uid and gid values Denis V. Lunev
@ 2026-11-19 12:03 ` Denis V. Lunev
  2026-11-19 12:08   ` no-reply
  2026-11-19 16:49   ` Konstantin Khorenko
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 5/8] ms/ext4: implemet new ioctls to set and get superblock parameters Denis V. Lunev
                   ` (5 subsequent siblings)
  9 siblings, 2 replies; 27+ messages in thread
From: Denis V. Lunev @ 2026-11-19 12:03 UTC (permalink / raw)
  To: ptikhomirov, vasileios.almpanis; +Cc: devel

From: Jiazi Liu <jiazi.liu1984@gmail.com>

In __ext4_fill_super(), s_resgid is initialized by calling
ext4_get_resuid() instead of ext4_get_resgid(), resulting in the
reserved GID being set to the same value as the reserved UID rather
than the value stored in the superblock.

Fixes: 12c84dd4d308 ("ext4: add support for 32-bit default reserved uid and gid values")
Cc: stable@vger.kernel.org
Signed-off-by: Jiazi Liu <liujiazi@amazon.com>
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Link: https://patch.msgid.link/20260727104103.28916-1-liujiazi@amazon.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
(cherry picked from commit c87abbab6147dcc5aa1fd8f2a61734d58d8b99ec)

https://virtuozzo.atlassian.net/browse/VSTOR-155988
Feature: fix ms/ext4

Signed-off-by: Denis V. Lunev <den@openvz.org>
---
 fs/ext4/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index a6581dee49ed..e930db91876b 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5367,7 +5367,7 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb)
 	ext4_set_def_opts(sb, es);
 
 	sbi->s_resuid = make_kuid(&init_user_ns, ext4_get_resuid(es));
-	sbi->s_resgid = make_kgid(&init_user_ns, ext4_get_resuid(es));
+	sbi->s_resgid = make_kgid(&init_user_ns, ext4_get_resgid(es));
 	sbi->s_commit_interval = JBD2_DEFAULT_MAX_COMMIT_AGE * HZ;
 	sbi->s_min_batch_time = EXT4_DEF_MIN_BATCH_TIME;
 	sbi->s_max_batch_time = EXT4_DEF_MAX_BATCH_TIME;
-- 
2.55.0

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Devel] [PATCH hci-8.2 5/8] ms/ext4: implemet new ioctls to set and get superblock parameters
  2026-11-19 12:03 [Devel] [PATCH hci-8.2 0/8] ext4: port the ioctls to set and get superblock parameters Denis V. Lunev
                   ` (3 preceding siblings ...)
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 4/8] ms/ext4: fix incorrect function call when initializing s_resgid Denis V. Lunev
@ 2026-11-19 12:03 ` Denis V. Lunev
  2026-11-19 12:13   ` no-reply
  2026-11-19 16:49   ` Konstantin Khorenko
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 6/8] ms/ext4: check if mount_opts is NUL-terminated in ext4_ioctl_set_tune_sb() Denis V. Lunev
                   ` (4 subsequent siblings)
  9 siblings, 2 replies; 27+ messages in thread
From: Denis V. Lunev @ 2026-11-19 12:03 UTC (permalink / raw)
  To: ptikhomirov, vasileios.almpanis; +Cc: devel

From: Theodore Ts'o <tytso@mit.edu>

Implement the EXT4_IOC_GET_TUNE_SB_PARAM and
EXT4_IOC_SET_TUNE_SB_PARAM ioctls, which allow certains superblock
parameters to be set while the file system is mounted, without needing
write access to the block device.

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Message-ID: <20250916-tune2fs-v2-3-d594dc7486f0@mit.edu>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
(cherry picked from commit 04a91570ac67760301e5458d65eaf1342ecca314)

Context adjusted: the new helpers and ioctl cases sit next to the vz
only ext4_open_balloon(), ext4_mfsync() and EXT4_IOC_OPEN_BALLOON.

https://virtuozzo.atlassian.net/browse/VSTOR-155988
Feature: fix ms/ext4

Signed-off-by: Denis V. Lunev <den@openvz.org>
---
 fs/ext4/ioctl.c           | 312 +++++++++++++++++++++++++++++++++++++-
 include/uapi/linux/ext4.h |  53 +++++++
 2 files changed, 358 insertions(+), 7 deletions(-)

diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 954799144751..578a97f4c63d 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -27,14 +27,16 @@
 #include "fsmap.h"
 #include <trace/events/ext4.h>
 
-typedef void ext4_update_sb_callback(struct ext4_super_block *es,
-				       const void *arg);
+typedef void ext4_update_sb_callback(struct ext4_sb_info *sbi,
+				     struct ext4_super_block *es,
+				     const void *arg);
 
 /*
  * Superblock modification callback function for changing file system
  * label
  */
-static void ext4_sb_setlabel(struct ext4_super_block *es, const void *arg)
+static void ext4_sb_setlabel(struct ext4_sb_info *sbi,
+			     struct ext4_super_block *es, const void *arg)
 {
 	/* Sanity check, this should never happen */
 	BUILD_BUG_ON(sizeof(es->s_volume_name) < EXT4_LABEL_MAX);
@@ -46,7 +48,8 @@ static void ext4_sb_setlabel(struct ext4_super_block *es, const void *arg)
  * Superblock modification callback function for changing file system
  * UUID.
  */
-static void ext4_sb_setuuid(struct ext4_super_block *es, const void *arg)
+static void ext4_sb_setuuid(struct ext4_sb_info *sbi,
+			    struct ext4_super_block *es, const void *arg)
 {
 	memcpy(es->s_uuid, (__u8 *)arg, UUID_SIZE);
 }
@@ -71,7 +74,7 @@ int ext4_update_primary_sb(struct super_block *sb, handle_t *handle,
 		goto out_err;
 
 	lock_buffer(bh);
-	func(es, arg);
+	func(sbi, es, arg);
 	ext4_superblock_csum_set(sb);
 	unlock_buffer(bh);
 
@@ -149,7 +152,7 @@ static int ext4_update_backup_sb(struct super_block *sb,
 		unlock_buffer(bh);
 		goto out_bh;
 	}
-	func(es, arg);
+	func(EXT4_SB(sb), es, arg);
 	if (ext4_has_feature_metadata_csum(sb))
 		es->s_checksum = ext4_superblock_csum(es);
 	set_buffer_uptodate(bh);
@@ -1342,6 +1345,295 @@ static int ext4_mfsync(unsigned long arg)
 	return err;
 }
 
+
+#define TUNE_OPS_SUPPORTED (EXT4_TUNE_FL_ERRORS_BEHAVIOR |    \
+	EXT4_TUNE_FL_MNT_COUNT | EXT4_TUNE_FL_MAX_MNT_COUNT | \
+	EXT4_TUNE_FL_CHECKINTRVAL | EXT4_TUNE_FL_LAST_CHECK_TIME | \
+	EXT4_TUNE_FL_RESERVED_BLOCKS | EXT4_TUNE_FL_RESERVED_UID | \
+	EXT4_TUNE_FL_RESERVED_GID | EXT4_TUNE_FL_DEFAULT_MNT_OPTS | \
+	EXT4_TUNE_FL_DEF_HASH_ALG | EXT4_TUNE_FL_RAID_STRIDE | \
+	EXT4_TUNE_FL_RAID_STRIPE_WIDTH | EXT4_TUNE_FL_MOUNT_OPTS | \
+	EXT4_TUNE_FL_FEATURES | EXT4_TUNE_FL_EDIT_FEATURES | \
+	EXT4_TUNE_FL_FORCE_FSCK | EXT4_TUNE_FL_ENCODING | \
+	EXT4_TUNE_FL_ENCODING_FLAGS)
+
+#define EXT4_TUNE_SET_COMPAT_SUPP \
+		(EXT4_FEATURE_COMPAT_DIR_INDEX |	\
+		 EXT4_FEATURE_COMPAT_STABLE_INODES)
+#define EXT4_TUNE_SET_INCOMPAT_SUPP \
+		(EXT4_FEATURE_INCOMPAT_EXTENTS |	\
+		 EXT4_FEATURE_INCOMPAT_EA_INODE |	\
+		 EXT4_FEATURE_INCOMPAT_ENCRYPT |	\
+		 EXT4_FEATURE_INCOMPAT_CSUM_SEED |	\
+		 EXT4_FEATURE_INCOMPAT_LARGEDIR |	\
+		 EXT4_FEATURE_INCOMPAT_CASEFOLD)
+#define EXT4_TUNE_SET_RO_COMPAT_SUPP \
+		(EXT4_FEATURE_RO_COMPAT_LARGE_FILE |	\
+		 EXT4_FEATURE_RO_COMPAT_DIR_NLINK |	\
+		 EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE |	\
+		 EXT4_FEATURE_RO_COMPAT_PROJECT |	\
+		 EXT4_FEATURE_RO_COMPAT_VERITY)
+
+#define EXT4_TUNE_CLEAR_COMPAT_SUPP (0)
+#define EXT4_TUNE_CLEAR_INCOMPAT_SUPP (0)
+#define EXT4_TUNE_CLEAR_RO_COMPAT_SUPP (0)
+
+#define SB_ENC_SUPP_MASK (SB_ENC_STRICT_MODE_FL |	\
+			  SB_ENC_NO_COMPAT_FALLBACK_FL)
+
+static int ext4_ioctl_get_tune_sb(struct ext4_sb_info *sbi,
+				  struct ext4_tune_sb_params __user *params)
+{
+	struct ext4_tune_sb_params ret;
+	struct ext4_super_block *es = sbi->s_es;
+
+	memset(&ret, 0, sizeof(ret));
+	ret.set_flags = TUNE_OPS_SUPPORTED;
+	ret.errors_behavior = le16_to_cpu(es->s_errors);
+	ret.mnt_count = le16_to_cpu(es->s_mnt_count);
+	ret.max_mnt_count = le16_to_cpu(es->s_max_mnt_count);
+	ret.checkinterval = le32_to_cpu(es->s_checkinterval);
+	ret.last_check_time = le32_to_cpu(es->s_lastcheck);
+	ret.reserved_blocks = ext4_r_blocks_count(es);
+	ret.blocks_count = ext4_blocks_count(es);
+	ret.reserved_uid = ext4_get_resuid(es);
+	ret.reserved_gid = ext4_get_resgid(es);
+	ret.default_mnt_opts = le32_to_cpu(es->s_default_mount_opts);
+	ret.def_hash_alg = es->s_def_hash_version;
+	ret.raid_stride = le16_to_cpu(es->s_raid_stride);
+	ret.raid_stripe_width = le32_to_cpu(es->s_raid_stripe_width);
+	ret.encoding = le16_to_cpu(es->s_encoding);
+	ret.encoding_flags = le16_to_cpu(es->s_encoding_flags);
+	strscpy_pad(ret.mount_opts, es->s_mount_opts);
+	ret.feature_compat = le32_to_cpu(es->s_feature_compat);
+	ret.feature_incompat = le32_to_cpu(es->s_feature_incompat);
+	ret.feature_ro_compat = le32_to_cpu(es->s_feature_ro_compat);
+	ret.set_feature_compat_mask = EXT4_TUNE_SET_COMPAT_SUPP;
+	ret.set_feature_incompat_mask = EXT4_TUNE_SET_INCOMPAT_SUPP;
+	ret.set_feature_ro_compat_mask = EXT4_TUNE_SET_RO_COMPAT_SUPP;
+	ret.clear_feature_compat_mask = EXT4_TUNE_CLEAR_COMPAT_SUPP;
+	ret.clear_feature_incompat_mask = EXT4_TUNE_CLEAR_INCOMPAT_SUPP;
+	ret.clear_feature_ro_compat_mask = EXT4_TUNE_CLEAR_RO_COMPAT_SUPP;
+	if (copy_to_user(params, &ret, sizeof(ret)))
+		return -EFAULT;
+	return 0;
+}
+
+static void ext4_sb_setparams(struct ext4_sb_info *sbi,
+			      struct ext4_super_block *es, const void *arg)
+{
+	const struct ext4_tune_sb_params *params = arg;
+
+	if (params->set_flags & EXT4_TUNE_FL_ERRORS_BEHAVIOR)
+		es->s_errors = cpu_to_le16(params->errors_behavior);
+	if (params->set_flags & EXT4_TUNE_FL_MNT_COUNT)
+		es->s_mnt_count = cpu_to_le16(params->mnt_count);
+	if (params->set_flags & EXT4_TUNE_FL_MAX_MNT_COUNT)
+		es->s_max_mnt_count = cpu_to_le16(params->max_mnt_count);
+	if (params->set_flags & EXT4_TUNE_FL_CHECKINTRVAL)
+		es->s_checkinterval = cpu_to_le32(params->checkinterval);
+	if (params->set_flags & EXT4_TUNE_FL_LAST_CHECK_TIME)
+		es->s_lastcheck = cpu_to_le32(params->last_check_time);
+	if (params->set_flags & EXT4_TUNE_FL_RESERVED_BLOCKS) {
+		ext4_fsblk_t blk = params->reserved_blocks;
+
+		es->s_r_blocks_count_lo = cpu_to_le32((u32)blk);
+		es->s_r_blocks_count_hi = cpu_to_le32(blk >> 32);
+	}
+	if (params->set_flags & EXT4_TUNE_FL_RESERVED_UID) {
+		int uid = params->reserved_uid;
+
+		es->s_def_resuid = cpu_to_le16(uid & 0xFFFF);
+		es->s_def_resuid_hi = cpu_to_le16(uid >> 16);
+	}
+	if (params->set_flags & EXT4_TUNE_FL_RESERVED_GID) {
+		int gid = params->reserved_gid;
+
+		es->s_def_resgid = cpu_to_le16(gid & 0xFFFF);
+		es->s_def_resgid_hi = cpu_to_le16(gid >> 16);
+	}
+	if (params->set_flags & EXT4_TUNE_FL_DEFAULT_MNT_OPTS)
+		es->s_default_mount_opts = cpu_to_le32(params->default_mnt_opts);
+	if (params->set_flags & EXT4_TUNE_FL_DEF_HASH_ALG)
+		es->s_def_hash_version = params->def_hash_alg;
+	if (params->set_flags & EXT4_TUNE_FL_RAID_STRIDE)
+		es->s_raid_stride = cpu_to_le16(params->raid_stride);
+	if (params->set_flags & EXT4_TUNE_FL_RAID_STRIPE_WIDTH)
+		es->s_raid_stripe_width =
+			cpu_to_le32(params->raid_stripe_width);
+	if (params->set_flags & EXT4_TUNE_FL_ENCODING)
+		es->s_encoding = cpu_to_le16(params->encoding);
+	if (params->set_flags & EXT4_TUNE_FL_ENCODING_FLAGS)
+		es->s_encoding_flags = cpu_to_le16(params->encoding_flags);
+	strscpy_pad(es->s_mount_opts, params->mount_opts);
+	if (params->set_flags & EXT4_TUNE_FL_EDIT_FEATURES) {
+		es->s_feature_compat |=
+			cpu_to_le32(params->set_feature_compat_mask);
+		es->s_feature_incompat |=
+			cpu_to_le32(params->set_feature_incompat_mask);
+		es->s_feature_ro_compat |=
+			cpu_to_le32(params->set_feature_ro_compat_mask);
+		es->s_feature_compat &=
+			~cpu_to_le32(params->clear_feature_compat_mask);
+		es->s_feature_incompat &=
+			~cpu_to_le32(params->clear_feature_incompat_mask);
+		es->s_feature_ro_compat &=
+			~cpu_to_le32(params->clear_feature_ro_compat_mask);
+		if (params->set_feature_compat_mask &
+		    EXT4_FEATURE_COMPAT_DIR_INDEX)
+			es->s_def_hash_version = sbi->s_def_hash_version;
+		if (params->set_feature_incompat_mask &
+		    EXT4_FEATURE_INCOMPAT_CSUM_SEED)
+			es->s_checksum_seed = cpu_to_le32(sbi->s_csum_seed);
+	}
+	if (params->set_flags & EXT4_TUNE_FL_FORCE_FSCK)
+		es->s_state |= cpu_to_le16(EXT4_ERROR_FS);
+}
+
+static int ext4_ioctl_set_tune_sb(struct file *filp,
+				  struct ext4_tune_sb_params __user *in)
+{
+	struct ext4_tune_sb_params params;
+	struct super_block *sb = file_inode(filp)->i_sb;
+	struct ext4_sb_info *sbi = EXT4_SB(sb);
+	struct ext4_super_block *es = sbi->s_es;
+	int enabling_casefold = 0;
+	int ret;
+
+	if (!capable(CAP_SYS_ADMIN))
+		return -EPERM;
+
+	if (copy_from_user(&params, in, sizeof(params)))
+		return -EFAULT;
+
+	if ((params.set_flags & ~TUNE_OPS_SUPPORTED) != 0)
+		return -EOPNOTSUPP;
+
+	if ((params.set_flags & EXT4_TUNE_FL_ERRORS_BEHAVIOR) &&
+	    (params.errors_behavior > EXT4_ERRORS_PANIC))
+		return -EINVAL;
+
+	if ((params.set_flags & EXT4_TUNE_FL_RESERVED_BLOCKS) &&
+	    (params.reserved_blocks > ext4_blocks_count(sbi->s_es) / 2))
+		return -EINVAL;
+	if ((params.set_flags & EXT4_TUNE_FL_DEF_HASH_ALG) &&
+	    ((params.def_hash_alg > DX_HASH_LAST) ||
+	     (params.def_hash_alg == DX_HASH_SIPHASH)))
+		return -EINVAL;
+	if ((params.set_flags & EXT4_TUNE_FL_FEATURES) &&
+	    (params.set_flags & EXT4_TUNE_FL_EDIT_FEATURES))
+		return -EINVAL;
+
+	if (params.set_flags & EXT4_TUNE_FL_FEATURES) {
+		params.set_feature_compat_mask =
+			params.feature_compat &
+			~le32_to_cpu(es->s_feature_compat);
+		params.set_feature_incompat_mask =
+			params.feature_incompat &
+			~le32_to_cpu(es->s_feature_incompat);
+		params.set_feature_ro_compat_mask =
+			params.feature_ro_compat &
+			~le32_to_cpu(es->s_feature_ro_compat);
+		params.clear_feature_compat_mask =
+			~params.feature_compat &
+			le32_to_cpu(es->s_feature_compat);
+		params.clear_feature_incompat_mask =
+			~params.feature_incompat &
+			le32_to_cpu(es->s_feature_incompat);
+		params.clear_feature_ro_compat_mask =
+			~params.feature_ro_compat &
+			le32_to_cpu(es->s_feature_ro_compat);
+		params.set_flags |= EXT4_TUNE_FL_EDIT_FEATURES;
+	}
+	if (params.set_flags & EXT4_TUNE_FL_EDIT_FEATURES) {
+		if ((params.set_feature_compat_mask &
+		     ~EXT4_TUNE_SET_COMPAT_SUPP) ||
+		    (params.set_feature_incompat_mask &
+		     ~EXT4_TUNE_SET_INCOMPAT_SUPP) ||
+		    (params.set_feature_ro_compat_mask &
+		     ~EXT4_TUNE_SET_RO_COMPAT_SUPP) ||
+		    (params.clear_feature_compat_mask &
+		     ~EXT4_TUNE_CLEAR_COMPAT_SUPP) ||
+		    (params.clear_feature_incompat_mask &
+		     ~EXT4_TUNE_CLEAR_INCOMPAT_SUPP) ||
+		    (params.clear_feature_ro_compat_mask &
+		     ~EXT4_TUNE_CLEAR_RO_COMPAT_SUPP))
+			return -EOPNOTSUPP;
+
+		/*
+		 * Filter out the features that are already set from
+		 * the set_mask.
+		 */
+		params.set_feature_compat_mask &=
+			~le32_to_cpu(es->s_feature_compat);
+		params.set_feature_incompat_mask &=
+			~le32_to_cpu(es->s_feature_incompat);
+		params.set_feature_ro_compat_mask &=
+			~le32_to_cpu(es->s_feature_ro_compat);
+		if ((params.set_feature_incompat_mask &
+		     EXT4_FEATURE_INCOMPAT_CASEFOLD)) {
+			enabling_casefold = 1;
+			if (!(params.set_flags & EXT4_TUNE_FL_ENCODING)) {
+				params.encoding = EXT4_ENC_UTF8_12_1;
+				params.set_flags |= EXT4_TUNE_FL_ENCODING;
+			}
+			if (!(params.set_flags & EXT4_TUNE_FL_ENCODING_FLAGS)) {
+				params.encoding_flags = 0;
+				params.set_flags |= EXT4_TUNE_FL_ENCODING_FLAGS;
+			}
+		}
+		if ((params.set_feature_compat_mask &
+		     EXT4_FEATURE_COMPAT_DIR_INDEX)) {
+			uuid_t	uu;
+
+			memcpy(&uu, sbi->s_hash_seed, UUID_SIZE);
+			if (uuid_is_null(&uu))
+				generate_random_uuid((char *)
+						     &sbi->s_hash_seed);
+			if (params.set_flags & EXT4_TUNE_FL_DEF_HASH_ALG)
+				sbi->s_def_hash_version = params.def_hash_alg;
+			else if (sbi->s_def_hash_version == 0)
+				sbi->s_def_hash_version = DX_HASH_HALF_MD4;
+			if (!(es->s_flags &
+			      cpu_to_le32(EXT2_FLAGS_UNSIGNED_HASH)) &&
+			    !(es->s_flags &
+			      cpu_to_le32(EXT2_FLAGS_SIGNED_HASH))) {
+#ifdef __CHAR_UNSIGNED__
+				sbi->s_hash_unsigned = 3;
+#else
+				sbi->s_hash_unsigned = 0;
+#endif
+			}
+		}
+	}
+	if (params.set_flags & EXT4_TUNE_FL_ENCODING) {
+		if (!enabling_casefold)
+			return -EINVAL;
+		if (params.encoding == 0)
+			params.encoding = EXT4_ENC_UTF8_12_1;
+		else if (params.encoding != EXT4_ENC_UTF8_12_1)
+			return -EINVAL;
+	}
+	if (params.set_flags & EXT4_TUNE_FL_ENCODING_FLAGS) {
+		if (!enabling_casefold)
+			return -EINVAL;
+		if (params.encoding_flags & ~SB_ENC_SUPP_MASK)
+			return -EINVAL;
+	}
+
+	ret = mnt_want_write_file(filp);
+	if (ret)
+		return ret;
+
+	ret = ext4_update_superblocks_fn(sb, ext4_sb_setparams, &params);
+	mnt_drop_write_file(filp);
+
+	if (params.set_flags & EXT4_TUNE_FL_DEF_HASH_ALG)
+		sbi->s_def_hash_version = params.def_hash_alg;
+
+	return ret;
+}
+
 static long __ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 {
 	struct inode *inode = file_inode(filp);
@@ -1795,6 +2087,11 @@ static long __ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 		return ext4_ioctl_getuuid(EXT4_SB(sb), (void __user *)arg);
 	case EXT4_IOC_SETFSUUID:
 		return ext4_ioctl_setuuid(filp, (const void __user *)arg);
+	case EXT4_IOC_GET_TUNE_SB_PARAM:
+		return ext4_ioctl_get_tune_sb(EXT4_SB(sb),
+					      (void __user *)arg);
+	case EXT4_IOC_SET_TUNE_SB_PARAM:
+		return ext4_ioctl_set_tune_sb(filp, (void __user *)arg);
 
 	case EXT4_IOC_OPEN_BALLOON:
 		if (!capable(CAP_SYS_ADMIN))
@@ -1889,7 +2186,8 @@ long ext4_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 }
 #endif
 
-static void set_overhead(struct ext4_super_block *es, const void *arg)
+static void set_overhead(struct ext4_sb_info *sbi,
+			 struct ext4_super_block *es, const void *arg)
 {
 	es->s_overhead_clusters = cpu_to_le32(*((unsigned long *) arg));
 }
diff --git a/include/uapi/linux/ext4.h b/include/uapi/linux/ext4.h
index 0bac5afcf1af..ced126504173 100644
--- a/include/uapi/linux/ext4.h
+++ b/include/uapi/linux/ext4.h
@@ -36,6 +36,8 @@
 #define EXT4_IOC_SWAP_EXT		_IOWR('f', 43, struct ext4_swap_extent)
 #define EXT4_IOC_GETFSUUID		_IOR('f', 44, struct fsuuid)
 #define EXT4_IOC_SETFSUUID		_IOW('f', 44, struct fsuuid)
+#define EXT4_IOC_GET_TUNE_SB_PARAM	_IOR('f', 45, struct ext4_tune_sb_params)
+#define EXT4_IOC_SET_TUNE_SB_PARAM	_IOW('f', 46, struct ext4_tune_sb_params)
 
 #define EXT4_IOC_SHUTDOWN _IOR('X', 125, __u32)
 
@@ -128,6 +130,57 @@ struct ext4_new_group_input {
 	__u16 unused;
 };
 
+struct ext4_tune_sb_params {
+	__u32 set_flags;
+	__u32 checkinterval;
+	__u16 errors_behavior;
+	__u16 mnt_count;
+	__u16 max_mnt_count;
+	__u16 raid_stride;
+	__u64 last_check_time;
+	__u64 reserved_blocks;
+	__u64 blocks_count;
+	__u32 default_mnt_opts;
+	__u32 reserved_uid;
+	__u32 reserved_gid;
+	__u32 raid_stripe_width;
+	__u16 encoding;
+	__u16 encoding_flags;
+	__u8  def_hash_alg;
+	__u8  pad_1;
+	__u16 pad_2;
+	__u32 feature_compat;
+	__u32 feature_incompat;
+	__u32 feature_ro_compat;
+	__u32 set_feature_compat_mask;
+	__u32 set_feature_incompat_mask;
+	__u32 set_feature_ro_compat_mask;
+	__u32 clear_feature_compat_mask;
+	__u32 clear_feature_incompat_mask;
+	__u32 clear_feature_ro_compat_mask;
+	__u8  mount_opts[64];
+	__u8  pad[64];
+};
+
+#define EXT4_TUNE_FL_ERRORS_BEHAVIOR	0x00000001
+#define EXT4_TUNE_FL_MNT_COUNT		0x00000002
+#define EXT4_TUNE_FL_MAX_MNT_COUNT	0x00000004
+#define EXT4_TUNE_FL_CHECKINTRVAL	0x00000008
+#define EXT4_TUNE_FL_LAST_CHECK_TIME	0x00000010
+#define EXT4_TUNE_FL_RESERVED_BLOCKS	0x00000020
+#define EXT4_TUNE_FL_RESERVED_UID	0x00000040
+#define EXT4_TUNE_FL_RESERVED_GID	0x00000080
+#define EXT4_TUNE_FL_DEFAULT_MNT_OPTS	0x00000100
+#define EXT4_TUNE_FL_DEF_HASH_ALG	0x00000200
+#define EXT4_TUNE_FL_RAID_STRIDE	0x00000400
+#define EXT4_TUNE_FL_RAID_STRIPE_WIDTH	0x00000800
+#define EXT4_TUNE_FL_MOUNT_OPTS		0x00001000
+#define EXT4_TUNE_FL_FEATURES		0x00002000
+#define EXT4_TUNE_FL_EDIT_FEATURES	0x00004000
+#define EXT4_TUNE_FL_FORCE_FSCK		0x00008000
+#define EXT4_TUNE_FL_ENCODING		0x00010000
+#define EXT4_TUNE_FL_ENCODING_FLAGS	0x00020000
+
 /*
  * Returned by EXT4_IOC_GET_ES_CACHE as an additional possible flag.
  * It indicates that the entry in extent status cache is for a hole.
-- 
2.55.0

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Devel] [PATCH hci-8.2 6/8] ms/ext4: check if mount_opts is NUL-terminated in ext4_ioctl_set_tune_sb()
  2026-11-19 12:03 [Devel] [PATCH hci-8.2 0/8] ext4: port the ioctls to set and get superblock parameters Denis V. Lunev
                   ` (4 preceding siblings ...)
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 5/8] ms/ext4: implemet new ioctls to set and get superblock parameters Denis V. Lunev
@ 2026-11-19 12:03 ` Denis V. Lunev
  2026-11-19 12:10   ` no-reply
  2026-11-19 16:49   ` Konstantin Khorenko
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 7/8] ms/ext4: fix ext4_tune_sb_params padding Denis V. Lunev
                   ` (3 subsequent siblings)
  9 siblings, 2 replies; 27+ messages in thread
From: Denis V. Lunev @ 2026-11-19 12:03 UTC (permalink / raw)
  To: ptikhomirov, vasileios.almpanis; +Cc: devel

From: Fedor Pchelkin <pchelkin@ispras.ru>

params.mount_opts may come as potentially non-NUL-term string.  Userspace
is expected to pass a NUL-term string.  Add an extra check to ensure this
holds true.  Note that further code utilizes strscpy_pad() so this is just
for proper informing the user of incorrect data being provided.

Found by Linux Verification Center (linuxtesting.org).

Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Reviewed-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Message-ID: <20251101160430.222297-2-pchelkin@ispras.ru>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
(cherry picked from commit 3db63d2c2d1d1e78615dd742568c5a2d55291ad1)

https://virtuozzo.atlassian.net/browse/VSTOR-155988
Feature: fix ms/ext4

Signed-off-by: Denis V. Lunev <den@openvz.org>
---
 fs/ext4/ioctl.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 578a97f4c63d..b9d2d2e1c47c 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -1506,6 +1506,10 @@ static int ext4_ioctl_set_tune_sb(struct file *filp,
 	if (copy_from_user(&params, in, sizeof(params)))
 		return -EFAULT;
 
+	if (strnlen(params.mount_opts, sizeof(params.mount_opts)) ==
+	    sizeof(params.mount_opts))
+		return -E2BIG;
+
 	if ((params.set_flags & ~TUNE_OPS_SUPPORTED) != 0)
 		return -EOPNOTSUPP;
 
-- 
2.55.0

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Devel] [PATCH hci-8.2 7/8] ms/ext4: fix ext4_tune_sb_params padding
  2026-11-19 12:03 [Devel] [PATCH hci-8.2 0/8] ext4: port the ioctls to set and get superblock parameters Denis V. Lunev
                   ` (5 preceding siblings ...)
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 6/8] ms/ext4: check if mount_opts is NUL-terminated in ext4_ioctl_set_tune_sb() Denis V. Lunev
@ 2026-11-19 12:03 ` Denis V. Lunev
  2026-11-19 12:11   ` no-reply
  2026-11-19 16:49   ` Konstantin Khorenko
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 8/8] ms/ext4: only update tune mount options when requested Denis V. Lunev
                   ` (2 subsequent siblings)
  9 siblings, 2 replies; 27+ messages in thread
From: Denis V. Lunev @ 2026-11-19 12:03 UTC (permalink / raw)
  To: ptikhomirov, vasileios.almpanis; +Cc: devel

From: Arnd Bergmann <arnd@arndb.de>

The padding at the end of struct ext4_tune_sb_params is architecture
specific and in particular is different between x86-32 and x86-64,
since the __u64 member only enforces struct alignment on the latter.

This shows up as a new warning when test-building the headers with
-Wpadded:

include/linux/ext4.h:144:1: error: padding struct size to alignment boundary with 4 bytes [-Werror=padded]

All members inside the structure are naturally aligned, so the only
difference here is the amount of padding at the end. Make the padding
explicit, to have a consistent sizeof(struct ext4_tune_sb_params) of
232 on all architectures and avoid adding compat ioctl handling for
EXT4_IOC_GET_TUNE_SB_PARAM/EXT4_IOC_SET_TUNE_SB_PARAM.

This is an ABI break on x86-32 but hopefully this can go into 6.18.y early
enough as a fixup so no actual users will be affected.  Alternatively, the
kernel could handle the ioctl commands for both sizes (232 and 228 bytes)
on all architectures.

Fixes: 04a91570ac67 ("ext4: implemet new ioctls to set and get superblock parameters")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20251204101914.1037148-1-arnd@kernel.org
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
(cherry picked from commit cd16edba1c6a24af138e1a5ded2711231fffa99f)

https://virtuozzo.atlassian.net/browse/VSTOR-155988
Feature: fix ms/ext4

Signed-off-by: Denis V. Lunev <den@openvz.org>
---
 include/uapi/linux/ext4.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/uapi/linux/ext4.h b/include/uapi/linux/ext4.h
index ced126504173..e62be1d49b78 100644
--- a/include/uapi/linux/ext4.h
+++ b/include/uapi/linux/ext4.h
@@ -159,7 +159,7 @@ struct ext4_tune_sb_params {
 	__u32 clear_feature_incompat_mask;
 	__u32 clear_feature_ro_compat_mask;
 	__u8  mount_opts[64];
-	__u8  pad[64];
+	__u8  pad[68];
 };
 
 #define EXT4_TUNE_FL_ERRORS_BEHAVIOR	0x00000001
-- 
2.55.0

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Devel] [PATCH hci-8.2 8/8] ms/ext4: only update tune mount options when requested
  2026-11-19 12:03 [Devel] [PATCH hci-8.2 0/8] ext4: port the ioctls to set and get superblock parameters Denis V. Lunev
                   ` (6 preceding siblings ...)
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 7/8] ms/ext4: fix ext4_tune_sb_params padding Denis V. Lunev
@ 2026-11-19 12:03 ` Denis V. Lunev
  2026-11-19 12:12   ` no-reply
  2026-11-19 16:49   ` Konstantin Khorenko
  2026-11-19 16:49 ` [Devel] [PATCH hci-8.2 0/8] ext4: port the ioctls to set and get superblock parameters Konstantin Khorenko
  2026-11-19 16:49 ` Konstantin Khorenko
  9 siblings, 2 replies; 27+ messages in thread
From: Denis V. Lunev @ 2026-11-19 12:03 UTC (permalink / raw)
  To: ptikhomirov, vasileios.almpanis; +Cc: devel

From: guzebing <guzebing1612@gmail.com>

EXT4_IOC_SET_TUNE_SB_PARAM uses set_flags to indicate which superblock
fields the caller wants to update. ext4_sb_setparams() checks set_flags
before updating the other supported fields, but always copied mount_opts
into the on-disk s_mount_opts field.

As a result, callers that do not set EXT4_TUNE_FL_MOUNT_OPTS can still
clear or alter the on-disk default mount options through their unused
mount_opts buffer. This can affect subsequent mounts by changing the
filesystem's stored default mount options.

Only copy mount_opts into s_mount_opts when EXT4_TUNE_FL_MOUNT_OPTS is set,
matching the set_flags semantics used by the other tuneable superblock
fields.

Cc: stable@kernel.org
Fixes: 04a91570ac67 ("ext4: implemet new ioctls to set and get superblock parameters")
Signed-off-by: guzebing <guzebing1612@gmail.com>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Link: https://patch.msgid.link/20260810151200.1405562-1-guzebing1612@gmail.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
(cherry picked from commit 981eec6c300bd4e84ffac8f3c28b762d00f13e9c)

https://virtuozzo.atlassian.net/browse/VSTOR-155988
Feature: fix ms/ext4

Signed-off-by: Denis V. Lunev <den@openvz.org>
---
 fs/ext4/ioctl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index b9d2d2e1c47c..0117d7344d17 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -1465,7 +1465,8 @@ static void ext4_sb_setparams(struct ext4_sb_info *sbi,
 		es->s_encoding = cpu_to_le16(params->encoding);
 	if (params->set_flags & EXT4_TUNE_FL_ENCODING_FLAGS)
 		es->s_encoding_flags = cpu_to_le16(params->encoding_flags);
-	strscpy_pad(es->s_mount_opts, params->mount_opts);
+	if (params->set_flags & EXT4_TUNE_FL_MOUNT_OPTS)
+		strscpy_pad(es->s_mount_opts, params->mount_opts);
 	if (params->set_flags & EXT4_TUNE_FL_EDIT_FEATURES) {
 		es->s_feature_compat |=
 			cpu_to_le32(params->set_feature_compat_mask);
-- 
2.55.0

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [Devel] [PATCH hci-8.2 1/8] ms/ext4: avoid potential buffer over-read in parse_apply_sb_mount_options()
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 1/8] ms/ext4: avoid potential buffer over-read in parse_apply_sb_mount_options() Denis V. Lunev
@ 2026-11-19 12:07   ` no-reply
  2026-11-19 16:49   ` Konstantin Khorenko
  1 sibling, 0 replies; 27+ messages in thread
From: no-reply @ 2026-11-19 12:07 UTC (permalink / raw)
  To: Denis V. Lunev, ptikhomirov, vasileios.almpanis; +Cc: devel

> From: Theodore Ts'o <tytso@mit.edu>
> 
> Unlike other strings in the ext4 superblock, we rely on tune2fs to
> make sure s_mount_opts is NUL terminated.  Harden
> parse_apply_sb_mount_options() by treating s_mount_opts as a potential
> __nonstring.
> 
> Cc: stable@vger.kernel.org
> Fixes: 8b67f04ab9de ("ext4: Add mount options in superblock")
> Reviewed-by: Jan Kara <jack@suse.cz>
> Reviewed-by: Darrick J. Wong <djwong@kernel.org>
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> Message-ID: <20250916-tune2fs-v2-1-d594dc7486f0@mit.edu>
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> (cherry picked from commit 8ecb790ea8c3fc69e77bace57f14cf0d7c177bd8)
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-155988
> Feature: fix ms/ext4
> 
> Signed-off-by: Denis V. Lunev <den@openvz.org>

Sashiko has reviewed this patch and found no issues.

Carry the trailer below into the next revision and Sashiko will not review this patch again.

Reviewed-by: Sashiko <no-reply@sashiko.virtuozzo.com>

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261119120325.792064-1-den@openvz.org?part=1


_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [Devel] [PATCH hci-8.2 2/8] ms/ext4: fix string copying in parse_apply_sb_mount_options()
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 2/8] ms/ext4: fix string copying " Denis V. Lunev
@ 2026-11-19 12:08   ` no-reply
  2026-11-19 16:49   ` Konstantin Khorenko
  1 sibling, 0 replies; 27+ messages in thread
From: no-reply @ 2026-11-19 12:08 UTC (permalink / raw)
  To: Denis V. Lunev, ptikhomirov, vasileios.almpanis; +Cc: devel

> From: Fedor Pchelkin <pchelkin@ispras.ru>
> 
> strscpy_pad() can't be used to copy a non-NUL-term string into a NUL-term
> string of possibly bigger size.  Commit 0efc5990bca5 ("string.h: Introduce
> memtostr() and memtostr_pad()") provides additional information in that
> regard.  So if this happens, the following warning is observed:
> 
> strnlen: detected buffer overflow: 65 byte read of buffer size 64
> WARNING: CPU: 0 PID: 28655 at lib/string_helpers.c:1032 __fortify_report+0x96/0xc0 lib/string_helpers.c:1032
> Modules linked in:
> CPU: 0 UID: 0 PID: 28655 Comm: syz-executor.3 Not tainted 6.12.54-syzkaller-00144-g5f0270f1ba00 #0
> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
> RIP: 0010:__fortify_report+0x96/0xc0 lib/string_helpers.c:1032
> Call Trace:
>  <TASK>
> [ ... ]
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-155988
> Feature: fix ms/ext4
> 
> Signed-off-by: Denis V. Lunev <den@openvz.org>

Sashiko has reviewed this patch and found no issues.

Carry the trailer below into the next revision and Sashiko will not review this patch again.

Reviewed-by: Sashiko <no-reply@sashiko.virtuozzo.com>

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261119120325.792064-1-den@openvz.org?part=2


_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [Devel] [PATCH hci-8.2 4/8] ms/ext4: fix incorrect function call when initializing s_resgid
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 4/8] ms/ext4: fix incorrect function call when initializing s_resgid Denis V. Lunev
@ 2026-11-19 12:08   ` no-reply
  2026-11-19 16:49   ` Konstantin Khorenko
  1 sibling, 0 replies; 27+ messages in thread
From: no-reply @ 2026-11-19 12:08 UTC (permalink / raw)
  To: Denis V. Lunev, ptikhomirov, vasileios.almpanis; +Cc: devel

> From: Jiazi Liu <jiazi.liu1984@gmail.com>
> 
> In __ext4_fill_super(), s_resgid is initialized by calling
> ext4_get_resuid() instead of ext4_get_resgid(), resulting in the
> reserved GID being set to the same value as the reserved UID rather
> than the value stored in the superblock.
> 
> Fixes: 12c84dd4d308 ("ext4: add support for 32-bit default reserved uid and gid values")
> Cc: stable@vger.kernel.org
> Signed-off-by: Jiazi Liu <liujiazi@amazon.com>
> Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
> Link: https://patch.msgid.link/20260727104103.28916-1-liujiazi@amazon.com
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> (cherry picked from commit c87abbab6147dcc5aa1fd8f2a61734d58d8b99ec)
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-155988
> Feature: fix ms/ext4
> 
> Signed-off-by: Denis V. Lunev <den@openvz.org>

Sashiko has reviewed this patch and found no issues.

Carry the trailer below into the next revision and Sashiko will not review this patch again.

Reviewed-by: Sashiko <no-reply@sashiko.virtuozzo.com>

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261119120325.792064-1-den@openvz.org?part=4


_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [Devel] [PATCH hci-8.2 3/8] ms/ext4: add support for 32-bit default reserved uid and gid values
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 3/8] ms/ext4: add support for 32-bit default reserved uid and gid values Denis V. Lunev
@ 2026-11-19 12:09   ` no-reply
  2026-11-19 16:49   ` Konstantin Khorenko
  1 sibling, 0 replies; 27+ messages in thread
From: no-reply @ 2026-11-19 12:09 UTC (permalink / raw)
  To: Denis V. Lunev, ptikhomirov, vasileios.almpanis; +Cc: devel

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] ext4: ext4_get_resuid()/ext4_get_resgid() shift u16 into int
  sign bit
--

commit da23b39c3b9f8774c5ca33e7852c644658a23aee
Author: Theodore Ts'o <tytso@mit.edu>

ms/ext4: add support for 32-bit default reserved uid and gid values

The patch adds s_def_resuid_hi and s_def_resgid_hi to the ext4 superblock,
carved out of s_reserved[]. It adds ext4_get_resuid() and ext4_get_resgid()
helpers that combine the low and high halves. It then uses the helpers in
_ext4_show_options() and __ext4_fill_super().

> diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
> index 3de0fc6e77f2..e9d1b471a8cc 100644
> --- a/fs/ext4/ext4.h
> +++ b/fs/ext4/ext4.h

[ ... ]

> +static inline int ext4_get_resuid(struct ext4_super_block *es)
> +{
> +	return le16_to_cpu(es->s_def_resuid) |
> +		le16_to_cpu(es->s_def_resuid_hi) << 16;
> +}
> +
> +static inline int ext4_get_resgid(struct ext4_super_block *es)
> +{
> +	return le16_to_cpu(es->s_def_resgid) |
> +		le16_to_cpu(es->s_def_resgid_hi) << 16;
> +}

[Severity: Low]
Can the shift overflow a signed int here? The u16 high half is promoted
to int, so a value of 0x8000 or more shifts into the sign bit. That is
undefined behaviour, and UBSAN could report it. The helpers also return
int.

In practice the bit pattern survives the conversion to uid_t/gid_t.
Would it be cleaner to return u32 and cast the high half to u32 before
shifting?

> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index bf42593efcea..a6581dee49ed 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c

[ ... ]

> -	sbi->s_resuid = make_kuid(&init_user_ns, le16_to_cpu(es->s_def_resuid));
> -	sbi->s_resgid = make_kgid(&init_user_ns, le16_to_cpu(es->s_def_resgid));
> +	sbi->s_resuid = make_kuid(&init_user_ns, ext4_get_resuid(es));
> +	sbi->s_resgid = make_kgid(&init_user_ns, ext4_get_resuid(es));

[Severity: Medium]
Should the second line call ext4_get_resgid()? As written, s_resgid is
filled from the default resuid, so the default reserved gid is wrong
whenever s_def_resuid and s_def_resgid differ. The resgid= value shown
in /proc/mounts is wrong in the same case.

Carry the trailer below into the next revision and Sashiko will not review this patch again.

Reviewed-by: Sashiko <no-reply@sashiko.virtuozzo.com>

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261119120325.792064-1-den@openvz.org?part=3

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [Devel] [PATCH hci-8.2 6/8] ms/ext4: check if mount_opts is NUL-terminated in ext4_ioctl_set_tune_sb()
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 6/8] ms/ext4: check if mount_opts is NUL-terminated in ext4_ioctl_set_tune_sb() Denis V. Lunev
@ 2026-11-19 12:10   ` no-reply
  2026-11-19 16:49   ` Konstantin Khorenko
  1 sibling, 0 replies; 27+ messages in thread
From: no-reply @ 2026-11-19 12:10 UTC (permalink / raw)
  To: Denis V. Lunev, ptikhomirov, vasileios.almpanis; +Cc: devel

> From: Fedor Pchelkin <pchelkin@ispras.ru>
> 
> params.mount_opts may come as potentially non-NUL-term string.  Userspace
> is expected to pass a NUL-term string.  Add an extra check to ensure this
> holds true.  Note that further code utilizes strscpy_pad() so this is just
> for proper informing the user of incorrect data being provided.
> 
> Found by Linux Verification Center (linuxtesting.org).
> 
> Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
> Reviewed-by: Baokun Li <libaokun1@huawei.com>
> Reviewed-by: Jan Kara <jack@suse.cz>
> Message-ID: <20251101160430.222297-2-pchelkin@ispras.ru>
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> Cc: stable@kernel.org
> (cherry picked from commit 3db63d2c2d1d1e78615dd742568c5a2d55291ad1)
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-155988
> Feature: fix ms/ext4
> 
> Signed-off-by: Denis V. Lunev <den@openvz.org>

Sashiko has reviewed this patch and found no issues.

Carry the trailer below into the next revision and Sashiko will not review this patch again.

Reviewed-by: Sashiko <no-reply@sashiko.virtuozzo.com>

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261119120325.792064-1-den@openvz.org?part=6


_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [Devel] [PATCH hci-8.2 7/8] ms/ext4: fix ext4_tune_sb_params padding
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 7/8] ms/ext4: fix ext4_tune_sb_params padding Denis V. Lunev
@ 2026-11-19 12:11   ` no-reply
  2026-11-19 16:49   ` Konstantin Khorenko
  1 sibling, 0 replies; 27+ messages in thread
From: no-reply @ 2026-11-19 12:11 UTC (permalink / raw)
  To: Denis V. Lunev, ptikhomirov, vasileios.almpanis; +Cc: devel

> From: Arnd Bergmann <arnd@arndb.de>
> 
> The padding at the end of struct ext4_tune_sb_params is architecture
> specific and in particular is different between x86-32 and x86-64,
> since the __u64 member only enforces struct alignment on the latter.
> 
> This shows up as a new warning when test-building the headers with
> -Wpadded:
> 
> include/linux/ext4.h:144:1: error: padding struct size to alignment boundary with 4 bytes [-Werror=padded]
> 
> All members inside the structure are naturally aligned, so the only
> difference here is the amount of padding at the end. Make the padding
> explicit, to have a consistent sizeof(struct ext4_tune_sb_params) of
> 232 on all architectures and avoid adding compat ioctl handling for
> [ ... ]
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-155988
> Feature: fix ms/ext4
> 
> Signed-off-by: Denis V. Lunev <den@openvz.org>

Sashiko has reviewed this patch and found no issues.

Carry the trailer below into the next revision and Sashiko will not review this patch again.

Reviewed-by: Sashiko <no-reply@sashiko.virtuozzo.com>

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261119120325.792064-1-den@openvz.org?part=7


_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [Devel] [PATCH hci-8.2 8/8] ms/ext4: only update tune mount options when requested
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 8/8] ms/ext4: only update tune mount options when requested Denis V. Lunev
@ 2026-11-19 12:12   ` no-reply
  2026-11-19 16:49   ` Konstantin Khorenko
  1 sibling, 0 replies; 27+ messages in thread
From: no-reply @ 2026-11-19 12:12 UTC (permalink / raw)
  To: Denis V. Lunev, ptikhomirov, vasileios.almpanis; +Cc: devel

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] ext4: author Signed-off-by uses handle 'guzebing', not a real
  name
--

commit 1af8678230c46e9f378d9a3987c8a017aea68140
Author: guzebing <guzebing1612@gmail.com>

> ms/ext4: only update tune mount options when requested
>
> EXT4_IOC_SET_TUNE_SB_PARAM uses set_flags to indicate which superblock
> fields the caller wants to update. ext4_sb_setparams() checks set_flags
> before updating the other supported fields, but always copied mount_opts
> into the on-disk s_mount_opts field.
>
> As a result, callers that do not set EXT4_TUNE_FL_MOUNT_OPTS can still
> clear or alter the on-disk default mount options through their unused
> mount_opts buffer. This can affect subsequent mounts by changing the
> filesystem's stored default mount options.
>
> Only copy mount_opts into s_mount_opts when EXT4_TUNE_FL_MOUNT_OPTS is set,
> matching the set_flags semantics used by the other tuneable superblock
> fields.
>
> Cc: stable@kernel.org
> Fixes: 04a91570ac67 ("ext4: implemet new ioctls to set and get superblock parameters")
> Signed-off-by: guzebing <guzebing1612@gmail.com>
> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
> Link: https://patch.msgid.link/20260810151200.1405562-1-guzebing1612@gmail.com
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> (cherry picked from commit 981eec6c300bd4e84ffac8f3c28b762d00f13e9c)
>
> https://virtuozzo.atlassian.net/browse/VSTOR-155988
> Feature: fix ms/ext4
>
> Signed-off-by: Denis V. Lunev <den@openvz.org>

[Severity: High]
Is "guzebing" the author's real name?  The Signed-off-by line uses what
looks like a handle matching the email local part, while the Developer's
Certificate of Origin expects a real identity.  Since this is a cherry-pick
of 981eec6c300b, the author should confirm their real name so the trailer
can be corrected, or the line should be carried over exactly as upstream
has it.

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261119120325.792064-1-den@openvz.org?part=8

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [Devel] [PATCH hci-8.2 5/8] ms/ext4: implemet new ioctls to set and get superblock parameters
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 5/8] ms/ext4: implemet new ioctls to set and get superblock parameters Denis V. Lunev
@ 2026-11-19 12:13   ` no-reply
  2026-11-19 16:49   ` Konstantin Khorenko
  1 sibling, 0 replies; 27+ messages in thread
From: no-reply @ 2026-11-19 12:13 UTC (permalink / raw)
  To: Denis V. Lunev, ptikhomirov, vasileios.almpanis; +Cc: devel

Thank you for your contribution! Sashiko AI review found 5 potential
issues to consider:
- [Medium] ext4: set_tune_sb generates dir_index hash seed in memory
  only, never persisted
- [Medium] ext4: tune ioctl enables casefold online without loading
  sb->s_encoding
- [Low] ext4: tune_sb ioctls missing from ext4_compat_ioctl() whitelist
- [Low] ext4: set_tune_sb does not refresh cached sbi resuid/resgid
- [Low] ext4: tune_sb ioctls read superblock fields without
  lock_buffer()
--

commit f990ab6fe39977af5cf64ce3b68662bdc273a9bd
Author: Theodore Ts'o <tytso@mit.edu>

ms/ext4: implemet new ioctls to set and get superblock parameters

This adds the EXT4_IOC_GET_TUNE_SB_PARAM and EXT4_IOC_SET_TUNE_SB_PARAM
ioctls. They let selected superblock parameters be read and changed on a
mounted file system without write access to the block device.

> diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
> index 9547991447515..578a97f4c63d8 100644
> --- a/fs/ext4/ioctl.c
> +++ b/fs/ext4/ioctl.c

[ ... ]

> +static int ext4_ioctl_get_tune_sb(struct ext4_sb_info *sbi,
> +				  struct ext4_tune_sb_params __user *params)
> +{
> +	struct ext4_tune_sb_params ret;
> +	struct ext4_super_block *es = sbi->s_es;
> +
> +	memset(&ret, 0, sizeof(ret));
> +	ret.set_flags = TUNE_OPS_SUPPORTED;
> +	ret.errors_behavior = le16_to_cpu(es->s_errors);

[Severity: Low]
Should this read es under lock_buffer(sbi->s_sbh), the way
ext4_ioctl_getuuid() does?  A concurrent SET modifies es under that lock,
so GET can return a torn snapshot.  ext4_ioctl_set_tune_sb() has the same
issue when it derives the feature set/clear masks from es->s_feature_*
without the lock.

[ ... ]

> +	if (params->set_flags & EXT4_TUNE_FL_RESERVED_UID) {
> +		int uid = params->reserved_uid;
> +
> +		es->s_def_resuid = cpu_to_le16(uid & 0xFFFF);
> +		es->s_def_resuid_hi = cpu_to_le16(uid >> 16);
> +	}

[Severity: Low]
Does this take effect on the running file system?  Only the on-disk
superblock is updated.  The allocator uses sbi->s_resuid and
sbi->s_resgid, which are loaded at mount time and not refreshed here.  The
ioctl returns success, but the reserved-block uid/gid (and the gid
equivalent below) stay unchanged until remount.

[ ... ]

> +		if ((params.set_feature_incompat_mask &
> +		     EXT4_FEATURE_INCOMPAT_CASEFOLD)) {
> +			enabling_casefold = 1;
> +			if (!(params.set_flags & EXT4_TUNE_FL_ENCODING)) {
> +				params.encoding = EXT4_ENC_UTF8_12_1;

[Severity: Medium]
Does enabling casefold online leave sb->s_encoding NULL?  Only the on-disk
s_encoding and s_encoding_flags are written.  sb->s_encoding is set only
at mount time in ext4_encoding_init(), and that does not run again.

After this ioctl, an unprivileged owner of an empty directory can run
chattr +F, because ext4_ioctl_setflags() checks the live
ext4_has_feature_casefold(sb).  The next lookup or create in that
directory reaches ext4_fname_setup_ci_filename() and calls
utf8_casefold(dir->i_sb->s_encoding, ...) with a NULL map.  That is a NULL
pointer dereference in utf8byte()/utf8lookup().  Should the ioctl load the
encoding (utf8_load()) or reject enabling casefold on a mounted file
system?

> +		if ((params.set_feature_compat_mask &
> +		     EXT4_FEATURE_COMPAT_DIR_INDEX)) {
> +			uuid_t	uu;
> +
> +			memcpy(&uu, sbi->s_hash_seed, UUID_SIZE);
> +			if (uuid_is_null(&uu))
> +				generate_random_uuid((char *)
> +						     &sbi->s_hash_seed);

[Severity: Medium]
Is the generated hash seed ever persisted?  It goes only into
sbi->s_hash_seed.  ext4_sb_setparams() copies s_def_hash_version (and the
checksum seed) but never writes es->s_hash_seed, and it does not set
EXT2_FLAGS_SIGNED_HASH or EXT2_FLAGS_UNSIGNED_HASH in es->s_flags either.

Htree directories created in this mount are hashed with the in-memory
seed.  After remount the all-zero seed is reloaded from disk, so lookups
in those directories can fail.

These sbi fields are also changed before mnt_want_write_file() and before
the superblock update, with no lock and no rollback if the update fails.

[ ... ]

> +	ret = ext4_update_superblocks_fn(sb, ext4_sb_setparams, &params);
> +	mnt_drop_write_file(filp);
> +
> +	if (params.set_flags & EXT4_TUNE_FL_DEF_HASH_ALG)
> +		sbi->s_def_hash_version = params.def_hash_alg;

[Severity: Medium]
Should this assignment be conditional on ret being 0?  As written, the
in-core hash version is changed even when ext4_update_superblocks_fn()
failed, so memory and disk disagree.

[ ... ]

> @@ -1795,6 +2087,11 @@ static long __ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
>  		return ext4_ioctl_getuuid(EXT4_SB(sb), (void __user *)arg);
>  	case EXT4_IOC_SETFSUUID:
>  		return ext4_ioctl_setuuid(filp, (const void __user *)arg);
> +	case EXT4_IOC_GET_TUNE_SB_PARAM:
> +		return ext4_ioctl_get_tune_sb(EXT4_SB(sb),
> +					      (void __user *)arg);
> +	case EXT4_IOC_SET_TUNE_SB_PARAM:
> +		return ext4_ioctl_set_tune_sb(filp, (void __user *)arg);

[Severity: Low]
Should the two new commands also be added to the whitelist in
ext4_compat_ioctl(), next to EXT4_IOC_GETFSUUID and EXT4_IOC_SETFSUUID?
Without that, a 32-bit caller (for example a 32-bit tune2fs) on a 64-bit
kernel gets -ENOTTY from both ioctls, so the new interface is unusable for
it.

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261119120325.792064-1-den@openvz.org?part=5

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [Devel] [PATCH hci-8.2 0/8] ext4: port the ioctls to set and get superblock parameters
  2026-11-19 12:03 [Devel] [PATCH hci-8.2 0/8] ext4: port the ioctls to set and get superblock parameters Denis V. Lunev
                   ` (7 preceding siblings ...)
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 8/8] ms/ext4: only update tune mount options when requested Denis V. Lunev
@ 2026-11-19 16:49 ` Konstantin Khorenko
  2026-11-19 16:49 ` Konstantin Khorenko
  9 siblings, 0 replies; 27+ messages in thread
From: Konstantin Khorenko @ 2026-11-19 16:49 UTC (permalink / raw)
  To: Denis V. Lunev; +Cc: devel

Applying the series as is.

Separate patches, not needed for this series. I created a task for it:

1. 5/8, as in mainline: SET_TUNE_SB_PARAM accepts casefold even
   without CONFIG_UNICODE, which vz10 does not set. The call returns 0,
   and every later mount of that file system fails in
   ext4_feature_set_ok(). With CONFIG_UNICODE it enables casefold
   without loading the encoding (Sashiko's NULL dereference). Host root
   only, but it should be refused upstream first.
   https://virtuozzo.atlassian.net/browse/VSTOR-156073

On Thu, 19 Nov 2026 13:03:17 +0100, Denis V. Lunev wrote:
> Port EXT4_IOC_GET_TUNE_SB_PARAM and EXT4_IOC_SET_TUNE_SB_PARAM from
> upstream 6.18, with the two commits they build on and the upstream
> fixes to all three. They set the reserved blocks and other tune2fs
> parameters on a mounted file system. libploop will use them and fall
> back to tune2fs on kernels without them.

For the libploop side of VSTOR-155988:
- issue 'f' 44 on vz7 only: on vz9 and vz10 it is EXT4_IOC_SETFSUUID
  and fails with EINVAL or EOPNOTSUPP, not ENOTTY, so the tune2fs
  fallback never runs;
- zero struct ext4_tune_sb_params (or fill it from GET) before SET:
  6/8 checks that mount_opts is NUL-terminated even when the mount
  options flag is not set;
- on the grow path with a balloon, tune_fs() runs before resize_fs(),
  so the kernel scales the new reserve with the resize, and a count
  above half of the old size is refused.

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [Devel] [PATCH hci-8.2 1/8] ms/ext4: avoid potential buffer over-read in parse_apply_sb_mount_options()
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 1/8] ms/ext4: avoid potential buffer over-read in parse_apply_sb_mount_options() Denis V. Lunev
  2026-11-19 12:07   ` no-reply
@ 2026-11-19 16:49   ` Konstantin Khorenko
  1 sibling, 0 replies; 27+ messages in thread
From: Konstantin Khorenko @ 2026-11-19 16:49 UTC (permalink / raw)
  To: Denis V. Lunev; +Cc: devel

Applying as is.

On Thu, 19 Nov 2026 13:03:18 +0100, Denis V. Lunev wrote:
> Unlike other strings in the ext4 superblock, we rely on tune2fs to

Thanks.

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [Devel] [PATCH hci-8.2 2/8] ms/ext4: fix string copying in parse_apply_sb_mount_options()
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 2/8] ms/ext4: fix string copying " Denis V. Lunev
  2026-11-19 12:08   ` no-reply
@ 2026-11-19 16:49   ` Konstantin Khorenko
  1 sibling, 0 replies; 27+ messages in thread
From: Konstantin Khorenko @ 2026-11-19 16:49 UTC (permalink / raw)
  To: Denis V. Lunev; +Cc: devel

Applying as is.

On Thu, 19 Nov 2026 13:03:19 +0100, Denis V. Lunev wrote:
> strscpy_pad() can't be used to copy a non-NUL-term string into a NUL-term

Thanks.

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [Devel] [PATCH hci-8.2 3/8] ms/ext4: add support for 32-bit default reserved uid and gid values
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 3/8] ms/ext4: add support for 32-bit default reserved uid and gid values Denis V. Lunev
  2026-11-19 12:09   ` no-reply
@ 2026-11-19 16:49   ` Konstantin Khorenko
  1 sibling, 0 replies; 27+ messages in thread
From: Konstantin Khorenko @ 2026-11-19 16:49 UTC (permalink / raw)
  To: Denis V. Lunev; +Cc: devel

Applying as is.

On Thu, 19 Nov 2026 13:03:20 +0100, Denis V. Lunev wrote:
> Support for specifying the default user id and group id that is

Thanks.

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [Devel] [PATCH hci-8.2 5/8] ms/ext4: implemet new ioctls to set and get superblock parameters
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 5/8] ms/ext4: implemet new ioctls to set and get superblock parameters Denis V. Lunev
  2026-11-19 12:13   ` no-reply
@ 2026-11-19 16:49   ` Konstantin Khorenko
  1 sibling, 0 replies; 27+ messages in thread
From: Konstantin Khorenko @ 2026-11-19 16:49 UTC (permalink / raw)
  To: Denis V. Lunev; +Cc: devel

Applying as is.

On Thu, 19 Nov 2026 13:03:22 +0100, Denis V. Lunev wrote:
> Implement the EXT4_IOC_GET_TUNE_SB_PARAM and

Sashiko's casefold and hash seed remarks are real and in mainline too;
they are item 1 of the separate patches in the cover letter reply.

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [Devel] [PATCH hci-8.2 4/8] ms/ext4: fix incorrect function call when initializing s_resgid
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 4/8] ms/ext4: fix incorrect function call when initializing s_resgid Denis V. Lunev
  2026-11-19 12:08   ` no-reply
@ 2026-11-19 16:49   ` Konstantin Khorenko
  1 sibling, 0 replies; 27+ messages in thread
From: Konstantin Khorenko @ 2026-11-19 16:49 UTC (permalink / raw)
  To: Denis V. Lunev; +Cc: devel

Applying as is.

On Thu, 19 Nov 2026 13:03:21 +0100, Denis V. Lunev wrote:
> In __ext4_fill_super(), s_resgid is initialized by calling

Thanks.

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [Devel] [PATCH hci-8.2 6/8] ms/ext4: check if mount_opts is NUL-terminated in ext4_ioctl_set_tune_sb()
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 6/8] ms/ext4: check if mount_opts is NUL-terminated in ext4_ioctl_set_tune_sb() Denis V. Lunev
  2026-11-19 12:10   ` no-reply
@ 2026-11-19 16:49   ` Konstantin Khorenko
  1 sibling, 0 replies; 27+ messages in thread
From: Konstantin Khorenko @ 2026-11-19 16:49 UTC (permalink / raw)
  To: Denis V. Lunev; +Cc: devel

Applying as is.

On Thu, 19 Nov 2026 13:03:23 +0100, Denis V. Lunev wrote:
> params.mount_opts may come as potentially non-NUL-term string.  Userspace

Thanks.

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [Devel] [PATCH hci-8.2 8/8] ms/ext4: only update tune mount options when requested
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 8/8] ms/ext4: only update tune mount options when requested Denis V. Lunev
  2026-11-19 12:12   ` no-reply
@ 2026-11-19 16:49   ` Konstantin Khorenko
  1 sibling, 0 replies; 27+ messages in thread
From: Konstantin Khorenko @ 2026-11-19 16:49 UTC (permalink / raw)
  To: Denis V. Lunev; +Cc: devel

Applying as is.

On Thu, 19 Nov 2026 13:03:25 +0100, Denis V. Lunev wrote:
> EXT4_IOC_SET_TUNE_SB_PARAM uses set_flags to indicate which superblock

Sashiko's remark on the Signed-off-by is moot: the trailer is upstream's
as is.

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [Devel] [PATCH hci-8.2 7/8] ms/ext4: fix ext4_tune_sb_params padding
  2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 7/8] ms/ext4: fix ext4_tune_sb_params padding Denis V. Lunev
  2026-11-19 12:11   ` no-reply
@ 2026-11-19 16:49   ` Konstantin Khorenko
  1 sibling, 0 replies; 27+ messages in thread
From: Konstantin Khorenko @ 2026-11-19 16:49 UTC (permalink / raw)
  To: Denis V. Lunev; +Cc: devel

Applying as is.

On Thu, 19 Nov 2026 13:03:24 +0100, Denis V. Lunev wrote:
> The padding at the end of struct ext4_tune_sb_params is architecture

Thanks.

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [Devel] [PATCH hci-8.2 0/8] ext4: port the ioctls to set and get superblock parameters
  2026-11-19 12:03 [Devel] [PATCH hci-8.2 0/8] ext4: port the ioctls to set and get superblock parameters Denis V. Lunev
                   ` (8 preceding siblings ...)
  2026-11-19 16:49 ` [Devel] [PATCH hci-8.2 0/8] ext4: port the ioctls to set and get superblock parameters Konstantin Khorenko
@ 2026-11-19 16:49 ` Konstantin Khorenko
  9 siblings, 0 replies; 27+ messages in thread
From: Konstantin Khorenko @ 2026-11-19 16:49 UTC (permalink / raw)
  To: ptikhomirov, vasileios.almpanis, Denis V. Lunev; +Cc: devel

On Thu, 19 Nov 2026 13:03:17 +0100, Denis V. Lunev wrote:
> ext4: port the ioctls to set and get superblock parameters
> 
> libploop sets the reserved blocks of a mounted ext4 after a balloon
> resize with ioctl 'f' 44, the vz7-only EXT4_IOC_SET_RSV_BLOCKS. vz8
> never got it, and since upstream 6.0 that number is EXT4_IOC_SETFSUUID,
> so on vz9 and vz10 the call fails and the reserved blocks keep the
> size of the old file system.
> 
> [...]

Applied to branch-rh10-6.12.0-211.75.1.26.x.vz10-ovz, will be released in rh10-6.12.0-211.75.1.26.4.vz10, thanks!

[1/8] ms/ext4: avoid potential buffer over-read in parse_apply_sb_mount_options()
      https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/2c70b8d9794b
[2/8] ms/ext4: fix string copying in parse_apply_sb_mount_options()
      https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/2dfe0eb35ef7
[3/8] ms/ext4: add support for 32-bit default reserved uid and gid values
      https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/7de5ba40d67a
[4/8] ms/ext4: fix incorrect function call when initializing s_resgid
      https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/30b572ffa630
[5/8] ms/ext4: implemet new ioctls to set and get superblock parameters
      https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/0a70bd986471
[6/8] ms/ext4: check if mount_opts is NUL-terminated in ext4_ioctl_set_tune_sb()
      https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/d5b7dd7928e2
[7/8] ms/ext4: fix ext4_tune_sb_params padding
      https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/092987c3be6e
[8/8] ms/ext4: only update tune mount options when requested
      https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/0ae4a1d151bd

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team


_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2026-11-19 16:51 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-19 12:03 [Devel] [PATCH hci-8.2 0/8] ext4: port the ioctls to set and get superblock parameters Denis V. Lunev
2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 1/8] ms/ext4: avoid potential buffer over-read in parse_apply_sb_mount_options() Denis V. Lunev
2026-11-19 12:07   ` no-reply
2026-11-19 16:49   ` Konstantin Khorenko
2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 2/8] ms/ext4: fix string copying " Denis V. Lunev
2026-11-19 12:08   ` no-reply
2026-11-19 16:49   ` Konstantin Khorenko
2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 3/8] ms/ext4: add support for 32-bit default reserved uid and gid values Denis V. Lunev
2026-11-19 12:09   ` no-reply
2026-11-19 16:49   ` Konstantin Khorenko
2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 4/8] ms/ext4: fix incorrect function call when initializing s_resgid Denis V. Lunev
2026-11-19 12:08   ` no-reply
2026-11-19 16:49   ` Konstantin Khorenko
2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 5/8] ms/ext4: implemet new ioctls to set and get superblock parameters Denis V. Lunev
2026-11-19 12:13   ` no-reply
2026-11-19 16:49   ` Konstantin Khorenko
2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 6/8] ms/ext4: check if mount_opts is NUL-terminated in ext4_ioctl_set_tune_sb() Denis V. Lunev
2026-11-19 12:10   ` no-reply
2026-11-19 16:49   ` Konstantin Khorenko
2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 7/8] ms/ext4: fix ext4_tune_sb_params padding Denis V. Lunev
2026-11-19 12:11   ` no-reply
2026-11-19 16:49   ` Konstantin Khorenko
2026-11-19 12:03 ` [Devel] [PATCH hci-8.2 8/8] ms/ext4: only update tune mount options when requested Denis V. Lunev
2026-11-19 12:12   ` no-reply
2026-11-19 16:49   ` Konstantin Khorenko
2026-11-19 16:49 ` [Devel] [PATCH hci-8.2 0/8] ext4: port the ioctls to set and get superblock parameters Konstantin Khorenko
2026-11-19 16:49 ` Konstantin Khorenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.