From: Anju T Sudhakar <anju@linux.vnet.ibm.com>
To: 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, mpe@ellerman.id.au,
hemant@linux.vnet.ibm.com, mahesh@linux.vnet.ibm.com,
mhiramat@kernel.org, anju@linux.vnet.ibm.com
Subject: [PATCH 3/3] powerpc: kprobes: fixes for kprobe_lookup_name on BE
Date: Wed, 8 Feb 2017 14:27:31 +0530 [thread overview]
Message-ID: <1486544251-11292-3-git-send-email-anju@linux.vnet.ibm.com> (raw)
In-Reply-To: <1486544251-11292-1-git-send-email-anju@linux.vnet.ibm.com>
From: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
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 97b8c1f..77885d8 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>
@@ -61,7 +62,7 @@ typedef ppc_opcode_t kprobe_opcode_t;
#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.7.4
next prev parent reply other threads:[~2017-02-08 8:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-08 8:57 [PATCH 1/3] powerpc: asm/ppc-opcode.h: introduce __PPC_SH64() Anju T Sudhakar
2017-02-08 8:57 ` [PATCH 2/3] powerpc: add helper to check if offset is within rel branch range Anju T Sudhakar
2017-02-08 8:57 ` Anju T Sudhakar [this message]
2017-02-14 12:40 ` [1/3] powerpc: asm/ppc-opcode.h: introduce __PPC_SH64() Michael Ellerman
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=1486544251-11292-3-git-send-email-anju@linux.vnet.ibm.com \
--to=anju@linux.vnet.ibm.com \
--cc=ananth@in.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=hemant@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mahesh@linux.vnet.ibm.com \
--cc=mhiramat@kernel.org \
--cc=mpe@ellerman.id.au \
--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®