lkml.org 
[lkml]   [2009]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: compile insn.c and inat.c only for KPROBES
OGAWA Hirofumi wrote:
>
> At least, insn.c and inat.c is needed for kprobe for now. So, this
> compile those only if KPROBES is enabled.
>
> Signed-off-by: OGAWA Hirofumi<hirofumi@mail.parknet.co.jp>

Right, currently, the decoder is only used by kprobes.
Thank you,

Acked-by: Masami Hiramatsu <mhiramat@redhat.com>

> ---
>
> arch/x86/Kconfig.debug | 4 ++--
> arch/x86/lib/Makefile | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff -L arch/x86/lib/Kconfig -puN /dev/null /dev/null
> diff -puN arch/x86/lib/Makefile~kconfig-decoder-only-for-kprobe arch/x86/lib/Makefile
> --- linux-2.6/arch/x86/lib/Makefile~kconfig-decoder-only-for-kprobe 2009-12-06 19:49:06.000000000 +0900
> +++ linux-2.6-hirofumi/arch/x86/lib/Makefile 2009-12-06 19:49:06.000000000 +0900
> @@ -20,7 +20,7 @@ lib-y := delay.o
> lib-y += thunk_$(BITS).o
> lib-y += usercopy_$(BITS).o getuser.o putuser.o
> lib-y += memcpy_$(BITS).o
> -lib-y += insn.o inat.o
> +lib-$(CONFIG_KPROBES) += insn.o inat.o
>
> obj-y += msr-reg.o msr-reg-export.o
>
> diff -puN arch/x86/Kconfig.debug~kconfig-decoder-only-for-kprobe arch/x86/Kconfig.debug
> --- linux-2.6/arch/x86/Kconfig.debug~kconfig-decoder-only-for-kprobe 2009-12-06 19:49:06.000000000 +0900
> +++ linux-2.6-hirofumi/arch/x86/Kconfig.debug 2009-12-06 19:49:06.000000000 +0900
> @@ -187,8 +187,8 @@ config HAVE_MMIOTRACE_SUPPORT
> def_bool y
>
> config X86_DECODER_SELFTEST
> - bool "x86 instruction decoder selftest"
> - depends on DEBUG_KERNEL
> + bool "x86 instruction decoder selftest"
> + depends on DEBUG_KERNEL&& KPROBES
> ---help---
> Perform x86 instruction decoder selftests at build time.
> This option is useful for checking the sanity of x86 instruction
> _
>

--
Masami Hiramatsu

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

e-mail: mhiramat@redhat.com



\
 
 \ /
  Last update: 2009-12-07 15:31    [W:0.037 / U:3.712 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site