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: <52A7BF46.8080707@hitachi.com>
Date:	Wed, 11 Dec 2013 10:26:30 +0900
From:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Steven Rostedt <rostedt@...dmis.org>,
	Oleg Nesterov <oleg@...hat.com>,
	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
	Hyeoncheol Lee <cheol.lee@....com>,
	"zhangwei(Jovi)" <jovi.zhangwei@...wei.com>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Hemant Kumar <hkshaw@...ux.vnet.ibm.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Namhyung Kim <namhyung.kim@....com>
Subject: Re: [PATCH 10/17] tracing/probes: Move 'symbol' fetch method to kprobes

(2013/12/11 10:05), Namhyung Kim wrote:
> Hi Masami,
> 
> On Tue, 10 Dec 2013 19:12:36 +0900, Masami Hiramatsu wrote:
>> (2013/12/09 15:19), Namhyung Kim wrote:
>>
>>> diff --git a/kernel/trace/trace_probe.h b/kernel/trace/trace_probe.h
>>> index 23b2d83ee5fb..d327a1c21f4b 100644
>>> --- a/kernel/trace/trace_probe.h
>>> +++ b/kernel/trace/trace_probe.h
>>> @@ -239,6 +239,30 @@ ASSIGN_FETCH_FUNC(bitfield, ftype),			\
>>>  extern __weak const struct fetch_type kprobes_fetch_type_table[];
>>>  extern __weak const struct fetch_type uprobes_fetch_type_table[];
>>>  
>>> +#ifdef CONFIG_KPROBE_EVENT
>>> +struct symbol_cache;
>>> +unsigned long update_symbol_cache(struct symbol_cache *sc);
>>> +void free_symbol_cache(struct symbol_cache *sc);
>>> +struct symbol_cache *alloc_symbol_cache(const char *sym, long offset);
>>> +#else
>>> +struct symbol_cache {
>>> +};
>>> +static unsigned long __used update_symbol_cache(struct symbol_cache *sc)
>>> +{
>>> +	return 0;
>>> +}
>>> +
>>> +static void __used free_symbol_cache(struct symbol_cache *sc)
>>> +{
>>> +}
>>> +
>>> +static struct symbol_cache * __used
>>> +alloc_symbol_cache(const char *sym, long offset)
>>> +{
>>> +	return NULL;
>>> +}
>>> +#endif /* CONFIG_KPROBE_EVENT */
>>
>> Hmm, defining non-inline function in the header looks odd.
>> Maybe you'd better do this (or define __weak instances)
>> in trace_probe.c.
> 
> Or just make them static inline?

Exactly, yes. ;)

Thank you,

-- 
Masami HIRAMATSU
IT Management Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@...achi.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