* [PATCH 23/29] smb: move cifs_xattr_handlers to .rodata [not found] <20230930050033.41174-1-wedsonaf@gmail.com> @ 2023-09-30 5:00 ` Wedson Almeida Filho 2023-10-01 19:59 ` Steve French 0 siblings, 1 reply; 2+ messages in thread From: Wedson Almeida Filho @ 2023-09-30 5:00 UTC (permalink / raw) To: Alexander Viro, Christian Brauner, linux-fsdevel Cc: linux-kernel, Wedson Almeida Filho, Steve French, Paulo Alcantara, Ronnie Sahlberg, Shyam Prasad N, Tom Talpey, linux-cifs 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 ^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 23/29] smb: move cifs_xattr_handlers to .rodata 2023-09-30 5:00 ` [PATCH 23/29] smb: move cifs_xattr_handlers to .rodata Wedson Almeida Filho @ 2023-10-01 19:59 ` Steve French 0 siblings, 0 replies; 2+ messages in thread From: Steve French @ 2023-10-01 19:59 UTC (permalink / raw) To: Wedson Almeida Filho Cc: Alexander Viro, Christian Brauner, linux-fsdevel, linux-kernel, Wedson Almeida Filho, Steve French, Paulo Alcantara, Ronnie Sahlberg, Shyam Prasad N, Tom Talpey, linux-cifs 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 ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-01 19:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230930050033.41174-1-wedsonaf@gmail.com>
2023-09-30 5:00 ` [PATCH 23/29] smb: move cifs_xattr_handlers to .rodata Wedson Almeida Filho
2023-10-01 19:59 ` Steve French
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox