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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <878fd32f9315f587f34da544a67c9a2fb27e0f44.camel@microchip.com>
Date:   Fri, 20 Jan 2023 10:38:05 +0100
From:   Steen Hegelund <steen.hegelund@...rochip.com>
To:     Dan Carpenter <error27@...il.com>
CC:     "David S . Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        <UNGLinuxDriver@...rochip.com>,
        Randy Dunlap <rdunlap@...radead.org>,
        Casper Andersson <casper.casan@...il.com>,
        "Russell King" <rmk+kernel@...linux.org.uk>,
        Wan Jiabing <wanjiabing@...o.com>,
        "Nathan Huckleberry" <nhuck@...gle.com>,
        <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        "Daniel Machon" <daniel.machon@...rochip.com>,
        Horatiu Vultur <horatiu.vultur@...rochip.com>,
        Lars Povlsen <lars.povlsen@...rochip.com>,
        Michael Walle <michael@...le.cc>
Subject: Re: [PATCH net-next 7/8] net: microchip: sparx5: Add support for
 IS0 VCAP ethernet protocol types

Hi Dan,

On Fri, 2023-01-20 at 12:20 +0300, Dan Carpenter wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
> 
> On Fri, Jan 20, 2023 at 10:08:30AM +0100, Steen Hegelund wrote:
> > +bool sparx5_vcap_is_known_etype(struct vcap_admin *admin, u16 etype)
> > +{
> > +     const u16 *known_etypes;
> > +     int size, idx;
> > +
> > +     switch (admin->vtype) {
> > +     case VCAP_TYPE_IS0:
> > +             known_etypes = sparx5_vcap_is0_known_etypes;
> > +             size = ARRAY_SIZE(sparx5_vcap_is0_known_etypes);
> > +             break;
> > +     case VCAP_TYPE_IS2:
> > +             known_etypes = sparx5_vcap_is2_known_etypes;
> > +             size = ARRAY_SIZE(sparx5_vcap_is2_known_etypes);
> > +             break;
> > +     default:
> > +             break;
> 
> return false; to avoid an uninitialized "size".

Good catch.  I will update that.
> 
> > +     }
> > +     for (idx = 0; idx < size; ++idx)
> > +             if (known_etypes[idx] == etype)
> > +                     return true;
> > +     return false;
> > +}
> 
> regards,
> dan carpenter

Thanks for the review.

BR
Steen


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ