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]
Message-ID: <20111214140527.GA18080@thunk.org>
Date:	Wed, 14 Dec 2011 09:05:27 -0500
From:	Ted Ts'o <tytso@....edu>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Alan Cox <alan@...rguk.ukuu.org.uk>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Greg KH <greg@...ah.com>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: printk() vs tty_io

On Wed, Dec 14, 2011 at 11:56:46AM +0100, Peter Zijlstra wrote:
> 
> Well, this was the 8250 serial port driver doing wakeups. Its a simple
> on-board serial port,
> 
> [   29.797007]        [<ffffffff8108a650>] __wake_up_common+0x4e/0x84
> [   29.797007]        [<ffffffff8108d6ea>] __wake_up+0x39/0x4d
> [   29.797007]        [<ffffffff8135d0db>] tty_wakeup+0x5b/0x60
> [   29.797007]        [<ffffffff81373fb9>] uart_write_wakeup+0x21/0x23
> [   29.797007]        [<ffffffff81376899>] transmit_chars+0xd8/0x12f
> [   29.797007]        [<ffffffff81377f3a>] serial8250_handle_port+0x2d9/0x2fd
> [   29.797007]        [<ffffffff81377fcb>] serial8250_handle_irq+0x16/0x1d
> [   29.797007]        [<ffffffff81377ff5>] serial8250_default_handle_irq+0x23/0x27
> [   29.797007]        [<ffffffff81377ade>] serial8250_interrupt+0x4d/0xc6
> [   29.797007]        [<ffffffff810c9ae8>] handle_irq_event_percpu+0xab/0x1fc
> [   29.797007]        [<ffffffff810c9c7a>] handle_irq_event+0x41/0x61
> [   29.797007]        [<ffffffff810cc4cd>] handle_edge_irq+0xd1/0xf6
> [   29.797007]        [<ffffffff8103ab85>] handle_irq+0x24/0x2f
> [   29.797007]        [<ffffffff8150acdd>] do_IRQ+0x4d/0xb3
> 
> which places the wakeup under uport->lock, serial8250_console_write()
> takes uport->lock, under console_sem, connecting the locks.

printk() goes through serial8250_console_write() which writes to the
UART device using a busy loop, with local IRQ's disabled.  So it's not
serial8250_console_write() which is waking things up; this is coming
form interrupt handler running on some different CPU.

Am I missing something?

						- Ted

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ