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

ubifs: move ubifs_xattr_handlers to .rodata



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

Cc: Richard Weinberger <richard@nod.at>
Cc: linux-mtd@lists.infradead.org
Signed-off-by: default avatarWedson Almeida Filho <walmeida@microsoft.com>
Link: https://lore.kernel.org/r/20230930050033.41174-26-wedsonaf@gmail.com


Reviewed-by: default avatarZhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent c08a831c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2043,7 +2043,7 @@ ssize_t ubifs_xattr_get(struct inode *host, const char *name, void *buf,
			size_t size);

#ifdef CONFIG_UBIFS_FS_XATTR
extern const struct xattr_handler *ubifs_xattr_handlers[];
extern const struct xattr_handler * const ubifs_xattr_handlers[];
ssize_t ubifs_listxattr(struct dentry *dentry, char *buffer, size_t size);
void ubifs_evict_xattr_inode(struct ubifs_info *c, ino_t xattr_inum);
int ubifs_purge_xattrs(struct inode *host);
+1 −1
Original line number Diff line number Diff line
@@ -735,7 +735,7 @@ static const struct xattr_handler ubifs_security_xattr_handler = {
};
#endif

const struct xattr_handler *ubifs_xattr_handlers[] = {
const struct xattr_handler * const ubifs_xattr_handlers[] = {
	&ubifs_user_xattr_handler,
	&ubifs_trusted_xattr_handler,
#ifdef CONFIG_UBIFS_FS_SECURITY