[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230930050033.41174-12-wedsonaf@gmail.com>
Date: Sat, 30 Sep 2023 02:00:15 -0300
From: Wedson Almeida Filho <wedsonaf@...il.com>
To: Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>,
linux-fsdevel@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Wedson Almeida Filho <walmeida@...rosoft.com>,
Miklos Szeredi <miklos@...redi.hu>
Subject: [PATCH 11/29] fuse: move fuse_xattr_handlers to .rodata
From: Wedson Almeida Filho <walmeida@...rosoft.com>
This makes it harder for accidental or malicious changes to
fuse_xattr_handlers at runtime.
Cc: Miklos Szeredi <miklos@...redi.hu>
Cc: linux-fsdevel@...r.kernel.org
Signed-off-by: Wedson Almeida Filho <walmeida@...rosoft.com>
---
fs/fuse/fuse_i.h | 2 +-
fs/fuse/xattr.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index 9b7fc7d3c7f1..2e8c2e06cf78 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -1268,7 +1268,7 @@ ssize_t fuse_getxattr(struct inode *inode, const char *name, void *value,
size_t size);
ssize_t fuse_listxattr(struct dentry *entry, char *list, size_t size);
int fuse_removexattr(struct inode *inode, const char *name);
-extern const struct xattr_handler *fuse_xattr_handlers[];
+extern const struct xattr_handler * const fuse_xattr_handlers[];
struct posix_acl;
struct posix_acl *fuse_get_inode_acl(struct inode *inode, int type, bool rcu);
diff --git a/fs/fuse/xattr.c b/fs/fuse/xattr.c
index 49c01559580f..5b423fdbb13f 100644
--- a/fs/fuse/xattr.c
+++ b/fs/fuse/xattr.c
@@ -209,7 +209,7 @@ static const struct xattr_handler fuse_xattr_handler = {
.set = fuse_xattr_set,
};
-const struct xattr_handler *fuse_xattr_handlers[] = {
+const struct xattr_handler * const fuse_xattr_handlers[] = {
&fuse_xattr_handler,
NULL
};
--
2.34.1
Powered by blists - more mailing lists