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: <AM5PR0501MB2097315FB75BFEF681512187A2B20@AM5PR0501MB2097.eurprd05.prod.outlook.com>
Date:   Sun, 20 Nov 2016 05:52:56 +0000
From:   Vadim Pasternak <vadimp@...lanox.com>
To:     Wolfram Sang <wsa-dev@...g-engineering.com>
CC:     "wsa@...-dreams.de" <wsa@...-dreams.de>,
        "linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "jiri@...nulli.us" <jiri@...nulli.us>,
        Michael Shych <michaelsh@...lanox.com>
Subject: RE: [patch v8 1/1] i2c: add master driver for mellanox systems

Hi Wolfram,

> -----Original Message-----
> From: Wolfram Sang [mailto:wsa-dev@...g-engineering.com]
> Sent: Saturday, November 19, 2016 11:05 PM
> To: Vadim Pasternak <vadimp@...lanox.com>
> Cc: wsa@...-dreams.de; linux-i2c@...r.kernel.org; linux-
> kernel@...r.kernel.org; jiri@...nulli.us; Michael Shych
> <michaelsh@...lanox.com>
> Subject: Re: [patch v8 1/1] i2c: add master driver for mellanox systems
> 
> Hi,
> 
> looks mostly good. I just found this comment which needs clarification:
> 
> > +	/*
> > +	 * All upper layers currently are never use transfer with more than
> > +	 * 2 messages.
> 
> Have you really checked ALL of the upper layers? And even if so, there is the dev-
> interface to userspace which allows for arbitrary I2C transfers using I2C_RDWR.
> 

We are using the next drivers on our switches: max11603, lm75, pmbus, mlxsw_minimal (last one is new, I wrote it to support Mellanox ASIC and it's has 32 byte limitation for I2C transaction chunk) and at24.

I am planning to add some code in the next patch, for handling bufferization for message length greater then data buffer. Allowed by HW.

Possibly I should add validation for "num" parameter at the beginning of mlxcpld_i2c_xfer?

> >  Actually, it's also not so relevant in Mellanox systems
> > +	 * because of HW limitation.
> 
> What kind of HW limitation do you mean here? Can Mellanox send more than
> two messages?
> 
> > Max size of transfer is o more than 20B
> 
> "is o more"? Typo?

Typo.
Max size of transfer is not more than 32 bytes.

> 
> > +	 * in current x86 LPCI2C bridge.
> 
> What does that mean in result?

In case more than 32 bytes of data length will be set in transaction, such message will fail length validation.
The 32 is HW limitation - 32 registers of DATAx.
In new version of LPCI2C logic, there is 64 registers, which can be used for data, and I am going to support it in next patch for this driver.

> 
> Regards,
> 
>    Wolfram

Thanks,

Vadim.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ