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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKCA56CUMaAw7Zga9sT_uHQ5odW-bSamssug38xvWhcNNw8eng@mail.gmail.com>
Date:   Mon, 17 May 2021 15:32:44 -0700
From:   Chu Lin <linchuyuan@...gle.com>
To:     Guenter Roeck <linux@...ck-us.net>
Cc:     linchuyuan@...il.com, Jason Ling <jasonling@...gle.com>,
        Zhongqi Li <zhongqil@...gle.com>, jdelvare@...e.com,
        linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] hwmon:q54sj108a2: the PMBUS_MFR_ID is actually 6 chars
 instead of 5

On Mon, May 17, 2021 at 3:28 PM Guenter Roeck <linux@...ck-us.net> wrote:
>
> On 5/17/21 3:26 PM, Chu Lin wrote:
> > The PMBUS_MFR_ID block is actually 6 chars for q54sj108a2.
> > /sys/bus/i2c/drivers/q54sj108a2_test# iotools smbus_read8 $BUS $ADDR 0x99
> > 0x06
> >
>
> What is the 6th character ? Should it be checked as well ?
>
The 6th char is \0. Do you suggest we check that as well?

Thanks,
Chu

> > Tested: Devices are able to bind to the q54sj108a2 driver successfully.
> >
> > Signed-off-by: Chu Lin <linchuyuan@...gle.com>
> > ---
> >   drivers/hwmon/pmbus/q54sj108a2.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/hwmon/pmbus/q54sj108a2.c b/drivers/hwmon/pmbus/q54sj108a2.c
> > index aec512766c31..0976268b2670 100644
> > --- a/drivers/hwmon/pmbus/q54sj108a2.c
> > +++ b/drivers/hwmon/pmbus/q54sj108a2.c
> > @@ -299,7 +299,7 @@ static int q54sj108a2_probe(struct i2c_client *client)
> >               dev_err(&client->dev, "Failed to read Manufacturer ID\n");
> >               return ret;
> >       }
> > -     if (ret != 5 || strncmp(buf, "DELTA", 5)) {
> > +     if (ret != 6 || strncmp(buf, "DELTA", 5)) {
> >               buf[ret] = '\0';
> >               dev_err(dev, "Unsupported Manufacturer ID '%s'\n", buf);
> >               return -ENODEV;
> >
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ