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: <Zo1ntduTPiF8Gmfl@slm.duckdns.org>
Date: Tue, 9 Jul 2024 06:39:17 -1000
From: Tejun Heo <tj@...nel.org>
To: Pavel Begunkov <asml.silence@...il.com>
Cc: Oleg Nesterov <oleg@...hat.com>, io-uring@...r.kernel.org,
	Jens Axboe <axboe@...nel.dk>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Christian Brauner <brauner@...nel.org>,
	Tycho Andersen <tandersen@...flix.com>,
	Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org,
	Julian Orth <ju.orth@...il.com>,
	Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH 2/2] kernel: rerun task_work while freezing in
 get_signal()

Hello,

On Tue, Jul 09, 2024 at 03:05:21PM +0100, Pavel Begunkov wrote:
> > -----------------------------------------------------------------------
> > Either way I have no idea whether a cgroup_task_frozen() task should
> > react to task_work_add(TWA_SIGNAL) or not.
> > 
> > Documentation/admin-guide/cgroup-v2.rst says
> > 
> > 	Writing "1" to the file causes freezing of the cgroup and all
> > 	descendant cgroups. This means that all belonging processes will
> > 	be stopped and will not run until the cgroup will be explicitly
> > 	unfrozen.
> > 
> > AFAICS this is not accurate, they can run but can't return to user-mode.
> > So I guess task_work_run() is fine.
> 
> IIUC it's a user facing doc, so maybe it's accurate enough from that
> perspective. But I do agree that the semantics around task_work is
> not exactly clear.

A good correctness test for cgroup freezer is whether it'd be safe to
snapshot and restore the tasks in the cgroup while frozen. If that works,
it's most likely fine.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ