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

From: Arnd Bergmann
Date: Mon May 10 2021 - 09:50:25 EST


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