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, 29 Mar 2011 20:27:41 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	jan.kratochvil@...hat.com, vda.linux@...glemail.com,
	linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
	akpm@...ux-foundation.org, indan@....nu, roland@...k.frob.com
Subject: Re: [PATCH 1/3] signal: Make signal_wake_up() take @sig_type
	instead of @resume

On 03/29, Tejun Heo wrote:
>
> -void signal_wake_up(struct task_struct *t, int resume)
> +void signal_wake_up(struct task_struct *t, int sig_type)
>  {
> -	unsigned int mask;
> +	unsigned int uninitialized_var(mask);
>
>  	set_tsk_thread_flag(t, TIF_SIGPENDING);
> 
> -	/*
> -	 * For SIGKILL, we want to wake it up in the stopped/traced/killable
> -	 * case. We don't check t->state here because there is a race with it
> -	 * executing another processor and just now entering stopped state.
> -	 * By using wake_up_state, we ensure the process will wake up and
> -	 * handle its death signal.
> -	 */
> -	mask = TASK_INTERRUPTIBLE;
> -	if (resume)
> -		mask |= TASK_WAKEKILL;
> +	switch (sig_type) {
> +	case 0:
> +		mask = TASK_INTERRUPTIBLE;
> +		break;
> +
> +	case SIGKILL:
> +		/*
> +		 * For SIGKILL, we want to wake it up in the stopped /
> +		 * traced / killable case.  We don't check t->state here
> +		 * because there is a race with it executing another
> +		 * processor and just now entering stopped state.  By using
> +		 * wake_up_state, we ensure the process will wake up and
> +		 * handle its death signal.
> +		 */
> +		mask |= TASK_INTERRUPTIBLE | TASK_WAKEKILL;
> +		break;

Interesting... Yes, I was thinking about changing signal_wake_up()
too, my intent was to pass TASK_* mask directly.

But your approach looks more clean. So, to me 1-2 look as the nice
cleanups in any case.

But let me think more about 3/3. I still think we do not want this.
But I need the fresh head to undestand what I actually have in mind.
Perhaps nothing, just the wrong feeling.

Oleg.

--
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