Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1570470
| From | "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] powerpc: kprobes: fixes for kprobe_lookup_name on BE |
| Date | 2017-01-31 09:10 +0100 |
| Message-ID | <t5BFL-6K3-1@gated-at.bofh.it> (permalink) |
| References | <t5r3I-8h-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Fix two issues with kprobes.h on BE which were exposed with the optprobes work:
- one, having to do with a missing include for linux/module.h for
MODULE_NAME_LEN -- this didn't show up previously since the only users of
kprobe_lookup_name were in kprobes.c, which included linux/module.h
through other headers, and
- two, with a missing const qualifier for a local variable which ends up
referring a string literal. Again, this is unique to how
kprobe_lookup_name is being invoked in optprobes.c
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
---
arch/powerpc/include/asm/kprobes.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/kprobes.h b/arch/powerpc/include/asm/kprobes.h
index 5fc728af9260..d821835ade86 100644
--- a/arch/powerpc/include/asm/kprobes.h
+++ b/arch/powerpc/include/asm/kprobes.h
@@ -29,6 +29,7 @@
#include <linux/types.h>
#include <linux/ptrace.h>
#include <linux/percpu.h>
+#include <linux/module.h>
#include <asm/probes.h>
#include <asm/code-patching.h>
@@ -77,7 +78,7 @@ extern kprobe_opcode_t optprobe_template_end[];
#define kprobe_lookup_name(name, addr) \
{ \
char dot_name[MODULE_NAME_LEN + 1 + KSYM_NAME_LEN]; \
- char *modsym; \
+ const char *modsym; \
bool dot_appended = false; \
if ((modsym = strchr(name, ':')) != NULL) { \
modsym++; \
--
2.11.0
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH V3 3/4] arch/powerpc: Implement Optprobes Michael Ellerman <mpe@ellerman.id.au> - 2017-01-30 21:50 +0100 Re: [PATCH V3 3/4] arch/powerpc: Implement Optprobes "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2017-01-31 09:00 +0100 [PATCH] powerpc: kprobes: fixes for kprobe_lookup_name on BE "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2017-01-31 09:10 +0100
csiph-web