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:	Mon, 25 Apr 2011 18:01:15 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"Nikita V. Youshchenko" <nyoushchenko@...sta.com>,
	Matt Fleming <matt@...sole-pimps.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] signal: do_sigtimedwait() needs
	retarget_shared_pending()

On 04/25, Tejun Heo wrote:
>
> > @@ -2322,7 +2327,8 @@ int do_sigtimedwait(sigset_t *these, sig
> >  		/*
> >  		 * None ready -- temporarily unblock those we're
> >  		 * interested while we are sleeping in so that we'll
> > -		 * be awakened when they arrive.
> > +		 * be awakened when they arrive. Unblocking is always
> > +		 * fine, we can avoid set_current_blocked().
> >  		 */
> >  		tsk->real_blocked = tsk->blocked;
> >  		sigandsets(&tsk->blocked, &tsk->blocked, these);
>
> Maybe it would be a good idea to introduce a new helper which checks /
> enforces that the operation indeed is only unblocking?

I hope nobody will change ->blocked directly, except this function
and force_sig_info(). And daemonize/allow_signal/disallow_signal, but
there are special and probably we can already kill this deprecated
block/unblock code and forbid kernel_thread(CLONE_SIGHAND) + daemonize().
In fact I think daemonize() should go away.

So, I don't really think we need another helper to unblock something.

> Also, it can
> be a pure preference but I think _locked suffix is better / more
> common for APIs which expect the caller to be responsible for locking.

Again, I can rename... Cough, but in this case please simply suggest
another name. set_tsk_blocked_locked?

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