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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210527082008.GG543307@dell>
Date:   Thu, 27 May 2021 09:20:08 +0100
From:   Lee Jones <lee.jones@...aro.org>
To:     Jiri Slaby <jirislaby@...nel.org>
Cc:     linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Andrew J. Kroll" <ag784@...enet.buffalo.edu>,
        processes-Sapan Bhatia <sapan@...ewars.org>
Subject: Re: [PATCH v2 1/1] tty: n_tty: Fix some misdocumented functions

On Thu, 27 May 2021, Jiri Slaby wrote:

> On 26. 05. 21, 10:31, Lee Jones wrote:
> > Fixes the following W=1 kernel build warning(s):
> > 
> >   drivers/tty/n_tty.c:623: warning: expecting prototype for process_echoes(). Prototype was for __process_echoes() instead
> >   drivers/tty/n_tty.c:1109: warning: expecting prototype for isig(). Prototype was for __isig() instead
> >   drivers/tty/n_tty.c:1268: warning: expecting prototype for n_tty_receive_char(). Prototype was for n_tty_receive_char_special() instead
> >   drivers/tty/n_tty.c:2132: warning: Excess function parameter 'buf' description in 'n_tty_read'
> > 
> > Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> > Cc: Jiri Slaby <jirislaby@...nel.org>
> > Cc: "Andrew J. Kroll" <ag784@...enet.buffalo.edu>
> > Cc: processes-Sapan Bhatia <sapan@...ewars.org>
> > Signed-off-by: Lee Jones <lee.jones@...aro.org>
> > ---
> > 
> > v2: Rebased
> > 
> >   drivers/tty/n_tty.c | 10 +++++-----
> >   1 file changed, 5 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
> > index 0ec93f1a61f5d..56d3b43d8a3a4 100644
> > --- a/drivers/tty/n_tty.c
> > +++ b/drivers/tty/n_tty.c
> ...
> > @@ -1248,7 +1248,7 @@ n_tty_receive_signal_char(struct tty_struct *tty, int signal, unsigned char c)
> >   }
> >   /**
> > - *	n_tty_receive_char	-	perform processing
> > + *	n_tty_receive_char_special	-	perform processing
> 
> No, please move the doc to the function in this case instead.

Oh, so this *really* is the doc for n_tty_receive_char()?

> >    *	@tty: terminal device
> >    *	@c: character
> >    *
> > @@ -2042,11 +2042,11 @@ static int job_control(struct tty_struct *tty, struct file *file)
> >   }
> > -/**
> > +/*
> 
> Why this?

Because the author has missed:

  void **cookie, unsigned long offset

Once these descriptions are provided, it can be re-promoted.

> >    *	n_tty_read		-	read function for tty
> >    *	@tty: tty device
> >    *	@file: file object
> > - *	@buf: userspace buffer pointer
> > + *	@kbuf: userspace buffer pointer
> >    *	@nr: size of I/O
> >    *
> >    *	Perform reads for the line discipline. We are guaranteed that the
> > 
> 
> thanks,

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ