ecryptfs: move ecryptfs_xattr_handlers to .rodata
This makes it harder for accidental or malicious changes to ecryptfs_xattr_handlers at runtime. Cc: Tyler Hicks <code@tyhicks.com> Cc: ecryptfs@vger.kernel.org Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com> Link: https://lore.kernel.org/r/20230930050033.41174-8-wedsonaf@gmail.com Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
10f9fbe9f2
commit
f354ed9810
@ -702,6 +702,6 @@ int ecryptfs_set_f_namelen(long *namelen, long lower_namelen,
|
||||
int ecryptfs_derive_iv(char *iv, struct ecryptfs_crypt_stat *crypt_stat,
|
||||
loff_t offset);
|
||||
|
||||
extern const struct xattr_handler *ecryptfs_xattr_handlers[];
|
||||
extern const struct xattr_handler * const ecryptfs_xattr_handlers[];
|
||||
|
||||
#endif /* #ifndef ECRYPTFS_KERNEL_H */
|
||||
|
@ -1210,7 +1210,7 @@ static const struct xattr_handler ecryptfs_xattr_handler = {
|
||||
.set = ecryptfs_xattr_set,
|
||||
};
|
||||
|
||||
const struct xattr_handler *ecryptfs_xattr_handlers[] = {
|
||||
const struct xattr_handler * const ecryptfs_xattr_handlers[] = {
|
||||
&ecryptfs_xattr_handler,
|
||||
NULL
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user