summaryrefslogtreecommitdiff
path: root/fs/9p/xattr.h
diff options
context:
space:
mode:
authorWedson Almeida Filho <walmeida@microsoft.com>2023-09-30 08:00:07 +0300
committerChristian Brauner <brauner@kernel.org>2023-10-09 17:24:16 +0300
commitb6079dc9cb5182518b8f14fa350d5c501cba80d3 (patch)
tree1940e4856e04e971cd60b7d8128ac24e99ab1e78 /fs/9p/xattr.h
parente60ac12833400296433c450d346f539d662ab4b0 (diff)
downloadlinux-b6079dc9cb5182518b8f14fa350d5c501cba80d3.tar.xz
9p: move xattr-related structs to .rodata
This makes it harder for accidental or malicious changes to v9fs_xattr_user_handler, v9fs_xattr_trusted_handler, v9fs_xattr_security_handler, or v9fs_xattr_handlers at runtime. Cc: Eric Van Hensbergen <ericvh@kernel.org> Cc: Latchesar Ionkov <lucho@ionkov.net> Cc: Dominique Martinet <asmadeus@codewreck.org> Cc: Christian Schoenebeck <linux_oss@crudebyte.com> Cc: v9fs@lists.linux.dev Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com> Link: https://lore.kernel.org/r/20230930050033.41174-4-wedsonaf@gmail.com Acked-by: Dominique Martinet <asmadeus@codewreck.org> Reviewed-by: Christian Schoenebeck <linux_oss@crudebyte.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/9p/xattr.h')
-rw-r--r--fs/9p/xattr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/9p/xattr.h b/fs/9p/xattr.h
index b5636e544c8a..3ad5a802352a 100644
--- a/fs/9p/xattr.h
+++ b/fs/9p/xattr.h
@@ -10,7 +10,7 @@
#include <net/9p/9p.h>
#include <net/9p/client.h>
-extern const struct xattr_handler *v9fs_xattr_handlers[];
+extern const struct xattr_handler * const v9fs_xattr_handlers[];
ssize_t v9fs_fid_xattr_get(struct p9_fid *fid, const char *name,
void *buffer, size_t buffer_size);