linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mips/kprobes: Export kprobe_fault_handler()
@ 2019-06-21 16:09 Anshuman Khandual
  2019-07-15 11:20 ` Paul Burton
  0 siblings, 1 reply; 2+ messages in thread
From: Anshuman Khandual @ 2019-06-21 16:09 UTC (permalink / raw)
  To: linux-kernel, linux-mm
  Cc: Anshuman Khandual, Ralf Baechle, Paul Burton, James Hogan,
	Andrew Morton, linux-mips

Generic kprobe_page_fault() calls into kprobe_fault_handler() which must be
available with and without CONFIG_KPROBES. There is one stub implementation
for !CONFIG_KPROBES. For CONFIG_KPROBES all subscribing archs must provide
a kprobe_fault_handler() definition. Currently mips has an implementation
which is defined as 'static inline'. Make it available for generic kprobes
to comply with the above new requirement.

Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@mips.com>
Cc: James Hogan <jhogan@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mips@vger.kernel.org
Cc: linux-mm@kvack.org

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
 arch/mips/include/asm/kprobes.h | 1 +
 arch/mips/kernel/kprobes.c      | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/mips/include/asm/kprobes.h b/arch/mips/include/asm/kprobes.h
index 3cf8e4d..68b1e5d 100644
--- a/arch/mips/include/asm/kprobes.h
+++ b/arch/mips/include/asm/kprobes.h
@@ -41,6 +41,7 @@ do {									\
 #define kretprobe_blacklist_size 0
 
 void arch_remove_kprobe(struct kprobe *p);
+int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
 
 /* Architecture specific copy of original instruction*/
 struct arch_specific_insn {
diff --git a/arch/mips/kernel/kprobes.c b/arch/mips/kernel/kprobes.c
index 81ba1d3..6cfae24 100644
--- a/arch/mips/kernel/kprobes.c
+++ b/arch/mips/kernel/kprobes.c
@@ -398,7 +398,7 @@ static inline int post_kprobe_handler(struct pt_regs *regs)
 	return 1;
 }
 
-static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr)
+int kprobe_fault_handler(struct pt_regs *regs, int trapnr)
 {
 	struct kprobe *cur = kprobe_running();
 	struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mips/kprobes: Export kprobe_fault_handler()
  2019-06-21 16:09 [PATCH] mips/kprobes: Export kprobe_fault_handler() Anshuman Khandual
@ 2019-07-15 11:20 ` Paul Burton
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Burton @ 2019-07-15 11:20 UTC (permalink / raw)
  To: Anshuman Khandual
  Cc: linux-kernel, linux-mm, Anshuman Khandual, Ralf Baechle,
	Paul Burton, James Hogan, Andrew Morton, linux-mips, linux-mips

Hello,

Anshuman Khandual wrote:
> Generic kprobe_page_fault() calls into kprobe_fault_handler() which must be
> available with and without CONFIG_KPROBES. There is one stub implementation
> for !CONFIG_KPROBES. For CONFIG_KPROBES all subscribing archs must provide
> a kprobe_fault_handler() definition. Currently mips has an implementation
> which is defined as 'static inline'. Make it available for generic kprobes
> to comply with the above new requirement.
> 
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: Paul Burton <paul.burton@mips.com>
> Cc: James Hogan <jhogan@kernel.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: linux-mips@vger.kernel.org
> Cc: linux-mm@kvack.org
> 
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>

Applied to mips-next.

Thanks,
    Paul

[ This message was auto-generated; if you believe anything is incorrect
  then please email paul.burton@mips.com to report it. ]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-15 11:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-21 16:09 [PATCH] mips/kprobes: Export kprobe_fault_handler() Anshuman Khandual
2019-07-15 11:20 ` Paul Burton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).