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: <20111128160844.GB18864@google.com>
Date:	Mon, 28 Nov 2011 08:08:44 -0800
From:	Tejun Heo <tj@...nel.org>
To:	Cyrill Gorcunov <gorcunov@...il.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Li Zefan <lizf@...fujitsu.com>,
	Matt Helsley <matthltc@...ibm.com>,
	Andrey Vagin <avagin@...nvz.org>,
	Pavel Emelyanov <xemul@...allels.com>
Subject: Re: [RFC] cgroups: freezer -- Allow to attach a task to a frozen
 cgroup

On Mon, Nov 28, 2011 at 04:08:13PM +0400, Cyrill Gorcunov wrote:
> In checkpoint/restore we need an ability to attach pids to
> a frozen cgroup. Thus once pid reaches a frozen cgroup it is
> not rejected, but the task get frozen immediately.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov@...nvz.org>
> ---
> 
> I would really appreciate complains and comments.

First of all, both freezer and cgroup have non-trivial pending
patchsets (e.g. ->can_attach_task() is scheduled for removal) and I
have changes which basically try to achieve about the same thing, so
let's slow down a bit.  I think the problem is a bit more complex.

Some thoughts I have on cgroup freezer ATM,

* Currently, FROZEN -> FREEZING transition isn't possible.  That's why
  event transition detection by polling is acceptable.  ie. once the
  state is polled to be FROZEN, it stays frozen.  Allowing FREEZING ->
  FROZEN transition would probably require improvements to state
  transition notification too, at the very least, clarification of
  rules.

* There are some unclear corner cases and bugs the current cgroup
  freezer has.  e.g. behavior w.r.t. kthreads is outright buggy.  It
  would be great to figure out how to deal with them with or before
  this change (ie. what happens when you transfer unfreezable
  kthreads).

* A pending feature request is making the freezing action atomically
  recursive.  We'll probably need to add a param to allow choosing
  which behavior to take.

* Another improvement that I want to have is allowing cgroup frozen
  tasks to be killed.  I don't think this matters for system freezer
  but for cgroup freezer both oom killer and systemd want it.

So, while I agree with the direction of this patch, I think this
definitely needs a lot more work to go in.  I don't think we can do
much until the freezer and cgroup changes are settled.  The freezer
part is now in Rafael's tree, the cgroup part is going under Linus'
review.  Once they're complete, I'll provide a merged branch that
further cgroup works can be based on.

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