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:	Wed, 9 Jul 2008 18:11:59 +0200
From:	"Leon Woestenberg" <leon.woestenberg@...il.com>
To:	"Ingo Molnar" <mingo@...e.hu>,
	"Linux Kernel List" <linux-kernel@...r.kernel.org>,
	"Peter Zijlstra" <a.p.zijlstra@...llo.nl>,
	"Linux-RT Kernel List" <linux-rt-users@...r.kernel.org>,
	"Steven Rostedt" <rostedt@...dmis.org>,
	"Thomas Gleixner" <tglx@...utronix.de>,
	"Leon Woestenberg" <leon@...ebranch.com>,
	"John Kacur" <jkacur@...il.com>
Subject: Re: [PATCH 2.6.24.7-rt14 v2] rt: {queue,schedule}_work_prio() allowing work priorities other than caller's priority

Hello,

On Sat, Jul 5, 2008 at 2:59 PM,  <leon.woestenberg@...il.com> wrote:
> The faulty case was a non-FIFO serial driver that deferred LED blinking to
> a workqueue using schedule_work(). However, that work used GPIO bitbanged I2C,
> which uses 50 usecs udelay()s. With the work inheriting the serial IRQ priority,
> it easily missed the ~60 usec deadline of 115200 bps communications.
>
John Kacur asked forthe (custom) code showing this case on IRC.

I suspect the current kernel also has drivers that *also* depend on
workqueue's not pre-empting or delaying their calling interrupt
handler.


See http://www.sidebranch.com/leon/ for the code. A short file roadmap
and explanation of the analysis:

lowlevel_16550.c: non-FIFO UART driver
axonbus.c: protocol handler
max7311.c: I2C -> GPIO extender, driving a few LEDs.

Queueing the "blink a LED" work happens in this code path:

lowlevel_16550.c:axonbus_isr() -> axonbus.c:ab_cmd_receive() ->
boardsupport.c:ll_blink()

The queued work then performs this code path, running at the same
real-time priority as the originating IRQ:
ll_blink_work() -> do_max7311_read() -> i2c-algo-bit.c:* -> udelay(50)

The udelay(50) thus keeps the 16550 interrupt from being serviced.

Scheduling the work at lower priority solved this.

Regards,

Leon.

p.s. we will submit the max7311 driver for upstream.
--
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