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:	Thu, 27 Aug 2009 11:07:35 -0400
From:	Masami Hiramatsu <mhiramat@...hat.com>
To:	Frederic Weisbecker <fweisbec@...il.com>
CC:	Li Zefan <lizf@...fujitsu.com>, Ingo Molnar <mingo@...e.hu>,
	LKML <linux-kernel@...r.kernel.org>,
	Ananth N Mavinakayanahalli <ananth@...ibm.com>,
	Avi Kivity <avi@...hat.com>, Andi Kleen <ak@...ux.intel.com>,
	Christoph Hellwig <hch@...radead.org>,
	"Frank Ch. Eigler" <fche@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, Jason Baron <jbaron@...hat.com>,
	Jim Keniston <jkenisto@...ibm.com>,
	"K.Prasad" <prasad@...ux.vnet.ibm.com>,
	Lai Jiangshan <laijs@...fujitsu.com>,
	Przemysław Pawełczyk 
	<przemyslaw@...elczyk.it>, Roland McGrath <roland@...hat.com>,
	Sam Ravnborg <sam@...nborg.org>,
	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Tom Zanussi <tzanussi@...il.com>,
	Vegard Nossum <vegard.nossum@...il.com>
Subject: Re: [PATCH 06/18] tracing: Ftrace dynamic ftrace_event_call support

Frederic Weisbecker wrote:
> On Thu, Aug 27, 2009 at 10:47:24AM +0800, Li Zefan wrote:
>>> -int trace_define_field(struct ftrace_event_call *call, const char *type,
>>> -		       const char *name, int offset, int size, int is_signed,
>>> +int trace_define_field(struct ftrace_event_call *call, char *type,
>>> +		       char *name, int offset, int size, int is_signed,
>>>   		       int filter_type)
>>
>> I don't see why you remove "const"?
>
>
>
> Because kprobes uses dynamically allocated strings as names.
> That said, I should turn it back to const, it's indeed more sane.
> I don't remember exactly the reason of this. I had to resolve several
> conflicts between Masami's patchset and tracing/core, but I did
> wrong in this part, indeed.

Ah, it should be a regression. My patches were based on an old ftrace
which used char * instead of const char *, before Li enhanced it.

Thank you for pointing it out!

>
>
>
>>>   {
>>>   	struct ftrace_event_field *field;
>>> @@ -92,9 +92,7 @@ int trace_define_common_fields(struct ftrace_event_call *call)
>>>   }
>>>   EXPORT_SYMBOL_GPL(trace_define_common_fields);
>>
>> ...
>>
>>>   	for (i = 0; i<  meta->nb_args; i++) {
>>> -		ret = trace_define_field(call, meta->types[i],
>>> -					 meta->args[i], offset,
>>> +		ret = trace_define_field(call, (char *)meta->types[i],
>>> +					 (char *)meta->args[i], offset,
>>
>> This is not good..
>
>
> Yeah.
>
>
>>
>>>   					sizeof(unsigned long), 0,
>>>   					 FILTER_OTHER);
>>>   		offset += sizeof(unsigned long);
>>> @@ -277,13 +277,13 @@ void ftrace_syscall_exit(struct pt_regs *regs, long ret)
>>>   		trace_current_buffer_unlock_commit(event, 0, 0);
>>>   }
>>
>> ...
>>
>>> -int reg_event_syscall_exit(void *ptr)
>>> +int reg_event_syscall_exit(struct ftrace_event_call *call)
>>>   {
>>>   	int ret = 0;
>>>   	int num;
>>>   	char *name;
>>>
>>> -	name = (char *)ptr;
>>> +	name = (char *)call->data;
>>
>> nitpick: implicit cast is fine.
>>
>>>   	num = syscall_name_to_nr(name);
>>>   	if (num<  0 || num>= FTRACE_SYSCALL_MAX)
>>>   		return -ENOSYS;
>>> @@ -342,12 +342,12 @@ int reg_event_syscall_exit(void *ptr)
>>>   	return ret;
>>>   }
>>>
>>> -void unreg_event_syscall_exit(void *ptr)
>>> +void unreg_event_syscall_exit(struct ftrace_event_call *call)
>>>   {
>>>   	int num;
>>>   	char *name;
>>>
>>> -	name = (char *)ptr;
>>> +	name = (char *)call->data;
>>
>> ditto
>
>
> Ok, I'll send a delta patch to fix these.
>
> Thanks.
>
>
>>
>>>   	num = syscall_name_to_nr(name);
>>>   	if (num<  0 || num>= FTRACE_SYSCALL_MAX)
>>>   		return;
>

-- 
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division

e-mail: mhiramat@...hat.com

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