Skip to content

Commit

Permalink
orangefs: move orangefs_xattr_handlers to .rodata
Browse files Browse the repository at this point in the history
This makes it harder for accidental or malicious changes to
orangefs_xattr_handlers at runtime.

Cc: Mike Marshall <[email protected]>
Cc: Martin Brandenburg <[email protected]>
Cc: [email protected]
Signed-off-by: Wedson Almeida Filho <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
  • Loading branch information
wedsonaf authored and brauner committed Oct 9, 2023
1 parent 2cba9af commit 2e9440a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs/orangefs/orangefs-kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ enum orangefs_vfs_op_states {
#define ORANGEFS_CACHE_CREATE_FLAGS 0
#endif

extern const struct xattr_handler *orangefs_xattr_handlers[];
extern const struct xattr_handler * const orangefs_xattr_handlers[];

extern struct posix_acl *orangefs_get_acl(struct inode *inode, int type, bool rcu);
extern int orangefs_set_acl(struct mnt_idmap *idmap,
Expand Down
2 changes: 1 addition & 1 deletion fs/orangefs/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ static const struct xattr_handler orangefs_xattr_default_handler = {
.set = orangefs_xattr_set_default,
};

const struct xattr_handler *orangefs_xattr_handlers[] = {
const struct xattr_handler * const orangefs_xattr_handlers[] = {
&orangefs_xattr_default_handler,
NULL
};

0 comments on commit 2e9440a

Please sign in to comment.