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]
Date:   Mon, 6 Jun 2022 22:00:58 +0300
From:   Pavel Skripkin <paskripkin@...il.com>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     Larry.Finger@...inger.net, phil@...lpotter.co.uk,
        straube.linux@...il.com, dan.carpenter@...cle.com,
        fmdefrancesco@...il.com, linux-kernel@...r.kernel.org,
        linux-staging@...ts.linux.dev
Subject: Re: [PATCH v2 2/4] staging: r8188eu: add error handling of rtw_read16

Hi Greg,

On 6/6/22 08:48, Greg KH wrote:
>> diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
>> index e67ecbd1ba79..6662ebc30f7b 100644
>> --- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
>> +++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
>> @@ -249,11 +249,14 @@ static void efuse_read_phymap_from_txpktbuf(
>>  		hi32 = cpu_to_le32(rtw_read32(adapter, REG_PKTBUF_DBG_DATA_H));
>>  
>>  		if (i == 0) {
>> +			u16 reg;
>> +
>>  			/* Although lenc is only used in a debug statement,
>>  			 * do not remove it as the rtw_read16() call consumes
>>  			 * 2 bytes from the EEPROM source.
>>  			 */
>> -			rtw_read16(adapter, REG_PKTBUF_DBG_DATA_L);
>> +			res = rtw_read16(adapter, REG_PKTBUF_DBG_DATA_L, &reg);
>> +			(void)res;
> 
> Same here, that line isn't ok.
> 
hm, that place is not obvious.

I guess, on-chip EEPROM acts like a FIFO, so this read must be completed 
w/o any errors, so I will simply propagate an error to callers

And will place another "FIXME" for further work :)

thanks,


With regards,
Pavel Skripkin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ