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:   Wed, 20 Feb 2019 22:14:29 +0000
From:   Roman Gushchin <guro@...com>
To:     Oleg Nesterov <oleg@...hat.com>
CC:     Roman Gushchin <guroan@...il.com>, Tejun Heo <tj@...nel.org>,
        Kernel Team <Kernel-team@...com>,
        "cgroups@...r.kernel.org" <cgroups@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v8 4/7] cgroup: cgroup v2 freezer

On Wed, Feb 20, 2019 at 03:42:02PM +0100, Oleg Nesterov wrote:
> On 02/19, Roman Gushchin wrote:
> >
> > @@ -2065,6 +2066,7 @@ static void ptrace_stop(int exit_code, int why, int clear_code, kernel_siginfo_t
> >  		preempt_disable();
> >  		read_unlock(&tasklist_lock);
> >  		preempt_enable_no_resched();
> > +		cgroup_enter_stopped();
> >  		freezable_schedule();
> >  	} else {
> >  		/*
> > @@ -2243,6 +2245,7 @@ static bool do_signal_stop(int signr)
> >  		}
> >  
> >  		/* Now we don't run again until woken by SIGCONT or SIGKILL */
> > +		cgroup_enter_stopped();
> >  		freezable_schedule();
> >  		return true;
> 
> Please see my reply to 0/7.

Answered in that thread.

> 
> > @@ -2280,7 +2286,8 @@ static void do_jobctl_trap(void)
> >  		    !(signal->flags & SIGNAL_STOP_STOPPED))
> >  			signr = SIGTRAP;
> >  		WARN_ON_ONCE(!signr);
> > -		ptrace_do_notify(signr, signr | (PTRACE_EVENT_STOP << 8),
> > +		ptrace_do_notify(signr,
> > +				 signr | (PTRACE_EVENT_STOP << 8),
> >  				 CLD_STOPPED);
> 
> white-space cleanup?

Sorry, a bogus change. Please, ignore it.

> 
> > @@ -2363,7 +2419,8 @@ bool get_signal(struct ksignal *ksig)
> >  	 * we should notify the parent, prepare_signal(SIGCONT) encodes
> >  	 * the CLD_ si_code into SIGNAL_CLD_MASK bits.
> >  	 */
> > -	if (unlikely(signal->flags & SIGNAL_CLD_MASK)) {
> > +	if (unlikely(signal->flags & SIGNAL_CLD_MASK) &
> > +	    !(current->jobctl & JOBCTL_TRAP_FREEZE)) {
> 
> Hmm, why?

If a process is going from the stopped to the frozen state, it looks like
it's better to delay parent's notification up to the moment when it will
actually run.

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ