summaryrefslogtreecommitdiffstats
path: root/fs/ubifs/xattr.c
diff options
context:
space:
mode:
authorWedson Almeida Filho <walmeida@microsoft.com>2023-09-30 07:00:29 +0200
committerChristian Brauner <brauner@kernel.org>2023-10-10 13:49:20 +0200
commitc25308c326dbc304e6f77df0f8f5989a7825203d (patch)
treef73b8e5bd866ed64cf047f130f9232e1f13918b0 /fs/ubifs/xattr.c
parentsquashfs: move squashfs_xattr_handlers to .rodata (diff)
downloadlinux-c25308c326dbc304e6f77df0f8f5989a7825203d.tar.xz
linux-c25308c326dbc304e6f77df0f8f5989a7825203d.zip
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: Wedson Almeida Filho <walmeida@microsoft.com> Link: https://lore.kernel.org/r/20230930050033.41174-26-wedsonaf@gmail.com Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/ubifs/xattr.c')
-rw-r--r--fs/ubifs/xattr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ubifs/xattr.c b/fs/ubifs/xattr.c
index 406c82eab513..0847db521984 100644
--- a/fs/ubifs/xattr.c
+++ b/fs/ubifs/xattr.c
@@ -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