Unverified Commit 2e9440ac authored by Wedson Almeida Filho's avatar Wedson Almeida Filho Committed by Christian Brauner
Browse files

orangefs: move orangefs_xattr_handlers to .rodata



This makes it harder for accidental or malicious changes to
orangefs_xattr_handlers at runtime.

Cc: Mike Marshall <hubcap@omnibond.com>
Cc: Martin Brandenburg <martin@omnibond.com>
Cc: devel@lists.orangefs.org
Signed-off-by: default avatarWedson Almeida Filho <walmeida@microsoft.com>
Link: https://lore.kernel.org/r/20230930050033.41174-22-wedsonaf@gmail.com


Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent 2cba9af9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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
};