linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve French <smfrench@gmail.com>
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>,
	Steve French <sfrench@samba.org>,
	Paulo Alcantara <pc@manguebit.com>,
	Ronnie Sahlberg <lsahlber@redhat.com>,
	Shyam Prasad N <sprasad@microsoft.com>,
	Tom Talpey <tom@talpey.com>,
	linux-cifs@vger.kernel.org
Subject: Re: [PATCH 23/29] smb: move cifs_xattr_handlers to .rodata
Date: Sun, 1 Oct 2023 14:59:01 -0500	[thread overview]
Message-ID: <CAH2r5mt_u0SDLpFzZ43n0F2-ZQ8xF8KJ4qTvvDKxe116Doa1Qw@mail.gmail.com> (raw)
In-Reply-To: <20230930050033.41174-24-wedsonaf@gmail.com>

Reviewed-by: Steve French <stfrench@microsoft.com>

On Sat, Sep 30, 2023 at 6:27 AM Wedson Almeida Filho <wedsonaf@gmail.com> wrote:
>
> From: Wedson Almeida Filho <walmeida@microsoft.com>
>
> This makes it harder for accidental or malicious changes to
> cifs_xattr_handlers at runtime.
>
> Cc: Steve French <sfrench@samba.org>
> Cc: Paulo Alcantara <pc@manguebit.com>
> Cc: Ronnie Sahlberg <lsahlber@redhat.com>
> Cc: Shyam Prasad N <sprasad@microsoft.com>
> Cc: Tom Talpey <tom@talpey.com>
> Cc: linux-cifs@vger.kernel.org
> Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
> ---
>  fs/smb/client/cifsfs.h | 2 +-
>  fs/smb/client/xattr.c  | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/smb/client/cifsfs.h b/fs/smb/client/cifsfs.h
> index 15c8cc4b6680..a0472b539567 100644
> --- a/fs/smb/client/cifsfs.h
> +++ b/fs/smb/client/cifsfs.h
> @@ -134,7 +134,7 @@ extern int cifs_symlink(struct mnt_idmap *idmap, struct inode *inode,
>                         struct dentry *direntry, const char *symname);
>
>  #ifdef CONFIG_CIFS_XATTR
> -extern const struct xattr_handler *cifs_xattr_handlers[];
> +extern const struct xattr_handler * const cifs_xattr_handlers[];
>  extern ssize_t cifs_listxattr(struct dentry *, char *, size_t);
>  #else
>  # define cifs_xattr_handlers NULL
> diff --git a/fs/smb/client/xattr.c b/fs/smb/client/xattr.c
> index 4ad5531686d8..ac199160bce6 100644
> --- a/fs/smb/client/xattr.c
> +++ b/fs/smb/client/xattr.c
> @@ -478,7 +478,7 @@ static const struct xattr_handler smb3_ntsd_full_xattr_handler = {
>         .set = cifs_xattr_set,
>  };
>
> -const struct xattr_handler *cifs_xattr_handlers[] = {
> +const struct xattr_handler * const cifs_xattr_handlers[] = {
>         &cifs_user_xattr_handler,
>         &cifs_os2_xattr_handler,
>         &cifs_cifs_acl_xattr_handler,
> --
> 2.34.1
>


-- 
Thanks,

Steve

  reply	other threads:[~2023-10-01 19:59 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-30  5:00 [PATCH 00/29] const xattr tables Wedson Almeida Filho
2023-09-30  5:00 ` [PATCH 01/29] xattr: make the xattr array itself const Wedson Almeida Filho
2023-09-30  6:54   ` kernel test robot
2023-10-02  9:58   ` Thomas Weißschuh
2023-09-30  5:00 ` [PATCH 02/29] ext4: move ext4_xattr_handlers to .rodata Wedson Almeida Filho
2023-09-30  5:00 ` [PATCH 03/29] 9p: move xattr-related structs " Wedson Almeida Filho
2023-09-30  8:12   ` Christian Schoenebeck
2023-09-30  9:03     ` Dominique Martinet
2023-10-03 13:55       ` Wedson Almeida Filho
2023-10-03 21:57         ` Dominique Martinet
2023-09-30  5:00 ` [PATCH 04/29] afs: move afs_xattr_handlers " Wedson Almeida Filho
2023-09-30  5:00 ` [PATCH 05/29] btrfs: move btrfs_xattr_handlers " Wedson Almeida Filho
2023-10-02 11:28   ` David Sterba
2023-10-02 11:37     ` David Sterba
2023-10-03 13:48       ` Wedson Almeida Filho
2023-09-30  5:00 ` [PATCH 06/29] ceph: move ceph_xattr_handlers " Wedson Almeida Filho
2023-10-03 14:30   ` Ilya Dryomov
2023-09-30  5:00 ` [PATCH 07/29] ecryptfs: move ecryptfs_xattr_handlers " Wedson Almeida Filho
2023-09-30  5:00 ` [PATCH 08/29] erofs: move erofs_xattr_handlers and xattr_handler_map " Wedson Almeida Filho
2023-10-07  5:50   ` Gao Xiang
2023-09-30  5:00 ` [PATCH 09/29] ext2: move ext2_xattr_handlers and ext2_xattr_handler_map " Wedson Almeida Filho
2023-10-02  9:49   ` Jan Kara
2023-09-30  5:00 ` [PATCH 10/29] f2fs: move f2fs_xattr_handlers and f2fs_xattr_handler_map " Wedson Almeida Filho
2023-10-07  6:37   ` Chao Yu
2023-09-30  5:00 ` [PATCH 11/29] fuse: move fuse_xattr_handlers " Wedson Almeida Filho
2023-09-30  5:00 ` [PATCH 12/29] gfs2: move gfs2_xattr_handlers_max " Wedson Almeida Filho
2023-09-30  5:00 ` [PATCH 13/29] hfs: move hfs_xattr_handlers " Wedson Almeida Filho
2023-09-30  5:00 ` [PATCH 14/29] hfsplus: move hfsplus_xattr_handlers " Wedson Almeida Filho
2023-09-30  5:00 ` [PATCH 15/29] jffs2: move jffs2_xattr_handlers " Wedson Almeida Filho
2023-10-07  1:39   ` Zhihao Cheng
2023-09-30  5:00 ` [PATCH 16/29] jfs: move jfs_xattr_handlers " Wedson Almeida Filho
2023-10-03 14:54   ` Dave Kleikamp
2023-09-30  5:00 ` [PATCH 17/29] kernfs: move kernfs_xattr_handlers " Wedson Almeida Filho
2023-10-05 10:37   ` Greg Kroah-Hartman
2023-09-30  5:00 ` [PATCH 18/29] nfs: move nfs4_xattr_handlers " Wedson Almeida Filho
2023-09-30  5:00 ` [PATCH 19/29] ntfs3: move ntfs_xattr_handlers " Wedson Almeida Filho
2023-09-30  5:00 ` [PATCH 20/29] ocfs2: move ocfs2_xattr_handlers and ocfs2_xattr_handler_map " Wedson Almeida Filho
2023-09-30  5:00 ` [PATCH 21/29] orangefs: move orangefs_xattr_handlers " Wedson Almeida Filho
2023-09-30  5:00 ` [PATCH 22/29] reiserfs: move reiserfs_xattr_handlers " Wedson Almeida Filho
2023-09-30  5:00 ` [PATCH 23/29] smb: move cifs_xattr_handlers " Wedson Almeida Filho
2023-10-01 19:59   ` Steve French [this message]
2023-09-30  5:00 ` [PATCH 24/29] squashfs: move squashfs_xattr_handlers " Wedson Almeida Filho
2023-09-30  5:00 ` [PATCH 25/29] ubifs: move ubifs_xattr_handlers " Wedson Almeida Filho
2023-10-07  1:39   ` Zhihao Cheng
2023-09-30  5:00 ` [PATCH 26/29] xfs: move xfs_xattr_handlers " Wedson Almeida Filho
2023-10-01 16:18   ` Darrick J. Wong
2023-09-30  5:00 ` [PATCH 27/29] overlayfs: move xattr tables " Wedson Almeida Filho
2023-10-03 16:41   ` Amir Goldstein
2023-09-30  5:00 ` [PATCH 28/29] shmem: move shmem_xattr_handlers " Wedson Almeida Filho
2023-09-30  5:00 ` [PATCH 29/29] net: move sockfs_xattr_handlers " Wedson Almeida Filho
2023-10-04 21:24   ` Jakub Kicinski
2023-10-03 13:28 ` [PATCH 00/29] const xattr tables Christian Brauner
2023-10-09 14:43 ` Christian Brauner

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=CAH2r5mt_u0SDLpFzZ43n0F2-ZQ8xF8KJ4qTvvDKxe116Doa1Qw@mail.gmail.com \
    --to=smfrench@gmail.com \
    --cc=brauner@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lsahlber@redhat.com \
    --cc=pc@manguebit.com \
    --cc=sfrench@samba.org \
    --cc=sprasad@microsoft.com \
    --cc=tom@talpey.com \
    --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).