mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:41:42 +00:00
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>
This commit is contained in:
parent
ea780283e2
commit
ffb2e06508
@ -445,7 +445,7 @@ static const struct xattr_handler kernfs_user_xattr_handler = {
|
||||
.set = kernfs_vfs_user_xattr_set,
|
||||
};
|
||||
|
||||
const struct xattr_handler *kernfs_xattr_handlers[] = {
|
||||
const struct xattr_handler * const kernfs_xattr_handlers[] = {
|
||||
&kernfs_trusted_xattr_handler,
|
||||
&kernfs_security_xattr_handler,
|
||||
&kernfs_user_xattr_handler,
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user