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>] [day] [month] [year] [list]
Message-ID: <1446535643.874287476@f26.i.mail.ru>
Date:	Tue, 03 Nov 2015 10:27:23 +0300
From:	Alexander Shiyan <shc_work@...l.ru>
To:	Alexander Shi <alexandershi@...ometrics.ca>
Cc:	James Nuss <jamesnuss@...ometrics.ca>,
	linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: Unreliable register being read in max310x UART driver

Hello.

> Понедельник,  2 ноября 2015, 10:24 -05:00 от Alexander Shi <alexandershi@...ometrics.ca>:
> 
> Hello all,
>  
> The datasheet for MAX3107 UART ( http://datasheets.maximintegrated.com/en/ds/MAX3107.pdf ) was updated in February 2015 with a notice that the RxFIFOLvl register may be inaccurate if read while being updated. The respective max310x.c driver in the kernel actively makes use of the RxFIFOLvl register, but has not been updated since the notice was posted. Does anyone have a workaround to this bug?
>  
> The notice was phrased as follows:
> “The RxFIFOLvl register represents the current number of words in the receive FIFO whenever the receive UART is idle. When the receive UART actively receives characters, the value in this register can sometimes be inaccurate if this register is read at the same time that the receive UART updates the receive FIFO. To manage the receive FIFO even when the receive UART is active, do not use this register to determine receive FIFO state. Use the RFIFOEmptyInt bit, the RxTrgInt bit, and the RTimeOut bit instead.”
>  
> Thanks,
> Alex

On my opinion this should not be a problem.
The RX interrupt will be triggered once again if we lost RX level value.
Anyway, you can add one check after reading rxfifolvl register:
  if (!(ists & MAX310X_IRQ_RXEMPTY_BIT))
    rxlen = 1;

Thanks.
---

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ