diff options
author | Wedson Almeida Filho <walmeida@microsoft.com> | 2023-09-30 02:00:21 -0300 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-10-09 16:24:20 +0200 |
commit | ffb2e06508279ced466d60164105da3f5c1b14be (patch) | |
tree | 742b1d4c7f9e701d47e04894b0b9806d2b3f4d14 /fs/kernfs/kernfs-internal.h | |
parent | ea780283e2c04517ff2e9cdebd0257108aa7f72d (diff) |
kernfs: move kernfs_xattr_handlers to .rodata
This makes it harder for accidental or malicious changes to
kernfs_xattr_handlers at runtime.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
Link: https://lore.kernel.org/r/20230930050033.41174-18-wedsonaf@gmail.com
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/kernfs/kernfs-internal.h')
-rw-r--r-- | fs/kernfs/kernfs-internal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/kernfs/kernfs-internal.h b/fs/kernfs/kernfs-internal.h index a9b854cdfdb5..237f2764b941 100644 --- a/fs/kernfs/kernfs-internal.h +++ b/fs/kernfs/kernfs-internal.h @@ -127,7 +127,7 @@ extern struct kmem_cache *kernfs_node_cache, *kernfs_iattrs_cache; /* * inode.c */ -extern const struct xattr_handler *kernfs_xattr_handlers[]; +extern const struct xattr_handler * const kernfs_xattr_handlers[]; void kernfs_evict_inode(struct inode *inode); int kernfs_iop_permission(struct mnt_idmap *idmap, struct inode *inode, int mask); |