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: <CAK8P3a2-F-vAL5-gewVh3JvnD1a9yXWYLKN9fi6CEe86Hnhn+A@mail.gmail.com>
Date:   Mon, 27 Sep 2021 15:59:27 +0200
From:   Arnd Bergmann <arnd@...nel.org>
To:     "Russell King (Oracle)" <linux@...linux.org.uk>
Cc:     Giuseppe Cavallaro <peppe.cavallaro@...com>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>,
        Jose Abreu <joabreu@...opsys.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Voon Weifeng <weifeng.voon@...el.com>,
        Ong Boon Leong <boon.leong.ong@...el.com>,
        Arnd Bergmann <arnd@...db.de>,
        kernel test robot <lkp@...el.com>,
        Dan Carpenter <dan.carpenter@...cle.com>,
        Networking <netdev@...r.kernel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] [RESEND] net: stmmac: fix gcc-10 -Wrestrict warning

On Mon, Sep 27, 2021 at 3:27 PM Russell King (Oracle)
<linux@...linux.org.uk> wrote:
> On Mon, Sep 27, 2021 at 12:02:44PM +0200, Arnd Bergmann wrote:
>
> This looks rather weird. rx_irq[] is defined as:
>
>         int rx_irq[MTL_MAX_RX_QUEUES];
>
> If "i" were to become MTL_MAX_RX_QUEUES, then the above code overlows
> the array.
>
> So while this may stop gcc-10 complaining, I'd argue that making the
> new test ">=" rather than ">" would have also made it look correct.

Indeed, thanks for pointing this out. I have sent a follow-up with
that change now.

             Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ