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, 24 Aug 2009 14:22:15 +0800
From:	Li Zefan <lizf@...fujitsu.com>
To:	Peter Zijlstra <peterz@...radead.org>
CC:	Ingo Molnar <mingo@...e.hu>, Steven Rostedt <rostedt@...dmis.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] tracing/profile: Fix profile_disable vs module_unload

Peter Zijlstra wrote:
> On Mon, 2009-08-24 at 12:19 +0800, Li Zefan wrote:
>> If the correspoding module is unloaded before ftrace_profile_disable()
>> is called, event->profile_disable() won't be called, which can
>> cause oops:
>>
>>   # insmod trace-events-sample.ko
>>   # perf record -f -a -e sample:foo_bar sleep 3 &
>>   # sleep 1
>>   # rmmod trace_events_sample
>>   # insmod trace-events-sample.ko
>>   OOPS!
>>
>> Signed-off-by: Li Zefan <lizf@...fujitsu.com>
> 
> 
> Hrmm, feel fragile, why don't we check if all a modules tracepoints are
> unused on unload?
> 

I don't think it's fragile. We are profiling via a module's
tracepoint, so we should pin the module, via module_get().
If event->profile_enable() has been calld, we should make
sure it's profile_disable() will be called.

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