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  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]
Date:   Sat, 8 Aug 2020 16:19:42 +0800
From:   kernel test robot <lkp@...el.com>
To:     Christoph Hellwig <hch@....de>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Tony Luck <tony.luck@...el.com>
Subject: drivers/tty/serial/mvebu-uart.c:605 mvebu_uart_putc() warn: this
 loop depends on readl() succeeding

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   449dc8c97089a6e09fb2dac4d92b1b7ac0eb7c1e
commit: 05933aac7b11911955de307a329dc2a7a14b7bd0 ia64: remove now unused machvec indirections
date:   12 months ago
config: ia64-randconfig-m031-20200808 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

New smatch warnings:
drivers/tty/serial/mvebu-uart.c:605 mvebu_uart_putc() warn: this loop depends on readl() succeeding

Old smatch warnings:
drivers/tty/serial/mvebu-uart.c:293 mvebu_uart_rx_chars() warn: this loop depends on readl() succeeding

vim +605 drivers/tty/serial/mvebu-uart.c

30530791a7a032 Wilson Ding   2016-02-16  595  
30530791a7a032 Wilson Ding   2016-02-16  596  #ifdef CONFIG_SERIAL_MVEBU_CONSOLE
30530791a7a032 Wilson Ding   2016-02-16  597  /* Early Console */
30530791a7a032 Wilson Ding   2016-02-16  598  static void mvebu_uart_putc(struct uart_port *port, int c)
30530791a7a032 Wilson Ding   2016-02-16  599  {
30530791a7a032 Wilson Ding   2016-02-16  600  	unsigned int st;
30530791a7a032 Wilson Ding   2016-02-16  601  
30530791a7a032 Wilson Ding   2016-02-16  602  	for (;;) {
30530791a7a032 Wilson Ding   2016-02-16  603  		st = readl(port->membase + UART_STAT);
30530791a7a032 Wilson Ding   2016-02-16  604  		if (!(st & STAT_TX_FIFO_FUL))
30530791a7a032 Wilson Ding   2016-02-16 @605  			break;
30530791a7a032 Wilson Ding   2016-02-16  606  	}
30530791a7a032 Wilson Ding   2016-02-16  607  
5218d76958644a Miquel Raynal 2017-10-13  608  	/* At early stage, DT is not parsed yet, only use UART0 */
5218d76958644a Miquel Raynal 2017-10-13  609  	writel(c, port->membase + UART_STD_TSH);
30530791a7a032 Wilson Ding   2016-02-16  610  
30530791a7a032 Wilson Ding   2016-02-16  611  	for (;;) {
30530791a7a032 Wilson Ding   2016-02-16  612  		st = readl(port->membase + UART_STAT);
30530791a7a032 Wilson Ding   2016-02-16  613  		if (st & STAT_TX_FIFO_EMP)
30530791a7a032 Wilson Ding   2016-02-16  614  			break;
30530791a7a032 Wilson Ding   2016-02-16  615  	}
30530791a7a032 Wilson Ding   2016-02-16  616  }
30530791a7a032 Wilson Ding   2016-02-16  617  

:::::: The code at line 605 was first introduced by commit
:::::: 30530791a7a032dc27dbbab56b8afabd5138074c serial: mvebu-uart: initial support for Armada-3700 serial port

:::::: TO: Wilson Ding <dingwei@...vell.com>
:::::: CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (36866 bytes)

Powered by blists - more mailing lists