Skip to content

Commit 3d649a4

Browse files
wedsonafbrauner
authored andcommitted
overlayfs: move xattr tables to .rodata
This makes it harder for accidental or malicious changes to ovl_trusted_xattr_handlers or ovl_user_xattr_handlers at runtime. Cc: Miklos Szeredi <miklos@szeredi.hu> Cc: Amir Goldstein <amir73il@gmail.com> Cc: linux-unionfs@vger.kernel.org Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com> Link: https://lore.kernel.org/r/20230930050033.41174-28-wedsonaf@gmail.com Acked-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent 375aa21 commit 3d649a4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

fs/overlayfs/super.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,13 +484,13 @@ static const struct xattr_handler ovl_other_xattr_handler = {
484484
.set = ovl_other_xattr_set,
485485
};
486486

487-
static const struct xattr_handler *ovl_trusted_xattr_handlers[] = {
487+
static const struct xattr_handler * const ovl_trusted_xattr_handlers[] = {
488488
&ovl_own_trusted_xattr_handler,
489489
&ovl_other_xattr_handler,
490490
NULL
491491
};
492492

493-
static const struct xattr_handler *ovl_user_xattr_handlers[] = {
493+
static const struct xattr_handler * const ovl_user_xattr_handlers[] = {
494494
&ovl_own_user_xattr_handler,
495495
&ovl_other_xattr_handler,
496496
NULL

0 commit comments

Comments
 (0)