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] [day] [month] [year] [list]
Date:	Wed, 10 Feb 2016 18:12:24 +0100
From:	Christian Brauner <christian.brauner@...lbox.org>
To:	Greg KH <gregkh@...uxfoundation.org>
Cc:	tj@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] let kernfs_name_locked & kernfs_name return size_t

On Wed, Feb 10, 2016 at 08:53:14AM -0800, Greg KH wrote:
> On Wed, Feb 10, 2016 at 05:18:59PM +0100, Christian Brauner wrote:
> > They return the length of kn->parent or kn->name and should be aligned with
> > kernfs_path_len which also returns size_t.
> > 
> > Signed-off-by: Christian Brauner <christian.brauner@...lbox.org>
> > ---
> >  fs/kernfs/dir.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c
> > index 742bf4a..a3553b8 100644
> > --- a/fs/kernfs/dir.c
> > +++ b/fs/kernfs/dir.c
> > @@ -39,7 +39,7 @@ static bool kernfs_lockdep(struct kernfs_node *kn)
> >  #endif
> >  }
> >  
> > -static int kernfs_name_locked(struct kernfs_node *kn, char *buf, size_t buflen)
> > +static size_t kernfs_name_locked(struct kernfs_node *kn, char *buf, size_t buflen)
> >  {
> >  	return strlcpy(buf, kn->parent ? kn->name : "/", buflen);
> >  }
> > @@ -80,7 +80,7 @@ static char * __must_check kernfs_path_locked(struct kernfs_node *kn, char *buf,
> >   *
> >   * This function can be called from any context.
> >   */
> > -int kernfs_name(struct kernfs_node *kn, char *buf, size_t buflen)
> > +size_t kernfs_name(struct kernfs_node *kn, char *buf, size_t buflen)
> >  {
> >  	unsigned long flags;
> >  	int ret;
> 
> Now if only you had test built this patch :(
I actually did but forgot to commit the changes to include/linux/kernfs.h as
well.
> 
> Please be more careful, it just makes maintainers grumpy and annoyed
> when you do that...
Yes, sorry. I will do that. I'll resend with the appropriate changes
to kernfs.h included. Thanks for being patient.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ