kretprobes for parisc / cleanups
Subsystems (2)
cover kretprobes for parisc / cleanups
Hi,
this patchset implements kretprobes for PA-RISC. While working on kretprobes i've also made some minor fixes.
Sven Schnelle (4):
parisc: remove kprobes.h from generic-y
parisc: Implement kretprobes
doc: update kprobes supported architecture list
parisc: remove unused flags parameter in __patch_text()
.../features/debug/kprobes/arch-support.txt | 2 +- Documentation/kprobes.txt | 1 + arch/parisc/Kconfig | 1 + arch/parisc/include/asm/Kbuild | 1 - arch/parisc/kernel/kprobes.c | 110 +++++++++++++++++- arch/parisc/kernel/patch.c | 9 +- 6 files changed, 116 insertions(+), 8 deletions(-)
Signature · 1 line
2.20.1
PATCH 1/4 parisc: remove kprobes.h from generic-y
We're providing our own version now.
--- arch/parisc/include/asm/Kbuild | 1 - 1 file changed, 1 deletion(-)
arch/parisc/include/asm/Kbuild +0 -1
@@ -10,7 +10,6 @@ generic-y += hw_irq.h generic-y += irq_regs.h generic-y += irq_work.h generic-y += kdebug.h -generic-y += kprobes.h generic-y += kvm_para.h generic-y += local.h generic-y += local64.h
Signature · 1 line
2.20.1
PATCH 2/4 parisc: Implement kretprobes
In reply to Sven SchnelleImplement kretprobes on parisc, parts stolen from powerpc.
--- arch/parisc/Kconfig | 1 + arch/parisc/kernel/kprobes.c | 110 ++++++++++++++++++++++++++++++++++- 2 files changed, 110 insertions(+), 1 deletion(-)
arch/parisc/Kconfig +1 -0
@@ -56,6 +56,7 @@ config PARISC select NEED_SG_DMA_LENGTH select HAVE_ARCH_KGDB select HAVE_KPROBES + select HAVE_KRETPROBES help The PA-RISC microprocessor is designed by Hewlett-Packard and used
arch/parisc/kernel/kprobes.c +109 -1
120 lines not on this page · raw message
Signature · 1 line
2.20.1
PATCH 3/4 doc: update kprobes supported architecture list
In reply to Sven SchnelleNow that kprobes and kretprobes are implemented, update the list in Documentation to reflect that.
--- Documentation/features/debug/kprobes/arch-support.txt | 2 +- Documentation/kprobes.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
Documentation/features/debug/kprobes/arch-support.txt +1 -1
@@ -21,7 +21,7 @@ | nds32: | TODO | | nios2: | TODO | | openrisc: | TODO | - | parisc: | TODO | + | parisc: | ok | | powerpc: | ok | | riscv: | ok | | s390: | ok |
Documentation/kprobes.txt +1 -0
@@ -321,6 +321,7 @@ architectures: - ppc - mips - s390 +- parisc Configuring Kprobes ===================
Signature · 1 line
2.20.1
PATCH 4/4 parisc: remove unused flags parameter in __patch_text()
In reply to Sven SchnelleIt's not used by patch_map()/patch_unmap(), so lets remove it.
--- arch/parisc/kernel/patch.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
arch/parisc/kernel/patch.c +4 -5
@@ -20,7 +20,7 @@ struct patch {unsigned int insn; }; -static void __kprobes *patch_map (void *addr,int fixmap,unsigned long *flags) +static void __kprobes *patch_map (void *addr,int fixmap) {unsigned int uintaddr = (uintptr_t ) addr;bool module = !core_kernel_text (uintaddr);
@@ -38,22 +38,21 @@ static void __kprobes *patch_map(void *addr, int fixmap, unsigned long *flags)return (void *) (__fix_to_virt (fixmap) + (uintaddr & ~PAGE_MASK )); } -static void __kprobes patch_unmap (int fixmap,unsigned long *flags) +static void __kprobes patch_unmap (int fixmap) {clear_fixmap (fixmap); }void __kprobes __patch_text (void *addr,unsigned int insn) { -unsigned long flags;void *waddr = addr;int size; - waddr =patch_map (addr,FIX_TEXT_POKE0 , &flags); + waddr =patch_map (addr,FIX_TEXT_POKE0 ); *(u32 *)waddr = insn; size =sizeof (u32);flush_kernel_vmap_range (waddr, size); -patch_unmap (FIX_TEXT_POKE0 , &flags); +patch_unmap (FIX_TEXT_POKE0 );flush_icache_range ((uintptr_t )(addr), (uintptr_t )(addr) + size); }
Signature · 1 line
2.20.1
Helge Deller
maintainerQuoted 9 lines · Sven Schnelle
this patchset implements kretprobes for PA-RISC. While working on kretprobes i've also made some minor fixes.
Sven Schnelle (4):
parisc: removekprobes.hfrom generic-y
parisc: Implement kretprobes
doc: update kprobes supported architecture list
parisc: remove unused flags parameter in__patch_text()
Quoted 7 lines
.../features/debug/kprobes/arch-support.txt | 2 +- Documentation/kprobes.txt | 1 + arch/parisc/Kconfig | 1 + arch/parisc/include/asm/Kbuild | 1 - arch/parisc/kernel/kprobes.c | 110 +++++++++++++++++- arch/parisc/kernel/patch.c | 9 +- 6 files changed, 116 insertions(+), 8 deletions(-)
Thanks!
Applied to my for-next branch.
Helge