Re: [PATCH v5 3/3] asm-generic/io.h: warn in inb() and friends with undefined PCI_IOBASE

From: Niklas Schnelle
Date: Mon May 10 2021 - 10:10:20 EST


On Mon, 2021-05-10 at 15:43 +0200, Arnd Bergmann wrote:
> On Mon, May 10, 2021 at 3:30 PM kernel test robot <lkp@xxxxxxxxx> wrote:
> > All warnings (new ones prefixed by >>):
> >
> > In file included from include/linux/kernel.h:10,
> > from include/linux/list.h:9,
> > from include/linux/module.h:12,
> > from drivers/net/arcnet/com20020.c:31:
> > drivers/net/arcnet/com20020.c: In function 'com20020_reset':
> > > > include/linux/compiler.h:70:32: warning: 'inbyte' is used uninitialized in this function [-Wuninitialized]
> > 70 | (__if_trace.miss_hit[1]++,1) : \
> > | ^
> > drivers/net/arcnet/com20020.c:286:9: note: 'inbyte' was declared here
> > 286 | u_char inbyte;
> > | ^~~~~~
>
> This looks like a real problem with the patch: the insb()/insw()/insl() helpers
> should memset(buffer, 0xff, size) to avoid using random stack data.
>
> Arnd


Yes I agree, will send a v6 shortly. Thanks.