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, 5 Dec 2008 00:04:42 +0100
From:	"Frédéric Weisbecker" <fweisbec@...il.com>
To:	"Steven Rostedt" <rostedt@...dmis.org>
Cc:	"Ingo Molnar" <mingo@...e.hu>,
	"Linux Kernel" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] tracing/ftrace: don't insert TRACE_PRINT during selftests

2008/12/5 Frédéric Weisbecker <fweisbec@...il.com>:
> 2008/12/4 Steven Rostedt <rostedt@...dmis.org>:
>> The comment style should be:
>>
>> /*
>>  * comment
>>  * comment
>>  * comment
>>  */
>
> Sorry, will fix it.
>
>>
>>> +static atomic_t tracing_selftest_running = ATOMIC_INIT(0);
>>
>> Do we need that is atomic? Also, it needs to be __read_mostly.
>
>
> I thought it should be atomic to be sure the value is synchronized
> on smp when read. But actually that should have been more likely an
> int with smp_wb after writing it.
>
>>> +
>>>  /* For tracers that don't implement custom flags */
>>>  static struct tracer_opt dummy_tracer_opt[] = {
>>>       { }
>>> @@ -589,6 +597,8 @@ int register_tracer(struct tracer *type)
>>>               struct tracer *saved_tracer = current_trace;
>>>               struct trace_array *tr = &global_trace;
>>>               int i;
>>> +
>>> +             atomic_set(&tracing_selftest_running, 1);
>>
>> Enable this in the mutex lock, and we could make it a normal int.
>>
>
>
> But ftrace_printk can be called from interrupt context. I think we can loose
> some TRACE_PRINT entries at the selftests time since the tracer are not enabled
> by the user at this time, except the boot tracer...
>

But with the boot tracer enabled, there is no selftest actually :-)
--
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