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, 12 Sep 2014 11:40:10 +0200
From:	Frans Klaver <frans.klaver@...ns.com>
To:	Sebastian Andrzej Siewior <bigeasy@...utronix.de>
CC:	Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
	Peter Hurley <peter@...leysoftware.com>, <tony@...mide.com>,
	<gregkh@...uxfoundation.org>, <linux-kernel@...r.kernel.org>,
	<balbi@...com>, <linux-serial@...r.kernel.org>,
	<linux-omap@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>,
	Alan Cox <alan@...ux.intel.com>
Subject: Re: [PATCH 09/16] tty: serial: 8250_dma: Add a TX trigger workaround
 for AM33xx

On Fri, Sep 12, 2014 at 09:23:24AM +0200, Sebastian Andrzej Siewior wrote:
> On 09/11/2014 07:04 PM, Frans Klaver wrote:
> > On 11 September 2014 18:04:32 CEST, Sebastian Andrzej Siewior <bigeasy@...utronix.de> wrote:
> >> On 09/11/2014 05:11 PM, Frans Klaver wrote:
> >>
> >>> I can still reproduce it on am335x. I can get out of it as soon as
> >>> something else gets written to the console though.
> >>>
> >>> # echo "<3>something" >/dev/kmsg
> >>
> >> Is this to stall it or to get out of it?
> > 
> > This is to get out of it. I do this from an ssh connection after the console got stuck. The 3 kind of ensures the message is actually sent to ttyS0.
> 
> Interesting. This shouldn't do anything. If there is a TX operation in
> progress then ->start_tx() will simply return and the xmit buffer will
> be send once the current TX operation completes.
> 
> Is there anything I can do to reproduce this behavior?

I'm not sure. I just reproduced this on a boneblack, using your uart_v9
branch.

> This problem only pops-up if you use DMA. With disabled DMA you don't
> see this, right?

I get the lockup both with and without DMA enabled. Here's the 8250
config I use. Our full .config is attached in case it may provide
something relevant.

CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_DMA=y
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
CONFIG_SERIAL_8250_EXTENDED=y
# CONFIG_SERIAL_8250_MANY_PORTS is not set
# CONFIG_SERIAL_8250_SHARE_IRQ is not set
# CONFIG_SERIAL_8250_DETECT_IRQ is not set
# CONFIG_SERIAL_8250_RSA is not set
# CONFIG_SERIAL_8250_DW is not set
# CONFIG_SERIAL_8250_EM is not set
CONFIG_SERIAL_8250_OMAP=y
# Non-8250 serial port support
# CONFIG_DEBUG_LL_UART_8250 is not set
# CONFIG_DEBUG_UART_8250 is not set

FWIW:

root@...eblack:~# cat /proc/device-tree/compatible 
ti,am335x-boneti,am33xx
root@...eblack:~# udevadm info -a -p $(udevadm info -q path -n /dev/ttyS0)
	...
  looking at device '/devices/ocp/44e09000.serial/tty/ttyS0':
    KERNEL=="ttyS0"
    SUBSYSTEM=="tty"
    DRIVER==""
    ATTR{irq}=="88"
    ATTR{line}=="0"
    ATTR{port}=="0x0"
    ATTR{type}=="1"
    ATTR{flags}=="0x38600000"
    ATTR{iomem_base}=="0x44E09000"
    ATTR{custom_divisor}=="0"
    ATTR{iomem_reg_shift}=="2"
    ATTR{uartclk}=="48000000"
    ATTR{xmit_fifo_size}=="64"
    ATTR{close_delay}=="50"
    ATTR{closing_wait}=="3000"
    ATTR{io_type}=="2"

  looking at parent device '/devices/ocp/44e09000.serial':
    KERNELS=="44e09000.serial"
    SUBSYSTEMS=="platform"
    DRIVERS=="omap8250"
    ATTRS{driver_override}=="(null)"

  looking at parent device '/devices/ocp':
    KERNELS=="ocp"
    SUBSYSTEMS=="platform"
    DRIVERS==""
    ATTRS{driver_override}=="(null)"

Something that may also help: when I have a lockup on the boneblack, dma
is enabled and something is written to console like I described earlier,
I get the following bad irq:

[   34.197045] irq 30: nobody cared (try booting with the "irqpoll" option)
[   34.197078] CPU: 0 PID: 314 Comm: sh Tainted: G        W      3.17.0-rc3-00075-g3ef5e6d #69
[   34.197179] [<c0013454>] (unwind_backtrace) from [<c00113b0>] (show_stack+0x10/0x14)
[   34.197239] [<c00113b0>] (show_stack) from [<c005ca80>] (__report_bad_irq+0x28/0xb8)
[   34.197282] [<c005ca80>] (__report_bad_irq) from [<c005cecc>] (note_interrupt+0x1cc/0x270)
[   34.197324] [<c005cecc>] (note_interrupt) from [<c005b30c>] (handle_irq_event_percpu+0x110/0x130)
[   34.197364] [<c005b30c>] (handle_irq_event_percpu) from [<c005b368>] (handle_irq_event+0x3c/0x5c)
[   34.197401] [<c005b368>] (handle_irq_event) from [<c005d88c>] (handle_level_irq+0xd0/0x108)
[   34.197437] [<c005d88c>] (handle_level_irq) from [<c005ac0c>] (generic_handle_irq+0x20/0x30)
[   34.197474] [<c005ac0c>] (generic_handle_irq) from [<c000ee2c>] (handle_IRQ+0x60/0x80)
[   34.197509] [<c000ee2c>] (handle_IRQ) from [<c0008654>] (omap3_intc_handle_irq+0x64/0x8c)
[   34.197548] [<c0008654>] (omap3_intc_handle_irq) from [<c0011dc0>] (__irq_svc+0x40/0x54)
[   34.197562] Exception stack(0xdf5c9cf8 to 0xdf5c9d40)not ready
[   34.197581] 9ce0: df5c9d40 00400100
[   34.197611] 9d00: 00000100 ffffffc0 00000040 df5c8000 00000000 c077cf00 c077d4c0 c077cec0
[   34.197641] 9d20: c077d4c0 600f0013 0000000a df5c9d40 c00369c0 c0036a20 200f0113 ffffffff
[   34.197688] [<c0011dc0>] (__irq_svc) from [<c0036a20>] (__do_softirq+0x78/0x1f4)s/Full - flow control rx/tx 
[   34.197723] [<c0036a20>] (__do_softirq) from [<c0036db8>] (irq_exit+0x80/0xdc)
[   34.197756] [<c0036db8>] (irq_exit) from [<c000ee30>] (handle_IRQ+0x64/0x80)
[   34.197789] [<c000ee30>] (handle_IRQ) from [<c0008654>] (omap3_intc_handle_irq+0x64/0x8c)
[   34.197825] [<c0008654>] (omap3_intc_handle_irq) from [<c0011dc0>] (__irq_svc+0x40/0x54)
[   34.197837] Exception stack(0xdf5c9db8 to 0xdf5c9e00):Link
[   34.197853] 9da0: 00000000 00000000
[   34.197881] 9dc0: 00000002 df0b9e10 00000003 000008d0 00000030 00000062 c077d4c0 c077d4c0
[   34.197911] 9de0: c077d4c0 600f0013 00000000 df5c9e00 c0058670 c00594fc 600f0013 ffffffff
[   34.197952] [<c0011dc0>] (__irq_svc) from [<c00594fc>] (console_unlock+0x1c8/0x368)
[   34.197989] [<c00594fc>] (console_unlock) from [<c0059ac0>] (vprintk_emit+0x424/0x46c)
[   34.198029] [<c0059ac0>] (vprintk_emit) from [<c04cd420>] (printk_emit+0x1c/0x24)
[   34.198067] [<c04cd420>] (printk_emit) from [<c0059c7c>] (devkmsg_writev+0x150/0x184)
[   34.198109] [<c0059c7c>] (devkmsg_writev) from [<c00bf730>] (do_sync_write+0x6c/0x90)
[   34.198145] [<c00bf730>] (do_sync_write) from [<c00bffe0>] (vfs_write+0xd4/0x1bc)
[   34.198179] [<c00bffe0>] (vfs_write) from [<c00c05d4>] (SyS_write+0x3c/0x7c)
[   34.198213] [<c00c05d4>] (SyS_write) from [<c000e540>] (ret_fast_syscall+0x0/0x30)
[   34.198222] handlers:tained, lease time 86400
[   34.198249] [<c001a378>] dma_ccerr_handler.1
[   34.198258] Disabling IRQ #30.

Full dmesg is also attached.

Hope you find something useful in there.

Thanks,
Frans

View attachment ".config" of type "text/plain" (79631 bytes)

View attachment "bbdmesg" of type "text/plain" (17381 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ