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:	Thu, 10 Apr 2014 21:15:25 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Frederic Weisbecker <fweisbec@...il.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH 1/5] sched: Convert thread_group_cputime() to use
	for_each_thread()

On 04/10, Peter Zijlstra wrote:
>
> On Thu, Apr 10, 2014 at 07:29:38PM +0200, Oleg Nesterov wrote:
>
> > > +static inline __deprecated
> > > +struct task_struct *next_thread(const struct task_struct *p)
> > >  {
> >
> > Not sure... But probably fine too.
> >
> > I already killed some users of next_thread(). This reminds me about
> > next_tid(), probably it should be converted too.
> >
> > As for, say, __exit_signal() it really needs next_thread(). We can fix
> > it instead of deprecating, or we can add another one with another name.
>
> Well, your Changelog said that next_thread() was faulty too;

If lockless. Sure.

> if
> __exit_signal() is the only site where it is correct we can open-code it
> there. If there's more we should probably create a new function and
> audit all current sites.

So far I can see only 2 users, __exit_signal() and complete_signal().

May be next_tid(), but in fact it needs next_thread_or_zero(). And this
connects to check_hung_task(). What they actually (OK, perhaps) need is
for_each_thread_continue, like list_for_each_entry_continue_rcu.

We will see. I didn't finish this all because I was distracted (and lazy
of course ;).

My plan (== TODO) was:

	- check all current users, carefully convert those who need
	  a special attention (because the semantics differs a bit)

	- the same for thread_group_empty()

	- reimplement next_thread/while_each_thread via ->thread_head

	- kill task_struct->thread_group

	- all other users can be converted later

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