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: Wedson Almeida Filho <walmeida@microsoft.com>
Link: https://lore.kernel.org/r/20230930050033.41174-22-wedsonaf@gmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Wedson Almeida Filho 2023-09-30 02:00:25 -03:00 committed by Christian Brauner
parent 2cba9af99b
commit 2e9440ac07
No known key found for this signature in database
GPG Key ID: 91C61BC06578DCA2
2 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@ enum orangefs_vfs_op_states {
#define ORANGEFS_CACHE_CREATE_FLAGS 0 #define ORANGEFS_CACHE_CREATE_FLAGS 0
#endif #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 struct posix_acl *orangefs_get_acl(struct inode *inode, int type, bool rcu);
extern int orangefs_set_acl(struct mnt_idmap *idmap, extern int orangefs_set_acl(struct mnt_idmap *idmap,

View File

@ -554,7 +554,7 @@ static const struct xattr_handler orangefs_xattr_default_handler = {
.set = orangefs_xattr_set_default, .set = orangefs_xattr_set_default,
}; };
const struct xattr_handler *orangefs_xattr_handlers[] = { const struct xattr_handler * const orangefs_xattr_handlers[] = {
&orangefs_xattr_default_handler, &orangefs_xattr_default_handler,
NULL NULL
}; };