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: <20110406143010.2a0bccd0@mfleming-mobl1.ger.corp.intel.com>
Date:	Wed, 6 Apr 2011 14:30:10 +0100
From:	Matt Fleming <matt@...sole-pimps.org>
To:	Tejun Heo <tj@...nel.org>
Cc:	Oleg Nesterov <oleg@...hat.com>, linux-kernel@...r.kernel.org,
	Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	"H. Peter Anvin" <hpa@...or.com>,
	Matt Fleming <matt.fleming@...ux.intel.com>
Subject: Re: [RFC][PATCH 1/5] signals: Always place SIGCONT and SIGSTOP on
 'shared_pending'

On Wed, 6 Apr 2011 06:09:28 -0700
Tejun Heo <tj@...nel.org> wrote:

> Hey, guys.
> 
> On Wed, Apr 06, 2011 at 02:57:57PM +0200, Oleg Nesterov wrote:
> > But even SIGSTOP should be routed properly. If the process is
> > ptraced, the tracee reports SIGSTOP to the debugger first. This
> > means that tkill(SIGSTOP) should be delivered to the right target.
> 
> I think the more important part is that there really isn't much point
> in optimizing SIGSTOP/CONT.  They inherently involve heavy,
> walk-every-thread operations of putting them to sleep and reversing it
> and there isn't much point in optimizing sending SIGSTOP to stopped
> processes or CONT to running ones.  In addition, STOP/CONT interaction
> is already scary enough so I'd like to avoid adding complexities there
> if at all possible.
> 
> I think it would be better to concentrate on more usual signals.

Fair point. Note that none of the other patches try to optimize
SIGSTOP/CONT paths.

This patch was also my attempt to make my brain not explode while
figuring out the locking order. This was the first patch I wrote in
the series and it was before I'd decided on the order. In other words,
I was trying to eliminate any code where we'd do,

    tsk->sighand->action_lock
        tsk->siglock
            [Dequeue STOP signal from tsk->pending]
                tsk->sighand->siglock

because that complicates the locking order and this patch seemed like a
worthwhile cleanup. As it turns out, it's not a worthwhile/correct
cleanup so I'll have to think how I can handle those paths safely with
a different locking order.

-- 
Matt Fleming, Intel Open Source Technology Center
--
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