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: <20111121184939.GA25776@google.com>
Date:	Mon, 21 Nov 2011 10:49:39 -0800
From:	Tejun Heo <tj@...nel.org>
To:	Guennadi Liakhovetski <g.liakhovetski@....de>,
	Dan Williams <dan.j.williams@...el.com>
Cc:	Stephen Rothwell <sfr@...b.auug.org.au>, rjw@...k.pl,
	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Vinod Koul <vinod.koul@...el.com>,
	Nicolas Ferre <nicolas.ferre@...el.com>
Subject: Re: [PATCH] dmatest: don't use set_freezable_with_signal()

On Mon, Nov 21, 2011 at 10:43:16AM -0800, Tejun Heo wrote:
> Commit 981ed70d8e (dmatest: make dmatest threads freezable) made
> dmatest kthread use set_freezable_with_signal(); however, the
> interface is scheduled to be removed in the next merge window.
> 
> The problem is that unlike userland tasks there's no default place
> which handles signal pending state and it isn't clear who owns and/or
> is responsible for clearing TIF_SIGPENDING.  For example, in the
> current code, try_to_freeze() clears TIF_SIGPENDING but it isn't sure
> whether it actually owns the TIF_SIGPENDING nor is it race-free -
> ie. the task may continue to run with TIF_SIGPENDING set after the
> freezable section.
> 
> Unfortunately, we don't have wait_for_completion_freezable_timeout().
> This patch open codes it and uses wait_event_freezable_timeout()
> instead and removes timeout reloading - wait_event_freezable_timeout()
> won't return across freezing events (currently racy but fix scheduled)
> and timer doesn't decrement while the task is in freezer.  Although
> this does lose timer-reset-over-freezing, given that timeout is
> supposed to be long enough and failure to finish inside is considered
> irrecoverable, I don't think this is worth the complexity.
> 
> While at it, move completion to outer scope and explain that we're
> ignoring dangling pointer problem after timeout.  This should give
> slightly better chance at avoiding oops after timeout.
> 
> Signed-off-by: Tejun Heo <tj@...nel.org>
> Cc: Guennadi Liakhovetski <g.liakhovetski@....de>
> Cc: Dan Williams <dan.j.williams@...el.com>
> Cc: Nicolas Ferre <nicolas.ferre@...el.com>
> ---
> Guennadi, Dan, how does this look?  If it's okay, do you guys mind
> routing this through pm tree?  I have some patches stacked on top
> removal of freezable_with_signal and it would be much easier to route
> these together.

Ooh, forgot to mention that it's only compile tested.

Thanks.

-- 
tejun
--
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