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:	Fri, 2 Mar 2007 13:35:49 -0800
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	Anton Blanchard <anton@...ba.org>, Andrew Morton <akpm@...l.org>,
	Pavel Machek <pavel@....cz>,
	LKML <linux-kernel@...r.kernel.org>,
	Oleg Nesterov <oleg@...sign.ru>,
	Aneesh Kumar <aneesh.kumar@...il.com>,
	Srivatsa Vaddagiri <vatsa@...ibm.com>,
	Gautham R Shenoy <ego@...ibm.com>
Subject: Re: [PATCH -mm 3/7] Freezer: Remove PF_NOFREEZE from rcutorture thread

On Thu, Mar 01, 2007 at 08:54:25PM +0100, Rafael J. Wysocki wrote:
> On Thursday, 1 March 2007 20:38, Anton Blanchard wrote:
> > 
> > Hi,
> > 
> > > Remove PF_NOFREEZE from the rcutorture thread, adding a
> > > try_to_freeze() call as required.
> > 
> > ...
> > 
> > > @@ -607,6 +607,7 @@ rcu_torture_writer(void *arg)
> > >  		}
> > >  		rcu_torture_current_version++;
> > >  		oldbatch = cur_ops->completed();
> > > +		try_to_freeze();
> > >  	} while (!kthread_should_stop() && !fullstop);
> > >  	VERBOSE_PRINTK_STRING("rcu_torture_writer task stopping");
> > >  	while (!kthread_should_stop())
> > 
> > I wonder if it makes sense to embed try_to_freeze() into the kthread
> > API somewhere. Short of that we should document the try_to_freeze()
> > requirement in the kthread documentation... Unfortunately I cant find
> > any kthread docs in Documentation/ :)
> 
> Well, the patch is from Paul, so I think he'll be able to comment. :-)

We certainly either need to embed try_to_freeze() into kthread_should_stop()
or add back the rcu_torture_fakewriter(), and rcu_torture_reader()
components of this patch.  ;-)

One way to embed try_to_freeze() into kthread_should_stop() might be
as follows:

	int kthread_should_stop(void)
	{
		if (kthread_stop_info.k == current)
			return 1;
		try_to_freeze();
		return 0;
	}

Does this seem reasonable?  It certainly would cut down some of the
code required for freezing -- and reduce the potential for bugs.

							Thanx, Paul
-
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