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: <CACPK8XeXt3fzrMiq4=+8k9+9t2am4k=YZLJ4FUYkn2k1=2AMsQ@mail.gmail.com>
Date:   Thu, 28 May 2020 08:44:52 +0000
From:   Joel Stanley <joel@....id.au>
To:     Stephen Rothwell <sfr@...b.auug.org.au>
Cc:     Devicetree Compiler <devicetree-compiler@...r.kernel.org>,
        David Gibson <david@...son.dropbear.id.au>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH v2 2/2] checks: Improve i2c reg property checking

On Thu, 28 May 2020 at 08:31, Stephen Rothwell <sfr@...b.auug.org.au> wrote:
>
> Hi Joel,
>
> On Thu, 28 May 2020 16:50:37 +0930 Joel Stanley <joel@....id.au> wrote:
> >
> >
> >  #define I2C_OWN_SLAVE_ADDRESS        (1 << 30)
> > +#define I2C_TEN_BIT_ADDRESS  (1 << 31)
> >
> >  static void check_i2c_bus_reg(struct check *c, struct dt_info *dti, struct node *node)
> >  {
> > @@ -1057,10 +1058,13 @@ static void check_i2c_bus_reg(struct check *c, struct dt_info *dti, struct node
> >               reg = fdt32_to_cpu(*(cells++));
> >               /* Ignore I2C_OWN_SLAVE_ADDRESS */
> >               reg &= ~I2C_OWN_SLAVE_ADDRESS;
> > -             if (reg > 0x3ff)
> > +
> > +             if ((reg & I2C_TEN_BIT_ADDRESS) && reg > 0x3ff)
>
> Shouldn't this be
>
>                 if ((reg & I2C_TEN_BIT_ADDRESS) && ((reg & ~I2C_TEN_BIT_ADDRESS) > 0x3ff))

Yes, good catch.

There are no device trees that set the I2C_TEN_BIT_ADDRESS flag in the
kernel, so it is untested.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ