summaryrefslogtreecommitdiff
path: root/fs/erofs/xattr.c
diff options
context:
space:
mode:
authorWedson Almeida Filho <walmeida@microsoft.com>2023-09-30 02:00:12 -0300
committerChristian Brauner <brauner@kernel.org>2023-10-09 16:24:17 +0200
commit3591f40e223c66d4a3f152390b6db56421011854 (patch)
tree03d6101180f094e8e55c9fae108ada3d48bea612 /fs/erofs/xattr.c
parentf354ed9810661334fe53196e83b08d8e8680f72f (diff)
erofs: move erofs_xattr_handlers and xattr_handler_map to .rodata
This makes it harder for accidental or malicious changes to erofs_xattr_handlers or xattr_handler_map at runtime. Cc: Gao Xiang <xiang@kernel.org> Cc: Chao Yu <chao@kernel.org> Cc: Yue Hu <huyue2@coolpad.com> Cc: Jeffle Xu <jefflexu@linux.alibaba.com> Cc: linux-erofs@lists.ozlabs.org Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com> Link: https://lore.kernel.org/r/20230930050033.41174-9-wedsonaf@gmail.com Acked-by: Gao Xiang <hsiangkao@linux.alibaba.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/erofs/xattr.c')
-rw-r--r--fs/erofs/xattr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/erofs/xattr.c b/fs/erofs/xattr.c
index 09d341675e89..b58316b49a43 100644
--- a/fs/erofs/xattr.c
+++ b/fs/erofs/xattr.c
@@ -168,7 +168,7 @@ const struct xattr_handler __maybe_unused erofs_xattr_security_handler = {
};
#endif
-const struct xattr_handler *erofs_xattr_handlers[] = {
+const struct xattr_handler * const erofs_xattr_handlers[] = {
&erofs_xattr_user_handler,
&erofs_xattr_trusted_handler,
#ifdef CONFIG_EROFS_FS_SECURITY