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

xfs: move xfs_xattr_handlers to .rodata



This makes it harder for accidental or malicious changes to
xfs_xattr_handlers at runtime.

Cc: "Darrick J. Wong" <djwong@kernel.org>
Cc: linux-xfs@vger.kernel.org
Signed-off-by: default avatarWedson Almeida Filho <walmeida@microsoft.com>
Link: https://lore.kernel.org/r/20230930050033.41174-27-wedsonaf@gmail.com


Reviewed-by: default avatar"Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent c25308c3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -175,7 +175,7 @@ static const struct xattr_handler xfs_xattr_security_handler = {
	.set	= xfs_xattr_set,
};

const struct xattr_handler *xfs_xattr_handlers[] = {
const struct xattr_handler * const xfs_xattr_handlers[] = {
	&xfs_xattr_user_handler,
	&xfs_xattr_trusted_handler,
	&xfs_xattr_security_handler,
+1 −1
Original line number Diff line number Diff line
@@ -8,6 +8,6 @@

int xfs_attr_change(struct xfs_da_args *args);

extern const struct xattr_handler *xfs_xattr_handlers[];
extern const struct xattr_handler * const xfs_xattr_handlers[];

#endif /* __XFS_XATTR_H__ */