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:   Mon, 6 Nov 2023 14:16:42 +0100
From:   Linus Walleij <linus.walleij@...aro.org>
To:     kernel test robot <lkp@...el.com>
Cc:     oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: arch/arm/include/asm/memory.h:298:23: warning: array subscript -1
 is outside array bounds of 'const void[2147483647]'

Hi Robot,

On Thu, Oct 19, 2023 at 2:22 AM kernel test robot <lkp@...el.com> wrote:

>    In function 'virt_to_pfn',
>        inlined from 'pfn_is_nosave' at arch/arm/kernel/hibernate.c:29:33:
> >> arch/arm/include/asm/memory.h:298:23: warning: array subscript -1 is outside array bounds of 'const void[2147483647]' [-Warray-bounds=]
>      298 |         unsigned long kaddr = (unsigned long)p;

What does this even mean?

>    296  static inline unsigned long virt_to_pfn(const void *p)
>    297  {
>  > 298          unsigned long kaddr = (unsigned long)p;
>    299          return (((kaddr - PAGE_OFFSET) >> PAGE_SHIFT) +
>    300                  PHYS_PFN_OFFSET);
>    301  }

Array out of bounds? It's not even an array! What's up with this warning?

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ