lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <l6sjutxf7g3gafcmwtzaadm7ngoqoss5lh6sc4f6naugb3vo2b@e4mdbr43xwge>
Date: Tue, 8 Jul 2025 11:59:44 +0200
From: Carlos Maiolino <cem@...nel.org>
To: Pranav Tyagi <pranav.tyagi03@...il.com>
Cc: "Darrick J. Wong" <djwong@...nel.org>, skhan@...uxfoundation.org, 
	linux-xfs@...r.kernel.org, linux-kernel@...r.kernel.org, 
	linux-kernel-mentees@...ts.linux.dev
Subject: Re: [PATCH] xfs: replace strncpy with memcpy in xattr listing

On Mon, Jul 07, 2025 at 08:02:06PM +0530, Pranav Tyagi wrote:
> On Tue, Jul 1, 2025 at 12:04 AM Carlos Maiolino <cem@...nel.org> wrote:
> >
> > On Mon, Jun 30, 2025 at 06:18:06PM +0530, Pranav Tyagi wrote:
> > > On Mon, Jun 30, 2025 at 5:49 PM Carlos Maiolino <cem@...nel.org> wrote:
> > > >
> > > > On Tue, Jun 17, 2025 at 06:44:46PM +0530, Pranav Tyagi wrote:
> > > > > Use memcpy() in place of strncpy() in __xfs_xattr_put_listent().
> > > > > The length is known and a null byte is added manually.
> > > > >
> > > > > No functional change intended.
> > > > >
> > > > > Signed-off-by: Pranav Tyagi <pranav.tyagi03@...il.com>
> > > > > ---
> > > > >  fs/xfs/xfs_xattr.c | 2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/fs/xfs/xfs_xattr.c b/fs/xfs/xfs_xattr.c
> > > > > index 0f641a9091ec..ac5cecec9aa1 100644
> > > > > --- a/fs/xfs/xfs_xattr.c
> > > > > +++ b/fs/xfs/xfs_xattr.c
> > > > > @@ -243,7 +243,7 @@ __xfs_xattr_put_listent(
> > > > >       offset = context->buffer + context->count;
> > > > >       memcpy(offset, prefix, prefix_len);
> > > > >       offset += prefix_len;
> > > > > -     strncpy(offset, (char *)name, namelen);                 /* real name */
> > > > > +     memcpy(offset, (char *)name, namelen);                  /* real name */
> > > > >       offset += namelen;
> > > > >       *offset = '\0';
> > > >
> > > > What difference does it make?
> > >
> > > I intended this to be a cleanup patch as strncpy()
> > > is deprecated and its use discouraged.
> >
> > Fair enough. This is the kind of information that's worth
> > to add to the patch description on your future patches.
> >
> > No need to re-send this again.
> >
> > Reviewed-by: Carlos Maiolino <cmaiolino@...hat.com>
> 
> Thanks Darrick and Carlos for the Reviewed-by tag.
> 
> I also wanted to ask if this patch has been queued for merging.

xfs teams sends an ANNOUNCE email every merge done to the for-next
branch, you can check if your patches are mentioned there, if not
they are not queued up yet.

Also, you'll likely receive a message saying your patch has been pushed
into for-next.

Note though that just because your patch has been added to for-next,
doesn't automatically mean it will be merged. Several tests still
happens on patches pushed to for-next branch (which are merged into
linux-next) and linux-next 'after' your patch has been merged into.

So your patch(es) being merged are conditional to that.

Carlos

> 
> Regards
> Pranav Tyagi
> >
> > >
> > > Regards
> > > Pranav Tyagi
> > > >
> > > >
> > > > >
> > > > > --
> > > > > 2.49.0
> > > > >
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ