diff options
| author | Wedson Almeida Filho <walmeida@microsoft.com> | 2023-09-30 02:00:13 -0300 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2023-10-09 16:24:18 +0200 |
| commit | ce78a1ec1c3b58992112c80ccb0831b91b7b313a (patch) | |
| tree | b38af3e95c4d0c20c367182e864f28a299238c76 /fs/ext2/xattr.c | |
| parent | erofs: move erofs_xattr_handlers and xattr_handler_map to .rodata (diff) | |
| download | linux-ce78a1ec1c3b58992112c80ccb0831b91b7b313a.tar.gz linux-ce78a1ec1c3b58992112c80ccb0831b91b7b313a.zip | |
ext2: move ext2_xattr_handlers and ext2_xattr_handler_map to .rodata
This makes it harder for accidental or malicious changes to
ext2_xattr_handlers or ext2_xattr_handler_map at runtime.
Cc: Jan Kara <jack@suse.com>
Cc: linux-ext4@vger.kernel.org
Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
Link: https://lore.kernel.org/r/20230930050033.41174-10-wedsonaf@gmail.com
Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/ext2/xattr.c')
| -rw-r--r-- | fs/ext2/xattr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c index 20f741184673..e849241ebb8f 100644 --- a/fs/ext2/xattr.c +++ b/fs/ext2/xattr.c @@ -98,7 +98,7 @@ static struct buffer_head *ext2_xattr_cache_find(struct inode *, static void ext2_xattr_rehash(struct ext2_xattr_header *, struct ext2_xattr_entry *); -static const struct xattr_handler *ext2_xattr_handler_map[] = { +static const struct xattr_handler * const ext2_xattr_handler_map[] = { [EXT2_XATTR_INDEX_USER] = &ext2_xattr_user_handler, #ifdef CONFIG_EXT2_FS_POSIX_ACL [EXT2_XATTR_INDEX_POSIX_ACL_ACCESS] = &nop_posix_acl_access, @@ -110,7 +110,7 @@ static const struct xattr_handler *ext2_xattr_handler_map[] = { #endif }; -const struct xattr_handler *ext2_xattr_handlers[] = { +const struct xattr_handler * const ext2_xattr_handlers[] = { &ext2_xattr_user_handler, &ext2_xattr_trusted_handler, #ifdef CONFIG_EXT2_FS_SECURITY |
