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: <ZzYo19k9ZvkC7V-1@slm.duckdns.org>
Date: Thu, 14 Nov 2024 06:44:07 -1000
From: Tejun Heo <tj@...nel.org>
To: Chen Ridong <chenridong@...weicloud.com>
Cc: Valentin Schneider <vschneid@...hat.com>, mingo@...hat.com,
	peterz@...radead.org, juri.lelli@...hat.com,
	vincent.guittot@...aro.org, dietmar.eggemann@....com,
	rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
	mkoutny@...e.com >> Michal Koutný <mkoutny@...e.com>,
	linux-kernel@...r.kernel.org, wangweiyang2@...wei.com,
	cgroups@...r.kernel.org
Subject: Re: [PATCH] freezer, sched: report the frozen task stat as 'D'

Hello,

On Thu, Nov 14, 2024 at 03:47:58PM +0800, Chen Ridong wrote:
> On 2024/11/13 22:34, Valentin Schneider wrote:
> > On 11/11/24 13:54, Chen Ridong wrote:
> >> From: Chen Ridong <chenridong@...wei.com>
> >>
> >> Before the commit f5d39b020809 ("freezer,sched: Rewrite core freezer
> >> logic"), the frozen task stat was reported as 'D' in cgroup v1.
> >> However, after rewriting core freezer logic, the frozen task stat is
> >> reported as 'R'. This is confusing, especially when a task with stat of
> >> 'S' is frozen.
> >>
> >> This can be reproduced as bellow step:
> >> cd /sys/fs/cgroup/freezer/
> >> mkdir test
> >> sleep 1000 &
> >> [1] 739         // task whose stat is 'S'
> >> echo 739 > test/cgroup.procs
> >> echo FROZEN > test/freezer.state
> >> ps -aux | grep 739
> >> root     739  0.1  0.0   8376  1812 pts/0    R    10:56   0:00 sleep 1000
> >>
> >> As shown above, a task whose stat is 'S' was changed to 'R' when it was
> >> frozen. To solve this issue, simply maintain the same reported state as
> >> before the rewrite.

The whole point of the freezer rewrite was preventing userspace from causing
arbitrary and indefinite D states which leads to all sorts of problems. The
tasks in cgroup2 freezer are *not* in uninterruptible sleeps. They are in
task stop loops and thus can be killed, ptraced and so on. It *should*
report S.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ