From: Michael Ellerman <mpe@ellerman.id.au>
To: Anju T Sudhakar <anju@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Cc: ananth@in.ibm.com, naveen.n.rao@linux.vnet.ibm.com,
paulus@samba.org, srikar@linux.vnet.ibm.com,
benh@kernel.crashing.org, mahesh@linux.vnet.ibm.com,
mhiramat@kernel.org, anju@linux.vnet.ibm.com
Subject: Re: [PATCH V3 3/4] arch/powerpc: Implement Optprobes
Date: Tue, 31 Jan 2017 07:43:35 +1100 [thread overview]
Message-ID: <878tpswa6g.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <1482153507-17350-2-git-send-email-anju@linux.vnet.ibm.com>
Anju T Sudhakar <anju@linux.vnet.ibm.com> writes:
> Detour buffer contains instructions to create an in memory pt_regs.
> After the execution of the pre-handler, a call is made for instruction emulation.
> The NIP is determined in advanced through dummy instruction emulation and a branch
> instruction is created to the NIP at the end of the trampoline.
>
> Instruction slot for detour buffer is allocated from the reserved area.
> For the time being, 64KB is reserved in memory for this purpose.
>
> Instructions which can be emulated using analyse_instr() are suppliants
> for optimization. Before optimization ensure that the address range
> between the detour buffer allocated and the instruction being probed
> is within ± 32MB.
>
> Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com>
> Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
> ---
> .../features/debug/optprobes/arch-support.txt | 2 +-
> arch/powerpc/Kconfig | 1 +
> arch/powerpc/include/asm/kprobes.h | 24 +-
> arch/powerpc/include/asm/sstep.h | 1 +
> arch/powerpc/kernel/Makefile | 1 +
> arch/powerpc/kernel/optprobes.c | 331 +++++++++++++++++++++
> arch/powerpc/kernel/optprobes_head.S | 135 +++++++++
> arch/powerpc/lib/sstep.c | 21 ++
> 8 files changed, 514 insertions(+), 2 deletions(-)
> create mode 100644 arch/powerpc/kernel/optprobes.c
> create mode 100644 arch/powerpc/kernel/optprobes_head.S
This breaks the pseries_defconfig (at least) build:
In file included from ../include/linux/kprobes.h:45:0,
from ../arch/powerpc/kernel/optprobes.c:12:
../arch/powerpc/kernel/optprobes.c: In function ‘arch_prepare_optimized_kprobe’:
../arch/powerpc/include/asm/kprobes.h:79:16: error: ‘MODULE_NAME_LEN’ undeclared (first use in this function)
char dot_name[MODULE_NAME_LEN + 1 + KSYM_NAME_LEN]; \
^
../arch/powerpc/kernel/optprobes.c:230:2: note: in expansion of macro ‘kprobe_lookup_name’
kprobe_lookup_name("optimized_callback", op_callback_addr);
^~~~~~~~~~~~~~~~~~
../arch/powerpc/include/asm/kprobes.h:79:16: note: each undeclared identifier is reported only once for each function it appears in
char dot_name[MODULE_NAME_LEN + 1 + KSYM_NAME_LEN]; \
^
../arch/powerpc/kernel/optprobes.c:230:2: note: in expansion of macro ‘kprobe_lookup_name’
kprobe_lookup_name("optimized_callback", op_callback_addr);
^~~~~~~~~~~~~~~~~~
../arch/powerpc/include/asm/kprobes.h:82:14: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
if ((modsym = strchr(name, ':')) != NULL) { \
^
../arch/powerpc/kernel/optprobes.c:230:2: note: in expansion of macro ‘kprobe_lookup_name’
kprobe_lookup_name("optimized_callback", op_callback_addr);
^~~~~~~~~~~~~~~~~~
../arch/powerpc/include/asm/kprobes.h:79:7: error: unused variable ‘dot_name’ [-Werror=unused-variable]
char dot_name[MODULE_NAME_LEN + 1 + KSYM_NAME_LEN]; \
^
../arch/powerpc/kernel/optprobes.c:230:2: note: in expansion of macro ‘kprobe_lookup_name’
kprobe_lookup_name("optimized_callback", op_callback_addr);
^~~~~~~~~~~~~~~~~~
../arch/powerpc/include/asm/kprobes.h:82:14: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
if ((modsym = strchr(name, ':')) != NULL) { \
^
../arch/powerpc/kernel/optprobes.c:231:2: note: in expansion of macro ‘kprobe_lookup_name’
kprobe_lookup_name("emulate_step", emulate_step_addr);
^~~~~~~~~~~~~~~~~~
../arch/powerpc/include/asm/kprobes.h:79:7: error: unused variable ‘dot_name’ [-Werror=unused-variable]
char dot_name[MODULE_NAME_LEN + 1 + KSYM_NAME_LEN]; \
^
../arch/powerpc/kernel/optprobes.c:231:2: note: in expansion of macro ‘kprobe_lookup_name’
kprobe_lookup_name("emulate_step", emulate_step_addr);
^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [arch/powerpc/kernel/optprobes.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [arch/powerpc/kernel] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [sub-make] Error 2
This may not be your bug, but your patch exposes it unfortunately.
cheers
next prev parent reply other threads:[~2017-01-30 20:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-19 13:18 [PATCH V3 0/4] OPTPROBES for powerpc Anju T Sudhakar
2016-12-19 13:18 ` [PATCH V3 3/4] arch/powerpc: Implement Optprobes Anju T Sudhakar
2016-12-25 2:54 ` Masami Hiramatsu
2017-01-04 10:25 ` Naveen N. Rao
2017-01-30 20:43 ` Michael Ellerman [this message]
2017-01-31 7:55 ` Naveen N. Rao
2017-01-31 7:59 ` [PATCH] powerpc: kprobes: fixes for kprobe_lookup_name on BE Naveen N. Rao
2017-02-01 10:53 ` [PATCH V3 3/4] arch/powerpc: Implement Optprobes Michael Ellerman
2017-02-03 19:39 ` Naveen N. Rao
2017-02-07 1:05 ` Masami Hiramatsu
2017-02-07 7:51 ` Naveen N. Rao
2017-02-08 5:37 ` Anju T Sudhakar
2016-12-19 13:18 ` [PATCH V3 4/4] arch/powerpc: Optimize kprobe in kretprobe_trampoline Anju T Sudhakar
2016-12-19 13:18 ` [PATCH V3 1/4] powerpc: asm/ppc-opcode.h: introduce __PPC_SH64() Anju T Sudhakar
2016-12-19 13:18 ` [PATCH V3 2/4] powerpc: add helper to check if offset is within rel branch range Anju T Sudhakar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878tpswa6g.fsf@concordia.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=ananth@in.ibm.com \
--cc=anju@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mahesh@linux.vnet.ibm.com \
--cc=mhiramat@kernel.org \
--cc=naveen.n.rao@linux.vnet.ibm.com \
--cc=paulus@samba.org \
--cc=srikar@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®