summaryrefslogtreecommitdiff
path: root/fs/afs
diff options
context:
space:
mode:
authorWedson Almeida Filho <walmeida@microsoft.com>2023-09-30 02:00:08 -0300
committerChristian Brauner <brauner@kernel.org>2023-10-09 16:24:16 +0200
commitf710c2e4813559e84fb2deb9f36ff43f0ebdf94e (patch)
tree045c8c1a1fdaf6432ab5757f27ad7726d480ac18 /fs/afs
parentb6079dc9cb5182518b8f14fa350d5c501cba80d3 (diff)
afs: move afs_xattr_handlers to .rodata
This makes it harder for accidental or malicious changes to afs_xattr_handlers at runtime. Cc: David Howells <dhowells@redhat.com> Cc: Marc Dionne <marc.dionne@auristor.com> Cc: linux-afs@lists.infradead.org Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com> Link: https://lore.kernel.org/r/20230930050033.41174-5-wedsonaf@gmail.com Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/afs')
-rw-r--r--fs/afs/internal.h2
-rw-r--r--fs/afs/xattr.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/fs/afs/internal.h b/fs/afs/internal.h
index da73b97e19a9..23e2cc4efe41 100644
--- a/fs/afs/internal.h
+++ b/fs/afs/internal.h
@@ -1541,7 +1541,7 @@ int afs_launder_folio(struct folio *);
/*
* xattr.c
*/
-extern const struct xattr_handler *afs_xattr_handlers[];
+extern const struct xattr_handler * const afs_xattr_handlers[];
/*
* yfsclient.c
diff --git a/fs/afs/xattr.c b/fs/afs/xattr.c
index 9048d8ccc715..64b2c0224f62 100644
--- a/fs/afs/xattr.c
+++ b/fs/afs/xattr.c
@@ -353,7 +353,7 @@ static const struct xattr_handler afs_xattr_afs_volume_handler = {
.get = afs_xattr_get_volume,
};
-const struct xattr_handler *afs_xattr_handlers[] = {
+const struct xattr_handler * const afs_xattr_handlers[] = {
&afs_xattr_afs_acl_handler,
&afs_xattr_afs_cell_handler,
&afs_xattr_afs_fid_handler,