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: <c62985530812161438m2490e67dk42d79cd7fc1f1365@mail.gmail.com>
Date:	Tue, 16 Dec 2008 23:38:51 +0100
From:	"Frédéric Weisbecker" <fweisbec@...il.com>
To:	"Ingo Molnar" <mingo@...e.hu>
Cc:	"Steven Rostedt" <rostedt@...dmis.org>,
	"Linux Kernel" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] tracing/ftrace: use preempt_enable_no_resched_notrace in ring_buffer_time_stamp()

2008/12/16 Ingo Molnar <mingo@...e.hu>:
>
> * Frédéric Weisbecker <fweisbec@...il.com> wrote:
>
>> 2008/12/16 Ingo Molnar <mingo@...e.hu>:
>> >
>> > * Frederic Weisbecker <fweisbec@...il.com> wrote:
>> >
>> >> Impact: prevent a trace recursion
>> >>
>> >> After some tests with function graph tracer under x86-32, I saw some recursions
>> >> caused by ring_buffer_time_stamp() that calls preempt_enable_no_notrace() which
>> >> calls preempt_schedule() which is traced itself.
>> >>
>> >> This patch re-enables preemption without rescheduling.
>> >>
>> >> Cc: Steven Rostedt <rostedt@...dmis.org>
>> >> Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
>> >> ---
>> >>  kernel/trace/ring_buffer.c |    2 +-
>> >>  1 files changed, 1 insertions(+), 1 deletions(-)
>> >
>> > applied to tip/tracing/ftrace, thanks Frederic!
>> >
>> > Does this explain+fix the weird crashes/reboots you were seeing?
>> >
>> >        Ingo
>> >
>>
>> No, actually the functions tracers are protected against recursion,
>> but rescheduling attempts
>> during all trace insertions (and moreover a call to
>> prepare_ftrace_return with cancelled insertion)
>> is a useless payload.
>>
>> The hard reboots I've seen are related to x86-64 while
>> disabling/reenabling a CPU through /sys/device/system/cpu No tracer was
>> enabled at these times (the problem still remains with latest updates on
>> -tip for half an hour).
>>
>> One other thing: I've seen these pointless calls to preempt_schedule
>> while testing the function graph tracer on VirtualBox. Since it provides
>> virtual serial lines, it was more easy to debug than usual (I haven't
>> any serial line on my box). The function graph tracer hangs on
>> VirtualBox with a x86-32 -tip. It seems that the tracing is too slow and
>> so hrtimer_interrupt() does an eternal loop, assuming that a new time
>> update has to be done (because too much time elapsed during th tracing)
>> after each iteration. I'm not sure what to do...disabling tracing for
>> hrtimers or....
>
> reduce HZ?
>
>        Ingo
>

I just switched from 250 to 100 HZ. And it remains the same. But I
commented out the early_printk which could consume some
time too.
Perhaps there is one other thing that makes it hanging. I will
investigate more...
Did someone make some tests with function graph tracer on 32 bits
these last days?
--
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