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: <alpine.DEB.2.11.1506151855160.4120@nanos>
Date:	Mon, 15 Jun 2015 18:56:29 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Mason <slash.tmp@...e.fr>
cc:	LKML <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [Semaphore API] down_interruptible_timeout

On Mon, 15 Jun 2015, Mason wrote:
> A) process-context kernel thread fills a FIFO and calls down(&fifo_empty);
> B) ISR handles the FIFO-empty interrupt with up(&fifo_empty);
> 
> However, in case something goes wrong and the interrupt never fires,
> I don't want the process to be stuck in an uninterruptible sleep.
> 
> Perhaps I can set a tiny timeout (e.g. 10 µs) and not worry about
> the interruptible part for such a small duration? (Hmm, __down_common
> calls schedule_timeout, which is jiffies-based. I don't think there
> is a hrtimers flavor. So µs timeouts would be off the table?)
> 
> Or I could use the interruptible version, and let the user kill the
> operation if necessary.

Use a completion.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ