From: "Darrick J. Wong" <djwong@kernel.org>
To: Wedson Almeida Filho <wedsonaf@gmail.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Wedson Almeida Filho <walmeida@microsoft.com>,
linux-xfs@vger.kernel.org
Subject: Re: [PATCH 26/29] xfs: move xfs_xattr_handlers to .rodata
Date: Sun, 1 Oct 2023 09:18:50 -0700 [thread overview]
Message-ID: <20231001161850.GB21298@frogsfrogsfrogs> (raw)
In-Reply-To: <20230930050033.41174-27-wedsonaf@gmail.com>
On Sat, Sep 30, 2023 at 02:00:30AM -0300, Wedson Almeida Filho wrote:
> From: Wedson Almeida Filho <walmeida@microsoft.com>
>
> 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: Wedson Almeida Filho <walmeida@microsoft.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ---
> fs/xfs/xfs_xattr.c | 2 +-
> fs/xfs/xfs_xattr.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/xfs/xfs_xattr.c b/fs/xfs/xfs_xattr.c
> index 43e5c219aaed..77418bcd6f3a 100644
> --- a/fs/xfs/xfs_xattr.c
> +++ b/fs/xfs/xfs_xattr.c
> @@ -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,
> diff --git a/fs/xfs/xfs_xattr.h b/fs/xfs/xfs_xattr.h
> index 2b09133b1b9b..cec766cad26c 100644
> --- a/fs/xfs/xfs_xattr.h
> +++ b/fs/xfs/xfs_xattr.h
> @@ -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__ */
> --
> 2.34.1
>
prev parent reply other threads:[~2023-10-01 16:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230930050033.41174-1-wedsonaf@gmail.com>
2023-09-30 5:00 ` [PATCH 26/29] xfs: move xfs_xattr_handlers to .rodata Wedson Almeida Filho
2023-10-01 16:18 ` Darrick J. Wong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231001161850.GB21298@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=brauner@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=walmeida@microsoft.com \
--cc=wedsonaf@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).