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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4C8DCFAE.4020700@hitachi.com>
Date:	Mon, 13 Sep 2010 16:15:58 +0900
From:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
To:	Felipe Contreras <felipe.contreras@...il.com>
Cc:	Randy Dunlap <randy.dunlap@...cle.com>,
	lkml <linux-kernel@...r.kernel.org>, linux-next@...r.kernel.org,
	Ananth N Mavinakayanahalli <ananth@...ibm.com>,
	Anil S Keshavamurthy <anil.s.keshavamurthy@...el.com>,
	"David S. Miller" <davem@...emloft.net>,
	akpm <akpm@...ux-foundation.org>,
	2nddept-manager@....hitachi.co.jp
Subject: Re: [PATCH -next] optprobes: fix kconfig depends/selects

(2010/09/13 10:06), Masami Hiramatsu wrote:
> (2010/09/12 19:49), Felipe Contreras wrote:
>> On Thu, Aug 12, 2010 at 10:26 PM, Randy Dunlap <randy.dunlap@...cle.com> wrote:
>>> From: Randy Dunlap <randy.dunlap@...cle.com>
>>>
>>> KALLSYMS and KALLSYMS_ALL depend on DEBUG_KERNEL, so add that dependency.
>>> KALLSYMS_ALL depends on KALLSYMS, so select both of them, not just KALLSYMS_ALL.
>>>
>>> warning: (OPTPROBES && KPROBES && HAVE_OPTPROBES && !PREEMPT || MTD_UBI_DEBUG && MTD && SYSFS && MTD_UBI || UBIFS_FS_DEBUG && MISC_FILESYSTEMS && UBIFS_FS || LOCKDEP && DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT || LATENCYTOP && HAVE_LATENCYTOP_SUPPORT) selects KALLSYMS_ALL which has unmet direct dependencies (DEBUG_KERNEL && KALLSYMS)
>>>
>>> Signed-off-by: Randy Dunlap <randy.dunlap@...cle.com>
>>> Cc:     Ananth N Mavinakayanahalli <ananth@...ibm.com>
>>> Cc:     Anil S Keshavamurthy <anil.s.keshavamurthy@...el.com>
>>> Cc:     "David S. Miller" <davem@...emloft.net>
>>> Cc:     Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
>>> ---
>>>  arch/Kconfig |    2 ++
>>>  1 file changed, 2 insertions(+)
>>>
>>> --- linux-next-20100810.orig/arch/Kconfig
>>> +++ linux-next-20100810/arch/Kconfig
>>> @@ -45,6 +45,8 @@ config OPTPROBES
>>>        def_bool y
>>>        depends on KPROBES && HAVE_OPTPROBES
>>>        depends on !PREEMPT
>>> +       depends on DEBUG_KERNEL
>>> +       select KALLSYMS
>>>        select KALLSYMS_ALL
>>>
>>>  config HAVE_EFFICIENT_UNALIGNED_ACCESS
>>> --
>>
>> This causes another problem:
>>
>> arch/Kconfig:33:error: recursive dependency detected!
>> arch/Kconfig:33:	symbol KPROBES depends on KALLSYMS
>> init/Kconfig:825:	symbol KALLSYMS is selected by OPTPROBES
>> arch/Kconfig:44:	symbol OPTPROBES depends on KPROBES
>>
>> The 'select KALLSYMS' is redundant.
>>
>> Otherwise: Signed-off-by: Felipe Contreras <felipe.contreras@...il.com>
>>
> 
> Thanks, let me clear the dependency;
> Kprobes uses kallsyms_lookup for finding target function and checking
> instruction boundary, thus CONFIG_KPROBES should select CONFIG_KALLSYMS
> and CONFIG_KALLSYMS_ALL.
> Optprobe is a optional feature which is supported on x86 arch, and
> it also uses kallsyms_lookup for checking instructions in the target
> function. Anyway, since optprobe itself is depends on kprobes, it doesn't
> need to select both of KALLSYMS/KALLSYMS_ALL.

Hmm, wait, I might misunderstand something here. I thought
KALLSYMS_ALL added symbols of static functions.
But, does KALLSYMS_ALL just add symbols of variables?
If so, both of KPROBES and OPTPROBES require only KALLSYMS.
It means that they don't need to care about CONFIG_DEBUG_KERNEL.

Thank you,

-- 
Masami HIRAMATSU
2nd Dept. Linux Technology Center
Hitachi, Ltd., Systems Development 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