Unverified Commit f354ed98 authored by Wedson Almeida Filho's avatar Wedson Almeida Filho Committed by Christian Brauner
Browse files

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: default avatarWedson Almeida Filho <walmeida@microsoft.com>
Link: https://lore.kernel.org/r/20230930050033.41174-8-wedsonaf@gmail.com


Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent 10f9fbe9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 */
+1 −1
Original line number Diff line number Diff line
@@ -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
};