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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080929150351.GB11245@Krystal>
Date:	Mon, 29 Sep 2008 11:03:51 -0400
From:	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Lai Jiangshan <laijs@...fujitsu.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH] markers: fix unregister bug and reenter bug

* Ingo Molnar (mingo@...e.hu) wrote:
> 
> * Lai Jiangshan <laijs@...fujitsu.com> wrote:
> 
> > unregister bug:
> > 
> > codes using makers are typically calling marker_probe_unregister()
> > and then destroying the data that marker_probe_func needs(or
> > unloading this module). This is bug when the corresponding
> > marker_probe_func is still running(on other cpus),
> > it is using the destroying/ed data.
> > 
> > we should call synchronize_sched() after marker_update_probes().
> > 
> > reenter bug:
> > 
> > marker_probe_register(), marker_probe_unregister() and
> > marker_probe_unregister_private_data() are not reentrant safe
> > functions. these 3 functions release markers_mutex and then
> > require it again and do "entry->oldptr = old; ...", but entry->oldptr
> > maybe is using now for these 3 functions may reenter when markers_mutex
> > is released.
> > 
> > we use synchronize_sched() instead of call_rcu_sched() to fix
> > this bug. actually we can do:
> > "
> > if (entry->rcu_pending)
> > 		rcu_barrier_sched();
> > "
> > after require markers_mutex again. but synchronize_sched()
> > is better and simpler. For these 3 functions are not critical path.
> > 
> > Signed-off-by: Lai Jiangshan <laijs@...fujitsu.com>
> 
> applied to tip/tracing/markers, thanks!
> 
> Mathieu, i've reactivated tip/tracing/markers for linux-next 
> integration, it propagates into auto-ftrace-next. Tracepoints are what 
> we use in the scheduler/etc. in tip/master, but until there's marker use 
> elsewhere there's no reason not to apply fix patches.
> 

nack for this patch. I'll my fix patchset.

Mathieu

> 	Ingo

-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
--
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