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]
Date:   Tue, 13 Nov 2018 17:00:04 +0100
From:   Oleg Nesterov <oleg@...hat.com>
To:     Tejun Heo <tj@...nel.org>
Cc:     Roman Gushchin <guroan@...il.com>, cgroups@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel-team@...com,
        Roman Gushchin <guro@...com>
Subject: Re: [PATCH v2 3/6] cgroup: cgroup v2 freezer

Hi Tejun,

On 11/13, Tejun Heo wrote:
>
> > OK, please forget for now, but perhaps it would be more clean to add
> > JOBCTL_TRAP_FREEZE to the JOBCTL_PENDING_MASK check in recalc_sigpending()
> > and change get_signal to check JOBCTL_TRAP_MASK | JOBCTL_TRAP_FREEZE; and
> > I am not even sure cgroup_freezer_enter() should live in do_jobctl_trap().
>
> I'm sure you're aware of the context but just to refresh - one thing
> which was really broken about cgroup1 freezer was that it piggybacked
> on hibernation freezer and put frozen tasks in a state which is
> undefined when seen from userspace - they're just stuck in D sleep
> somewhere in the kernel.  That's fine when the whole system is not
> gonna be running, but not when only a subportion is being frozen.

Thanks, I see.

> So, the primary goal of cgroup2 freezer is putting the tasks in an
> equivalent state as jobctl stop.  It's a jobctl stop but controlled by
> cgroup frozen state, meaning that they can be killed, PTRACE_SEIZE'd
> and INTERRUPT'ed (PTRACE_ATTACH doesn't work as signal delivery should
> be blocked but that's fine) and so on.

And I agree, JOBCTL_TRAP_FREEZE looks fine.

Just somehow I _feel_ that we can improve this logic a bit, but let me
repeat that of course I can be easily wrong and I didn't even read the
patch yet.

Oleg.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ