* + ocfs2-constify-struct-ocfs2_stack_operations.patch added to mm-nonmm-unstable branch
@ 2024-06-15 2:56 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-06-15 2:56 UTC (permalink / raw)
To: mm-commits, piaojun, mark, junxiao.bi, jlbec, jiangqi903, ghe,
gechangwei, christophe.jaillet, akpm
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@wanadoo.fr>
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@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Joseph Qi <jiangqi903@gmail.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Gang He <ghe@suse.com>
Cc: Jun Piao <piaojun@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
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@wanadoo.fr 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-06-15 2:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-15 2:56 + ocfs2-constify-struct-ocfs2_stack_operations.patch added to mm-nonmm-unstable branch Andrew Morton
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.