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]
Message-ID: <YgHqCpet2TMQAz9L@mail.google.com>
Date:   Tue, 8 Feb 2022 16:56:58 +1300
From:   Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@...il.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     gregkh@...uxfoundation.org, realwakka@...il.com,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: pi433: remove need to recompile code to debug
 fifo content

On Mon, Feb 07, 2022 at 01:06:01PM +0300, Dan Carpenter wrote:
> > #2
> > In the past, it's been pointed out to me during code review that I tend
> > to add code comments which could be omitted. In this case, the for-loop
> > seemed a bit odd without explaining why it's in there. Let me know if
> > you think I should keep/remove it.
> 
> Remove.  Everyone knows what dev_dbg() does and the "read from fifo"
> vs "written from[sic] fifo" is built into the function name.
> 

fair enough

> >  int rf69_read_fifo(struct spi_device *spi, u8 *buffer, unsigned int size)
> >  {
> > -#ifdef DEBUG_FIFO_ACCESS
> >  	int i;
> > -#endif
> >  	struct spi_transfer transfer;
> >  	u8 local_buffer[FIFO_SIZE + 1];
> 
> You did not introduce this but we are potentially printing out
> uninitialized data if spi_sync_transfer() fails.  Please initialize this
> with:
> 
> 	u8 local_buffer[FIFO_SIZE + 1] = {};
> 
> Do that in a separate patch, though.
> 

good point, will do. Thanks a lot :)

thanks,

Paulo Almeida

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ