* [PATCH 03/29] 9p: move xattr-related structs to .rodata [not found] <20230930050033.41174-1-wedsonaf@gmail.com> @ 2023-09-30 5:00 ` Wedson Almeida Filho 2023-09-30 8:12 ` Christian Schoenebeck 0 siblings, 1 reply; 5+ 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, Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet, Christian Schoenebeck, v9fs From: Wedson Almeida Filho <walmeida@microsoft.com> This makes it harder for accidental or malicious changes to v9fs_xattr_user_handler, v9fs_xattr_trusted_handler, v9fs_xattr_security_handler, or v9fs_xattr_handlers at runtime. Cc: Eric Van Hensbergen <ericvh@kernel.org> Cc: Latchesar Ionkov <lucho@ionkov.net> Cc: Dominique Martinet <asmadeus@codewreck.org> Cc: Christian Schoenebeck <linux_oss@crudebyte.com> Cc: v9fs@lists.linux.dev Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com> --- fs/9p/xattr.c | 8 ++++---- fs/9p/xattr.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/9p/xattr.c b/fs/9p/xattr.c index e00cf8109b3f..053d1cef6e13 100644 --- a/fs/9p/xattr.c +++ b/fs/9p/xattr.c @@ -162,27 +162,27 @@ static int v9fs_xattr_handler_set(const struct xattr_handler *handler, return v9fs_xattr_set(dentry, full_name, value, size, flags); } -static struct xattr_handler v9fs_xattr_user_handler = { +static const struct xattr_handler v9fs_xattr_user_handler = { .prefix = XATTR_USER_PREFIX, .get = v9fs_xattr_handler_get, .set = v9fs_xattr_handler_set, }; -static struct xattr_handler v9fs_xattr_trusted_handler = { +static const struct xattr_handler v9fs_xattr_trusted_handler = { .prefix = XATTR_TRUSTED_PREFIX, .get = v9fs_xattr_handler_get, .set = v9fs_xattr_handler_set, }; #ifdef CONFIG_9P_FS_SECURITY -static struct xattr_handler v9fs_xattr_security_handler = { +static const struct xattr_handler v9fs_xattr_security_handler = { .prefix = XATTR_SECURITY_PREFIX, .get = v9fs_xattr_handler_get, .set = v9fs_xattr_handler_set, }; #endif -const struct xattr_handler *v9fs_xattr_handlers[] = { +const struct xattr_handler * const v9fs_xattr_handlers[] = { &v9fs_xattr_user_handler, &v9fs_xattr_trusted_handler, #ifdef CONFIG_9P_FS_SECURITY diff --git a/fs/9p/xattr.h b/fs/9p/xattr.h index b5636e544c8a..3ad5a802352a 100644 --- a/fs/9p/xattr.h +++ b/fs/9p/xattr.h @@ -10,7 +10,7 @@ #include <net/9p/9p.h> #include <net/9p/client.h> -extern const struct xattr_handler *v9fs_xattr_handlers[]; +extern const struct xattr_handler * const v9fs_xattr_handlers[]; ssize_t v9fs_fid_xattr_get(struct p9_fid *fid, const char *name, void *buffer, size_t buffer_size); -- 2.34.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 03/29] 9p: move xattr-related structs to .rodata 2023-09-30 5:00 ` [PATCH 03/29] 9p: move xattr-related structs to .rodata Wedson Almeida Filho @ 2023-09-30 8:12 ` Christian Schoenebeck 2023-09-30 9:03 ` Dominique Martinet 0 siblings, 1 reply; 5+ messages in thread From: Christian Schoenebeck @ 2023-09-30 8:12 UTC (permalink / raw) To: Alexander Viro, Christian Brauner, linux-fsdevel, Wedson Almeida Filho Cc: linux-kernel, Wedson Almeida Filho, Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet, v9fs On Saturday, September 30, 2023 7:00:07 AM CEST Wedson Almeida Filho wrote: > From: Wedson Almeida Filho <walmeida@microsoft.com> > > This makes it harder for accidental or malicious changes to > v9fs_xattr_user_handler, v9fs_xattr_trusted_handler, > v9fs_xattr_security_handler, or v9fs_xattr_handlers at runtime. > > Cc: Eric Van Hensbergen <ericvh@kernel.org> > Cc: Latchesar Ionkov <lucho@ionkov.net> > Cc: Dominique Martinet <asmadeus@codewreck.org> > Cc: Christian Schoenebeck <linux_oss@crudebyte.com> > Cc: v9fs@lists.linux.dev > Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com> Reviewed-by: Christian Schoenebeck <linux_oss@crudebyte.com> > --- > fs/9p/xattr.c | 8 ++++---- > fs/9p/xattr.h | 2 +- > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/fs/9p/xattr.c b/fs/9p/xattr.c > index e00cf8109b3f..053d1cef6e13 100644 > --- a/fs/9p/xattr.c > +++ b/fs/9p/xattr.c > @@ -162,27 +162,27 @@ static int v9fs_xattr_handler_set(const struct xattr_handler *handler, > return v9fs_xattr_set(dentry, full_name, value, size, flags); > } > > -static struct xattr_handler v9fs_xattr_user_handler = { > +static const struct xattr_handler v9fs_xattr_user_handler = { > .prefix = XATTR_USER_PREFIX, > .get = v9fs_xattr_handler_get, > .set = v9fs_xattr_handler_set, > }; > > -static struct xattr_handler v9fs_xattr_trusted_handler = { > +static const struct xattr_handler v9fs_xattr_trusted_handler = { > .prefix = XATTR_TRUSTED_PREFIX, > .get = v9fs_xattr_handler_get, > .set = v9fs_xattr_handler_set, > }; > > #ifdef CONFIG_9P_FS_SECURITY > -static struct xattr_handler v9fs_xattr_security_handler = { > +static const struct xattr_handler v9fs_xattr_security_handler = { > .prefix = XATTR_SECURITY_PREFIX, > .get = v9fs_xattr_handler_get, > .set = v9fs_xattr_handler_set, > }; > #endif > > -const struct xattr_handler *v9fs_xattr_handlers[] = { > +const struct xattr_handler * const v9fs_xattr_handlers[] = { > &v9fs_xattr_user_handler, > &v9fs_xattr_trusted_handler, > #ifdef CONFIG_9P_FS_SECURITY > diff --git a/fs/9p/xattr.h b/fs/9p/xattr.h > index b5636e544c8a..3ad5a802352a 100644 > --- a/fs/9p/xattr.h > +++ b/fs/9p/xattr.h > @@ -10,7 +10,7 @@ > #include <net/9p/9p.h> > #include <net/9p/client.h> > > -extern const struct xattr_handler *v9fs_xattr_handlers[]; > +extern const struct xattr_handler * const v9fs_xattr_handlers[]; > > ssize_t v9fs_fid_xattr_get(struct p9_fid *fid, const char *name, > void *buffer, size_t buffer_size); > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 03/29] 9p: move xattr-related structs to .rodata 2023-09-30 8:12 ` Christian Schoenebeck @ 2023-09-30 9:03 ` Dominique Martinet 2023-10-03 13:55 ` Wedson Almeida Filho 0 siblings, 1 reply; 5+ messages in thread From: Dominique Martinet @ 2023-09-30 9:03 UTC (permalink / raw) To: Eric Van Hensbergen Cc: Christian Schoenebeck, Alexander Viro, Christian Brauner, linux-fsdevel, Wedson Almeida Filho, linux-kernel, Wedson Almeida Filho, Latchesar Ionkov, v9fs Christian Schoenebeck wrote on Sat, Sep 30, 2023 at 10:12:25AM +0200: > On Saturday, September 30, 2023 7:00:07 AM CEST Wedson Almeida Filho wrote: > > From: Wedson Almeida Filho <walmeida@microsoft.com> > > > > This makes it harder for accidental or malicious changes to > > v9fs_xattr_user_handler, v9fs_xattr_trusted_handler, > > v9fs_xattr_security_handler, or v9fs_xattr_handlers at runtime. > > > > Cc: Eric Van Hensbergen <ericvh@kernel.org> > > Cc: Latchesar Ionkov <lucho@ionkov.net> > > Cc: Dominique Martinet <asmadeus@codewreck.org> > > Cc: Christian Schoenebeck <linux_oss@crudebyte.com> > > Cc: v9fs@lists.linux.dev > > Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com> > > Reviewed-by: Christian Schoenebeck <linux_oss@crudebyte.com> Looks good to me on principle as well (and it should blow up immediately on testing in the unlikely case there's a problem...) Eric, I don't think you have anything planned for this round? There's another data race patch laying around that we didn't submit for 6.6, shall I take these two for now? (Assuming this patch series is meant to be taken up by individual fs maintainers independantly, it's never really clear with such large swatches of patchs and we weren't in Cc of a cover letter if there was any... In the future it'd help if either there's a clear cover letter everyone is in Cc at (some would say keep everyone in cc of all patches!), or just send these in a loop so they don't appear to be part of a series and each maintainer deals with it as they see fit) -- Dominique ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 03/29] 9p: move xattr-related structs to .rodata 2023-09-30 9:03 ` Dominique Martinet @ 2023-10-03 13:55 ` Wedson Almeida Filho 2023-10-03 21:57 ` Dominique Martinet 0 siblings, 1 reply; 5+ messages in thread From: Wedson Almeida Filho @ 2023-10-03 13:55 UTC (permalink / raw) To: Dominique Martinet Cc: Eric Van Hensbergen, Christian Schoenebeck, Alexander Viro, Christian Brauner, linux-fsdevel, linux-kernel, Wedson Almeida Filho, Latchesar Ionkov, v9fs On Sat, 30 Sept 2023 at 06:03, Dominique Martinet <asmadeus@codewreck.org> wrote: > > Christian Schoenebeck wrote on Sat, Sep 30, 2023 at 10:12:25AM +0200: > > On Saturday, September 30, 2023 7:00:07 AM CEST Wedson Almeida Filho wrote: > > > From: Wedson Almeida Filho <walmeida@microsoft.com> > > > > > > This makes it harder for accidental or malicious changes to > > > v9fs_xattr_user_handler, v9fs_xattr_trusted_handler, > > > v9fs_xattr_security_handler, or v9fs_xattr_handlers at runtime. > > > > > > Cc: Eric Van Hensbergen <ericvh@kernel.org> > > > Cc: Latchesar Ionkov <lucho@ionkov.net> > > > Cc: Dominique Martinet <asmadeus@codewreck.org> > > > Cc: Christian Schoenebeck <linux_oss@crudebyte.com> > > > Cc: v9fs@lists.linux.dev > > > Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com> > > > > Reviewed-by: Christian Schoenebeck <linux_oss@crudebyte.com> Thanks for the review, Christian! > Looks good to me on principle as well (and it should blow up immediately > on testing in the unlikely case there's a problem...) > > Eric, I don't think you have anything planned for this round? > There's another data race patch laying around that we didn't submit for > 6.6, shall I take these two for now? > > (Assuming this patch series is meant to be taken up by individual fs > maintainers independantly, it's never really clear with such large > swatches of patchs and we weren't in Cc of a cover letter if there was > any... In the future it'd help if either there's a clear cover letter > everyone is in Cc at (some would say keep everyone in cc of all > patches!), or just send these in a loop so they don't appear to be part > of a series and each maintainer deals with it as they see fit) There is a cover letter (https://lore.kernel.org/all/20230930050033.41174-1-wedsonaf@gmail.com/), apologies for not CCing you there. I was trying to avoid spamming maintainers with unrelated changes. We need changes in fs/xattr.c (which are in the first patch of the series) to avoid warnings, so unfortunately this can't be taken individually. My thought was that individual fs maintainers would review/ack the patches and this would be taken through the fs tree. > > -- > Dominique ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 03/29] 9p: move xattr-related structs to .rodata 2023-10-03 13:55 ` Wedson Almeida Filho @ 2023-10-03 21:57 ` Dominique Martinet 0 siblings, 0 replies; 5+ messages in thread From: Dominique Martinet @ 2023-10-03 21:57 UTC (permalink / raw) To: Wedson Almeida Filho Cc: Eric Van Hensbergen, Christian Schoenebeck, Alexander Viro, Christian Brauner, linux-fsdevel, linux-kernel, Wedson Almeida Filho, Latchesar Ionkov, v9fs Wedson Almeida Filho wrote on Tue, Oct 03, 2023 at 10:55:44AM -0300: > > Looks good to me on principle as well (and it should blow up immediately > > on testing in the unlikely case there's a problem...) > > > > Eric, I don't think you have anything planned for this round? > > There's another data race patch laying around that we didn't submit for > > 6.6, shall I take these two for now? > > > > (Assuming this patch series is meant to be taken up by individual fs > > maintainers independantly, it's never really clear with such large > > swatches of patchs and we weren't in Cc of a cover letter if there was > > any... In the future it'd help if either there's a clear cover letter > > everyone is in Cc at (some would say keep everyone in cc of all > > patches!), or just send these in a loop so they don't appear to be part > > of a series and each maintainer deals with it as they see fit) > > There is a cover letter > (https://lore.kernel.org/all/20230930050033.41174-1-wedsonaf@gmail.com/), > apologies for not CCing you there. I was trying to avoid spamming > maintainers with unrelated changes. > > We need changes in fs/xattr.c (which are in the first patch of the > series) to avoid warnings, so unfortunately this can't be taken > individually. My thought was that individual fs maintainers would > review/ack the patches and this would be taken through the fs tree. Please include all related maintainers in cover letter and any "common" patch: I'd have complained about the warning if I had taken the time to try it out :) (b4 made it easy to download a whole thread, but it was't obvious this was required -- I honestly prefer receiving the whole thread than too little patch but I know some maintainers are split on this... At least I think we'll all agree cover letter and required dependencies are useful though -- I now see David Sterba told you something similar, but only after having written that so leaving it in) By the way the shmem patch failed to apply to 6.6-rc4 and will need rebasing. With all that said, I've taken a few minutes to check it didn't blow up, so: Acked-by: Dominique Martinet <asmadeus@codewreck.org> -- Dominique Martinet | Asmadeus ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-10-03 21:58 UTC | newest]
Thread overview: 5+ 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 03/29] 9p: move xattr-related structs to .rodata 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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox