Skip to content

Commit 2901e53

Browse files
committed
ext4: move ext4_xattr_handlers to .rodata
This makes it harder for accidental or malicious changes at runtime. Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
1 parent f5e47a6 commit 2901e53

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

fs/ext4/xattr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static const struct xattr_handler * const ext4_xattr_handler_map[] = {
9898
[EXT4_XATTR_INDEX_HURD] = &ext4_xattr_hurd_handler,
9999
};
100100

101-
const struct xattr_handler *ext4_xattr_handlers[] = {
101+
const struct xattr_handler *const ext4_xattr_handlers[] = {
102102
&ext4_xattr_user_handler,
103103
&ext4_xattr_trusted_handler,
104104
#ifdef CONFIG_EXT4_FS_SECURITY

fs/ext4/xattr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ extern int ext4_expand_extra_isize_ea(struct inode *inode, int new_extra_isize,
193193
struct ext4_inode *raw_inode, handle_t *handle);
194194
extern void ext4_evict_ea_inode(struct inode *inode);
195195

196-
extern const struct xattr_handler *ext4_xattr_handlers[];
196+
extern const struct xattr_handler *const ext4_xattr_handlers[];
197197

198198
extern int ext4_xattr_ibody_find(struct inode *inode, struct ext4_xattr_info *i,
199199
struct ext4_xattr_ibody_find *is);

0 commit comments

Comments
 (0)