Unverified Commit 10f9fbe9 authored by Wedson Almeida Filho's avatar Wedson Almeida Filho Committed by Christian Brauner
Browse files

ceph: move ceph_xattr_handlers to .rodata



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

Cc: Xiubo Li <xiubli@redhat.com>
Cc: Ilya Dryomov <idryomov@gmail.com>
Cc: Jeff Layton <jlayton@kernel.org>
Cc: ceph-devel@vger.kernel.org
Signed-off-by: default avatarWedson Almeida Filho <walmeida@microsoft.com>
Link: https://lore.kernel.org/r/20230930050033.41174-7-wedsonaf@gmail.com


Acked-by: default avatarIlya Dryomov <idryomov@gmail.com>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent 8a25b418
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1119,7 +1119,7 @@ ssize_t __ceph_getxattr(struct inode *, const char *, void *, size_t);
extern ssize_t ceph_listxattr(struct dentry *, char *, size_t);
extern struct ceph_buffer *__ceph_build_xattrs_blob(struct ceph_inode_info *ci);
extern void __ceph_destroy_xattrs(struct ceph_inode_info *ci);
extern const struct xattr_handler *ceph_xattr_handlers[];
extern const struct xattr_handler * const ceph_xattr_handlers[];

struct ceph_acl_sec_ctx {
#ifdef CONFIG_CEPH_FS_POSIX_ACL
+1 −1
Original line number Diff line number Diff line
@@ -1446,7 +1446,7 @@ void ceph_release_acl_sec_ctx(struct ceph_acl_sec_ctx *as_ctx)
 * List of handlers for synthetic system.* attributes. Other
 * attributes are handled directly.
 */
const struct xattr_handler *ceph_xattr_handlers[] = {
const struct xattr_handler * const ceph_xattr_handlers[] = {
	&ceph_other_xattr_handler,
	NULL,
};