The patch titled Subject: ocfs2: constify struct ocfs2_stack_operations has been added to the -mm mm-nonmm-unstable branch. Its filename is ocfs2-constify-struct-ocfs2_stack_operations.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/ocfs2-constify-struct-ocfs2_stack_operations.patch This patch will later appear in the mm-nonmm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx> Subject: ocfs2: constify struct ocfs2_stack_operations Date: Fri, 14 Jun 2024 22:57:09 +0200 "struct ocfs2_stack_operations" are not modified in this driver. Constifying this structure moves some data to a read-only section, so increase overall security. In order to do it, "struct ocfs2_stack_plugin" also needs to be adjusted to this new const qualifier. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 6241 644 0 6885 1ae5 fs/ocfs2/stack_o2cb.o After: ===== text data bss dec hex filename 6337 548 0 6885 1ae5 fs/ocfs2/stack_o2cb.o Link: https://lkml.kernel.org/r/f52dab89ee0049ec6271de29183a781efbb275ab.1718398605.git.christophe.jaillet@xxxxxxxxxx Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx> Cc: Mark Fasheh <mark@xxxxxxxxxx> Cc: Joel Becker <jlbec@xxxxxxxxxxxx> Cc: Junxiao Bi <junxiao.bi@xxxxxxxxxx> Cc: Joseph Qi <jiangqi903@xxxxxxxxx> Cc: Changwei Ge <gechangwei@xxxxxxx> Cc: Gang He <ghe@xxxxxxxx> Cc: Jun Piao <piaojun@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/ocfs2/stack_o2cb.c | 2 +- fs/ocfs2/stack_user.c | 2 +- fs/ocfs2/stackglue.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) --- a/fs/ocfs2/stackglue.h~ocfs2-constify-struct-ocfs2_stack_operations +++ a/fs/ocfs2/stackglue.h @@ -223,7 +223,7 @@ struct ocfs2_stack_operations { */ struct ocfs2_stack_plugin { char *sp_name; - struct ocfs2_stack_operations *sp_ops; + const struct ocfs2_stack_operations *sp_ops; struct module *sp_owner; /* These are managed by the stackglue code. */ --- a/fs/ocfs2/stack_o2cb.c~ocfs2-constify-struct-ocfs2_stack_operations +++ a/fs/ocfs2/stack_o2cb.c @@ -404,7 +404,7 @@ static int o2cb_cluster_this_node(struct return 0; } -static struct ocfs2_stack_operations o2cb_stack_ops = { +static const struct ocfs2_stack_operations o2cb_stack_ops = { .connect = o2cb_cluster_connect, .disconnect = o2cb_cluster_disconnect, .this_node = o2cb_cluster_this_node, --- a/fs/ocfs2/stack_user.c~ocfs2-constify-struct-ocfs2_stack_operations +++ a/fs/ocfs2/stack_user.c @@ -1065,7 +1065,7 @@ static int user_cluster_this_node(struct return 0; } -static struct ocfs2_stack_operations ocfs2_user_plugin_ops = { +static const struct ocfs2_stack_operations ocfs2_user_plugin_ops = { .connect = user_cluster_connect, .disconnect = user_cluster_disconnect, .this_node = user_cluster_this_node, _ Patches currently in -mm which might be from christophe.jaillet@xxxxxxxxxx are fsi-occ-remove-usage-of-the-deprecated-ida_simple_xx-api.patch most-remove-usage-of-the-deprecated-ida_simple_xx-api.patch proc-remove-usage-of-the-deprecated-ida_simple_xx-api.patch ocfs2-constify-struct-ocfs2_lock_res_ops.patch ocfs2-constify-struct-ocfs2_stack_operations.patch