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: <1343746311.27983.52.camel@gandalf.stny.rr.com>
Date:	Tue, 31 Jul 2012 10:51:51 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	paulmck@...ux.vnet.ibm.com
Cc:	Fengguang Wu <fengguang.wu@...el.com>,
	Steven Rostedt <srostedt@...hat.com>,
	LKML <linux-kernel@...r.kernel.org>,
	David Howells <dhowells@...hat.com>
Subject: Re: __update_max_tr: rcu_read_lock() used illegally while idle!

On Tue, 2012-07-31 at 07:44 -0700, Paul E. McKenney wrote:

> > Found it (and Cc'd David).
> > 
> > In __update_max_tr() we have:
> > 
> > 	max_data = task_uid(tsk);
> > 
> > where task_uid() is:
> > 
> > #define task_uid(task)		(task_cred_xxx((task), uid))
> > 
> > #define task_cred_xxx(task, xxx)			\
> > ({							\
> > 	__typeof__(((struct cred *)NULL)->xxx) ___val;	\
> > 	rcu_read_lock();				\
> > 	___val = __task_cred((task))->xxx;		\
> > 	rcu_read_unlock();				\
> > 	___val;						\
> > })
> > 
> > The __update_max_tr() is called at every location interrupts are enabled
> > (and a max time is discovered). But now this can include places that
> > rcu_read_lock can not be called, I'm not sure how to handle this. Is
> > there a non rcu way to get a tasks uid?
> 
> OK, I will bite.  How about using something like RCU_NONIDLE(), either
> directly or open-coded, to make it a legal call site?

OK, then something like:

	RCU_NONIDLE(max_data = task_uid(tsk));

would work when called normally or with idle?

-- Steve


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