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]
Date:   Fri, 19 Mar 2021 14:58:16 +0800
From:   Zhou Yanjie <zhouyanjie@...yeetech.com>
To:     Wolfram Sang <wsa@...nel.org>
Cc:     paul@...pouillou.net, stable@...r.kernel.org,
        linux-mips@...r.kernel.org, linux-i2c@...r.kernel.org,
        linux-kernel@...r.kernel.org, dongsheng.qiu@...enic.com,
        aric.pzqi@...enic.com, sernia.zhou@...mail.com
Subject: Re: [PATCH] I2C: JZ4780: Fix bug for Ingenic X1000.

Hi Wolfram,


Sorry, please forgive my carefulness, I wrongly sent the version that 
did not clean up, resulting in missing the reporter's information and 
some errors in formats.


On 2021/3/19 上午1:06, Wolfram Sang wrote:
> On Fri, Mar 19, 2021 at 12:25:43AM +0800, 周琰杰 (Zhou Yanjie) wrote:
>> Only send "X1000_I2C_DC_STOP" when last byte, or it will cause
>> error when I2C write operation.
> Any write operation? I wonder then why nobody noticed before?


The standard I2C communication should look like this:

Read:

device_addr + w, reg_addr, device_addr + r, data;

Write:

device_addr + w, reg_addr, data;


But without this patch, it looks like this:

Read:

device_addr + w, reg_addr, device_addr + r, data;

Write:

device_addr + w, reg_addr, device_addr + w, data;

This is clearly not correct.


When I added support for X1000 to this driver, the hardware used was 
CU1000-Neo. On this hardware, there was an ADS7830 that communicated 
through I2C, but the operation of ADS7830 only involved read operations, 
so I was at that time failed to realize the problem with the write 
operation.
In addition, because X1000 did not implement relatively complete support 
in the mainline until the second half of 2020, there are still a large 
number of users who are still using the old SDK (kernel 3.10 and 
kernel4.4) provided by Ingenics, which may also be indirectly delayed 
exposure of this problem.


>> -			while ((i2c_sta & JZ4780_I2C_STA_TFNF) &&
>> -					(i2c->wt_len > 0)) {
>> +			while ((i2c_sta & JZ4780_I2C_STA_TFNF) && (i2c->wt_len > 0)) {
> This is a cosmetic change only IIUC. Shouldn't be in a bugfix.
>

My fault, I will remove it in the next version.


Thanks and best regards!


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ