Hi Oleg,
On Thu, 22 Nov 2018 15:32:10 +0100
Oleg Nesterov wrote:
> Hi Masami,
>
> On 11/20, Masami Hiramatsu wrote:
> >
> > Hello Oleg,
> >
> > I have a question about the (revert) commit 48212542067a
> > ("tracing/uprobes: Revert "Support mix o
ach function
> and each callback.
>
> What's the solution? I use the shadow stack that is already being
> used to store the function return addresses.
>
> A big thanks to Masami Hiramatsu for suggesting this idea!
>
> For now, I only allow an 16 users of the function
; + struct ftrace_ops_hash local_hash;
> + struct ftrace_ops_hash *func_hash;
> +#endif
Hmm, can we introduce these fields when we actually use it?
BTW, would you have any idea for using private field?
Thank you,
--
Masami Hiramatsu
27;t we stop tracing instead of disabling the event?
Thank you,
> +
> +if ! grep -q "changed:" events/sched/sched_waking/hist; then
> +fail "Failed to create onchange action inter-event histogram"
> +fi
> +
> +if ! grep -q "comm=ping" snapshot; then
> +fail "Failed to create snapshot action inter-event histogram"
> +fi
> +
> +exit 0
> --
> 2.14.1
>
--
Masami Hiramatsu
ent/trigger-onmatch-action-hist.tc |1 +
> .../trigger-onmatch-onmax-action-hist.tc |1 +
> .../inter-event/trigger-onmax-action-hist.tc |1 +
> .../inter-event/trigger-snapshot-action-hist.tc| 43 +
> .../trigger-synthetic-event-createremove.tc|1 +
> .../inter-event/trigger-trace-action-hist.tc | 42 +
> 18 files changed, 1433 insertions(+), 302 deletions(-)
> create mode 100644
> tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-action-hist-xfail.tc
> create mode 100644
> tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onchange-action-hist.tc
> create mode 100644
> tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-snapshot-action-hist.tc
> create mode 100644
> tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-trace-action-hist.tc
>
> --
> 2.14.1
>
--
Masami Hiramatsu
ON_PROFILE
> turned off).
>
> Where as before it would be 32 * 40 = 1280 bytes. That looks like ~7 times
> more than before.
Hmm, this seems too big... I thought the shadow-stack size should be
smaller than 1 page (4kB). Steve, can we give a 4k page for shadow stack
and define FTRACE_R
> strace output:
> open(\"/sys/kernel/debug/tracing/events/syscalls/sys_enter_nanosleep/id\",
> O_RDONLY) = -1 ENOENT (No such file or directory)
>
> This problem noticed on Linux mainline kernel version 4.20.0-rc3.
>
> Best regards
> Naresh Kamboju
--
Masami Hiramatsu
kernel, and some bpf testcases are failed
on arm64.
To fix this issue, this introduces custom
arch_syscall_match_sym_name() which skips first 8 bytes when
comparing the syscall and symbol names.
Fixes: 4378a7d4be30 ("arm64: implement syscall wrappers")
Reported-by: Naresh Kamboju
Signed-off
a tentative one, and should be fixed afterwards.
Since kprobe events already supported the mix of ftrace and perf, user may
confuse why they can not use the uprobe event if it is used by ftrace.
(perf probe treats both events transparently, and ftrace event interface too.)
Thank you,
--
Masami Hiramatsu
e same syscall table with AArch64,
* tracing compat syscalls may result in reporting bogus syscalls or even
* hang-up, so just do not trace them.
That's why I dropped compat syscall support.
Thank you,
--
Masami Hiramatsu
event may continue
to be called. Does this mean hist will be updated? (and I guess preferrable
behavior is to stop hist too, isn't it?)
Thank you,
--
Masami Hiramatsu
Ping?
Hi Tom,
This series, especially [09/12] tracing: Remove unneeded synth_event_mutex
will effect your current working series. Please tell me your opinion.
Thank you,
On Mon, 5 Nov 2018 17:59:46 +0900
Masami Hiramatsu wrote:
> Hi,
>
> This is v2 series of unifying dyna
Hi Tom,
On Wed, 28 Nov 2018 17:42:22 -0600
Tom Zanussi wrote:
> Hi Masami,
>
> On Wed, 2018-11-28 at 16:31 +0900, Masami Hiramatsu wrote:
> > Ping?
> >
> > Hi Tom,
> >
> > This series, especially [09/12] tracing: Remove unneeded
> > synth_eve
4.21 atm).
OK, I'll add a comment about compat syscalls. BTW, this should be applied
to 4.19 too, since without this, no one can use syscall events on arm64.
Thank you,
--
Masami Hiramatsu
kernel, and some bpf testcases are failed
on arm64.
To fix this issue, this introduces custom
arch_syscall_match_sym_name() which skips first 8 bytes when
comparing the syscall and symbol names.
Fixes: 4378a7d4be30 ("arm64: implement syscall wrappers")
Reported-by: Naresh Kamboju
Signed-off-
On Mon, 26 Nov 2018 15:21:28 -0600
Tom Zanussi wrote:
> Hi Masami,
>
> On Mon, 2018-11-26 at 23:09 +0900, Masami Hiramatsu wrote:
> > Hi Tom,
> >
> > On Wed, 14 Nov 2018 14:17:57 -0600
> > Tom Zanussi wrote:
> >
> > > From: Tom Zanussi
>
Hi Steve,
On Mon, 26 Nov 2018 11:32:15 -0500
Steven Rostedt wrote:
> On Mon, 26 Nov 2018 18:21:12 +0900
> Masami Hiramatsu wrote:
>
>
> > > Note, if another fgraph_ops is registered in the same location, its
> > > retfunc may be called that was set by a previous
On Thu, 29 Nov 2018 22:52:25 +0900
Masami Hiramatsu wrote:
> > For that system, I'm using Gnome terminal 3.24.2 and GNU bash, version
> > 4.4.12(1)-release (x86_64-pc-linux-gnu) (Ubuntu 17.10).
> >
> > If I change 'echo' to '/bin/echo' in
m
Reported-by: Tom Zanussi
Suggested-by: Tom Zanussi
Signed-off-by: Masami Hiramatsu
---
tools/testing/selftests/ftrace/ftracetest |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/ftrace/ftracetest
b/tools/testing/selftests/ftrace/ftracetest
orrect and valid identifiers for GPL
> >> v2
> >> only code are 'GPL-2.0' or 'GPL-2.0-only'.
> >>
> >> Signed-off-by: Thomas Gleixner
> >> Cc: Masami Hiramatsu
> >> Cc: Shuah Khan (Samsung OSG)
> >>
>
> Hi Masami,
>
> I am pulling this in for 4.21-rc1.
Oops, I missed it.
Acked-by: Masami Hiramatsu
Thank you!
--
Masami Hiramatsu
On Thu, 29 Nov 2018 16:53:30 +
Catalin Marinas wrote:
> On Thu, Nov 29, 2018 at 02:39:33PM +0900, Masami Hiramatsu wrote:
> > Since commit 4378a7d4be30 ("arm64: implement syscall wrappers")
> > introduced "__arm64_" prefix to all syscall wrapper symbols in
On Thu, 29 Nov 2018 11:46:52 -0500
Steven Rostedt wrote:
> On Thu, 29 Nov 2018 23:29:27 +0900
> Masami Hiramatsu wrote:
>
> > > One way to solve this is to also have a counter array that gets updated
> > > every time the index array gets updated. And save the counte
as executable is
> > done as a separate step to avoid one core in which the old PTE is cached
> > (hence writable), and another which sees the updated PTE (executable),
> > which would break the W^X protection.
> >
> > Cc: Andy Lutomirski
> > Cc: Kees Cook
&g
On Thu, 29 Nov 2018 22:24:35 -0500
Steven Rostedt wrote:
> On Fri, 30 Nov 2018 11:26:58 +0900
> Masami Hiramatsu wrote:
>
> > On Thu, 29 Nov 2018 11:46:52 -0500
> > Steven Rostedt wrote:
> >
> > > On Thu, 29 Nov 2018 23:29:27 +0900
> > > Masami Hi
On Wed, 14 Nov 2018 22:10:52 +0100
Patrick Staehlin wrote:
> On 14.11.18 16:49, Masami Hiramatsu wrote:
> > On Wed, 14 Nov 2018 00:37:30 -0800
> > Masami Hiramatsu wrote:
> >
> >>> +
> >>> +static int __kprobes patch_text(kprobe_op
On Wed, 14 Nov 2018 21:52:57 +0100
Patrick Staehlin wrote:
> Hi Masami,
>
> thank you for your remarks.
>
> On 14.11.18 09:37, Masami Hiramatsu wrote>
> > Thank you very much for implementing kprobes on RISC-V :)
> >
> > On Tue, 13 Nov 2018 20:58
eason
> ftrace can't trace stack_erasing_sysctl() or perhaps even
> stackleak_track_stack() as that may be very interesting to trace.
I think it is not enough for stopping kprobes. If you want to stop the kprobes
(int3 version) on stackleak_erase(), you should use
NOKPROBE_SYMBOL(stackleak_erase),
since kprobes can work without ftrace.
Thank you,
--
Masami Hiramatsu
this looks reasonable and good to me.
Reviewed-by: Masami Hiramatsu
Thank you!
>
> Cc: Jiri Kosina
> Cc: Andy Lutomirski
> Cc: Kees Cook
> Cc: Dave Hansen
> Cc: Masami Hiramatsu
> Fixes: 9222f606506c ("x86/alternatives: Lockdep-enforce text_mutex in
> text_p
Cc: Anil S Keshavamurthy
> Cc: "David S. Miller"
> Cc: Masami Hiramatsu
> ---
> kernel/kprobes.c | 10 +-
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/kernel/kprobes.c b/kernel/kprobes.c
> index 90e98e233647..08e31d863191 100644
>
On Sun, 11 Nov 2018 19:19:16 -0800
"Paul E. McKenney" wrote:
> On Mon, Nov 12, 2018 at 12:00:48PM +0900, Masami Hiramatsu wrote:
> > On Sun, 11 Nov 2018 11:43:49 -0800
> > "Paul E. McKenney" wrote:
> >
> > > Now that synchronize_rcu() waits fo
much the only ones that currently do self
> modification of code all over the kernel. Kprobes even more so than
> ftrace.
Right, since kprobes uses int3 or sw breakpoint exception for hooking into
the code, it consumes stack much more.
Thank you,
--
Masami Hiramatsu
.
>
> So let's disable function tracing and kprobes for stackleak_erase().
>
> Reported-by: kernel test robot
> Signed-off-by: Alexander Popov
Reviewed-by: Masami Hiramatsu
Thank you!
> ---
> kernel/stackleak.c | 4 +++-
> 1 file changed, 3 insertions(+),
+/* SPDX-License-Identifier: GPL-2.0+ */
> +
> +#ifndef _RISCV_KERNEL_KPROBES_SIMULATE_INSN_H
> +#define _RISCV_KERNEL_KPROBES_SIMULATE_INSN_H
> +
> +void simulate_caddisp16(u32 opcode, long addr, struct pt_regs *regs);
> +
> +#endif /* _RISCV_KERNEL_KPROBES_SIMULATE_INSN_H */
> diff --git a/arch/riscv/kernel/traps.c b/arch/riscv/kernel/traps.c
> index 24a9333dda2c..d7113178d401 100644
> --- a/arch/riscv/kernel/traps.c
> +++ b/arch/riscv/kernel/traps.c
> @@ -18,6 +18,7 @@
> #include
> #include
> #include
> +#include
> #include
> #include
> #include
> @@ -120,8 +121,14 @@ DO_ERROR_INFO(do_trap_ecall_m,
>
> asmlinkage void do_trap_break(struct pt_regs *regs)
> {
> + bool handler_found = false;
> +
> +#ifdef CONFIG_KPROBES
> + if (kprobe_breakpoint_handler(regs))
> + handler_found = 1;
Why don't you just return from here?
> +#endif
> #ifdef CONFIG_GENERIC_BUG
> - if (!user_mode(regs)) {
> + if (!handler_found && !user_mode(regs)) {
> enum bug_trap_type type;
>
> type = report_bug(regs->sepc, regs);
> @@ -137,7 +144,9 @@ asmlinkage void do_trap_break(struct pt_regs *regs)
> }
> #endif /* CONFIG_GENERIC_BUG */
>
> - force_sig_fault(SIGTRAP, TRAP_BRKPT, (void __user *)(regs->sepc),
> current);
> + if (!handler_found)
> + force_sig_fault(SIGTRAP, TRAP_BRKPT,
> + (void __user *)(regs->sepc), current);
> }
>
> #ifdef CONFIG_GENERIC_BUG
> diff --git a/arch/riscv/mm/fault.c b/arch/riscv/mm/fault.c
> index 88401d5125bc..eff816e33479 100644
> --- a/arch/riscv/mm/fault.c
> +++ b/arch/riscv/mm/fault.c
> @@ -22,6 +22,7 @@
>
> #include
> #include
> +#include
> #include
> #include
> #include
> @@ -30,11 +31,33 @@
> #include
> #include
>
> +#ifdef CONFIG_KPROBES
> +static inline int notify_page_fault(struct pt_regs *regs, unsigned int cause)
please use nokprobe_inline.
> +{
> + int ret = 0;
> +
> + /* kprobe_running() needs smp_processor_id() */
> + if (!user_mode(regs)) {
> + preempt_disable();
> + if (kprobe_running() && kprobe_fault_handler(regs, cause))
> + ret = 1;
> + preempt_enable();
> + }
> +
> + return ret;
> +}
> +#else
> +static inline int notify_page_fault(struct pt_regs *regs, unsigned int cause)
> +{
> + return 0;
> +}
> +#endif
> +
> /*
> * This routine handles page faults. It determines the address and the
> * problem, and then passes it off to one of the appropriate routines.
> */
> -asmlinkage void do_page_fault(struct pt_regs *regs)
> +asmlinkage void __kprobes do_page_fault(struct pt_regs *regs)
> {
> struct task_struct *tsk;
> struct vm_area_struct *vma;
> @@ -47,6 +70,9 @@ asmlinkage void do_page_fault(struct pt_regs *regs)
> cause = regs->scause;
> addr = regs->sbadaddr;
>
> + if (notify_page_fault(regs, cause))
> + return;
> +
> tsk = current;
> mm = tsk->mm;
>
> --
> 2.17.1
>
Thank you,
--
Masami Hiramatsu
On Wed, 14 Nov 2018 00:37:30 -0800
Masami Hiramatsu wrote:
> > +
> > +static int __kprobes patch_text(kprobe_opcode_t *addr, u32 opcode)
> > +{
> > + if (is_compressed_insn(opcode))
> > + *(u16 *)addr = cpu_to_le16(opcode);
> > + else
> &
nt enable_kprobe(struct kprobe *kp);
>
> void dump_kprobe(struct kprobe *kp);
>
> +void __weak *alloc_insn_page(void);
> +void __weak free_insn_page(void *page);
Should we declare prototypes for __weak functions? Anyway, we should remove
__weak from the prototypes.
Thank you,
--
Masami Hiramatsu
hile at it, do some small cleanup of what appears to be unnecessary
> masking.
Looks good to me.
Acked-by: Masami Hiramatsu
Thanks!
>
> Cc: Masami Hiramatsu
> Signed-off-by: Nadav Amit
> ---
> arch/x86/kernel/kprobes/core.c | 24
> 1 file chang
On Tue, 4 Dec 2018 12:43:33 -0500
Steven Rostedt wrote:
> On Mon, 5 Nov 2018 18:00:15 +0900
> Masami Hiramatsu wrote:
>
> > Add a busy check loop in cleanup_all_probes() before
> > trying to remove all events in uprobe_events as same as
> > kprobe_events does.
&
On Tue, 4 Dec 2018 13:51:20 -0500
Steven Rostedt wrote:
> On Mon, 5 Nov 2018 18:04:29 +0900
> Masami Hiramatsu wrote:
>
> > Remove trace_add_event_call() and trace_remove_event_call()
> > functions since those are not used anymore.
> >
> > Signed-off-by:
thought that the symbol only referred from inline asm should
be visible. But if it is OK for any version of supported gcc and clang,
I'm good to remove it. :-) (IOW, I just concerned about older gcc)
Reviewed-by: Masami Hiramatsu
Thank you,
>
> ---
> diff --git a/arch/x86
> Signed-off-by: Andrea Righi
For the short term, this is OK. But this is not the best way to cover
other functions which are also prohibited by arch_within_kprobe_blacklist().
I'll fix this issue later.
Acked-by: Masami Hiramatsu
Thank you,
> ---
> arch/x86/entry/entry_64.S
On Wed, 5 Dec 2018 15:24:48 +0100
Borislav Petkov wrote:
> On Wed, Dec 05, 2018 at 10:49:06PM +0900, Masami Hiramatsu wrote:
> > I would like to put this prototype inside arch/x86/kernel/kprobes/core.c,
> > since that is locally used.
>
> Done.
>
> > Should we
: Masami Hiramatsu
Blacklist symbols in arch-defined probe-prohibited areas.
With this change, user can see all symbols which are prohibited
to probe in debugfs.
All archtectures which have custom prohibit areas should define
its own arch_populate_kprobe_blacklist() function, but unless that,
all
On Fri, 7 Dec 2018 18:00:26 +0100
Andrea Righi wrote:
> On Sat, Dec 08, 2018 at 01:01:20AM +0900, Masami Hiramatsu wrote:
> > Hi Andrea and Ingo,
> >
> > Here is the patch what I meant. I just ran it on qemu-x86, and seemed
> > working.
> > After introducin
On Fri, 7 Dec 2018 18:58:05 +0100
Andrea Righi wrote:
> On Sat, Dec 08, 2018 at 01:01:20AM +0900, Masami Hiramatsu wrote:
> > Hi Andrea and Ingo,
> >
> > Here is the patch what I meant. I just ran it on qemu-x86, and seemed
> > working.
> > After introducin
On Fri, 7 Dec 2018 20:48:47 +0100
Borislav Petkov wrote:
> On Fri, Dec 07, 2018 at 11:42:10PM +0900, Masami Hiramatsu wrote:
> > Hmm, I just thought that the symbol only referred from inline asm should
> > be visible. But if it is OK for any version of supported gcc and clang,
er I
> run it.
Yeah, thank you for digging it down. It is now much easier to me.
>
> I notice that when I get into the state, journald and the dbus_daemon
> are constantly running. Perhaps the userspace time keeping went bad?
Yeah, I think so. Maybe addl instruction becomes broken.
Thank you,
--
Masami Hiramatsu
On Tue, 4 Dec 2018 16:40:07 +0900
Masami Hiramatsu wrote:
> Hi Steve,
>
> On Mon, 3 Dec 2018 21:18:07 -0500
> Steven Rostedt wrote:
>
> > Hi Masami,
> >
> > I started testing some of my new code and the system got into a
> > strange state. Debugging f
On Tue, 4 Dec 2018 09:13:35 +0100
Ingo Molnar wrote:
>
> * Masami Hiramatsu wrote:
>
> > Since copy_optimized_instructions() misses to update real RIP
> > address while copying several instructions to working buffer,
> > it adjusts RIP-relative instruction with wr
> this feature.
> >
> >
>
> Indeed.
>
> Although I had assumed that tracepoints already had appropriate jump label
> magic.
As far as I know, the jump label magic is for reducing the overhead when the
tracepoint is OFF (because it can skip function parameter preparation), and this
static call will be good when the tracepoint is ON (enabled) because of this can
avoid retpoline performance degradation.
Thank you,
--
Masami Hiramatsu
> Documentation/trace/histogram.txt | 206
> kernel/trace/trace.c| 162 +-
> kernel/trace/trace.h | 58 ++-
> kernel/trace/trace_events_hist.c| 982
> ++--
> kernel/trace/trace_events_trigger.c | 2 +-
> kernel/trace/trace_sched_wakeup.c | 2 +-
> 6 files changed, 1140 insertions(+), 272 deletions(-)
>
> --
> 2.14.1
>
--
Masami Hiramatsu
On Wed, 11 Jul 2018 08:54:29 -0400
Steven Rostedt wrote:
>
> Masami,
>
> Can you ack this? If I don't hear from you by tomorrow, I'm going to
> push it to Linus, because I'll be on PTO after that.
>
Sorry for later, yes, it seems correct.
Acked-by: Masa
a
> kernel module introduced previously to trigger atomic sections in the
> kernel.
>
Looks good to me.
Acked-by: Masami Hiramatsu
Thanks!
> Signed-off-by: Joel Fernandes (Google)
> ---
> tools/testing/selftests/ftrace/config | 3 +
> .../test.d/preemptirq/irqsoff_tr
t;${line/>$x
> The ${line/>$x
> -- Steve
>
> > fail "$line does not have >$x< in it"
> > fi
> > let x=$x+2
> > done
> > }
> >
--
Masami Hiramatsu
that tests a trigger that is initiated by a kernel event
> (sched_waking) and compared to a write to the trace_marker.
>
Yeah, this looks good to me :)
Acked-by: Masami Hiramatsu
Thanks!
> Signed-off-by: Steven Rostedt (VMware)
> ---
> .../trigger-trace-marker-synthetic-kernel.tc
user to ftrace or kprobe.
I didn't remove it because it might be useful for
some users.
Thank you,
---
Masami Hiramatsu (27):
Documentation/kprobes: Fix to remove remaining jprobe
kprobes: Remove jprobe API implementation
kprobes/x86: Remove jprobe implementation
Remove jps from the document, since jprobe is removed.
Signed-off-by: Masami Hiramatsu
---
Documentation/kprobes.txt |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt
index 22208bf2386d..5ae80baf3921 100644
--- a
Remove jprobe API implementations and test cases for
those APIs which is no more used.
Signed-off-by: Masami Hiramatsu
---
Changes in v4:
- Cleanup lib/Kconfig.debug description too.
Changes in v3:
- Remove test cases.
---
include/linux/kprobes.h |3 --
kernel/kprobes.c| 78
Remove arch dependent setjump/longjump functions
and unused fields in kprobe_ctlblk for jprobes
from arch/x86.
Signed-off-by: Masami Hiramatsu
---
arch/x86/include/asm/kprobes.h |3 -
arch/x86/kernel/kprobes/core.c | 96 +---
2 files changed, 3
Remove arch dependent setjump/longjump functions
and unused fields in kprobe_ctlblk for jprobes
from arch/arc.
Signed-off-by: Masami Hiramatsu
---
arch/arc/include/asm/kprobes.h |2 --
arch/arc/kernel/kprobes.c | 38 ++
2 files changed, 2
Remove arch dependent setjump/longjump functions
and unused fields in kprobe_ctlblk for jprobes
from arch/arm.
Signed-off-by: Masami Hiramatsu
---
arch/arm/include/asm/kprobes.h |2 -
arch/arm/include/asm/probes.h |1
arch/arm/probes/kprobes/core.c | 114
Remove arch dependent setjump/longjump functions
and unused fields in kprobe_ctlblk for jprobes
from arch/arm64.
Signed-off-by: Masami Hiramatsu
---
arch/arm64/include/asm/kprobes.h |1 -
arch/arm64/kernel/probes/kprobes.c | 68
2 files changed, 69
Remove arch dependent setjump/longjump functions
and unused fields in kprobe_ctlblk for jprobes
from arch/powerpc. This also reverts commits
related __is_active_jprobe() function.
Signed-off-by: Masami Hiramatsu
---
arch/powerpc/include/asm/kprobes.h |2 -
arch/powerpc/kernel
.
Signed-off-by: Masami Hiramatsu
---
arch/ia64/include/asm/kprobes.h |2 -
arch/ia64/kernel/Makefile |2 -
arch/ia64/kernel/jprobes.S | 90 ---
arch/ia64/kernel/kprobes.c | 70 --
4 files changed, 1 insertion
Remove arch dependent setjump/longjump functions
and unused fields in kprobe_ctlblk for jprobes
from arch/mips.
Signed-off-by: Masami Hiramatsu
---
arch/mips/include/asm/kprobes.h | 13 ---
arch/mips/kernel/kprobes.c | 45 ---
2 files changed
Remove arch dependent setjump/longjump functions
and unused fields in kprobe_ctlblk for jprobes
from arch/sh.
Signed-off-by: Masami Hiramatsu
---
arch/sh/include/asm/kprobes.h |4 ---
arch/sh/kernel/kprobes.c | 51 -
2 files changed, 55
Remove arch dependent setjump/longjump functions
and unused fields in kprobe_ctlblk for jprobes
from arch/s390.
Signed-off-by: Masami Hiramatsu
---
arch/s390/include/asm/kprobes.h |2 -
arch/s390/kernel/kprobes.c | 59 +--
2 files changed, 2
Remove arch dependent setjump/longjump functions
and unused fields in kprobe_ctlblk for jprobes
from arch/sparc.
Signed-off-by: Masami Hiramatsu
---
arch/sparc/include/asm/kprobes.h |1 -
arch/sparc/kernel/kprobes.c | 47 --
2 files changed, 48
Don't check the ->break_handler() from the core kprobes code,
because it was only used by jprobes which got removed.
( In followup patches we'll remove the remaining calls in low level
arch handlers as well and remove the callback altogether. )
Signed-off-by: Mas
Don't call the ->break_handler() from the ARC kprobes code,
because it was only used by jprobes which got removed.
Signed-off-by: Masami Hiramatsu
---
arch/arc/kernel/kprobes.c |7 ---
1 file changed, 7 deletions(-)
diff --git a/arch/arc/kernel/kprobes.c b/arch/arc/kernel/k
Don't call ->break_handler() and remove break_handler
related code since that was only used by jprobe which
got removed.
Signed-off-by: Masami Hiramatsu
---
arch/x86/include/asm/kprobes.h |2 +-
arch/x86/kernel/kprobes/common.h | 10 --
arch/x86/kernel/kprobes/core.c
Don't call the ->break_handler() from the arm kprobes code,
because it was only used by jprobes which got removed.
Signed-off-by: Masami Hiramatsu
---
arch/arm/probes/kprobes/core.c | 11 ---
1 file changed, 11 deletions(-)
diff --git a/arch/arm/probes/kprobes/core.c b/
Don't call the ->break_handler() from the arm kprobes code,
because it was only used by jprobes which got removed.
Signed-off-by: Masami Hiramatsu
---
arch/arm64/kernel/probes/kprobes.c |8
1 file changed, 8 deletions(-)
diff --git a/arch/arm64/kernel/probes/kprobes.c
Don't call the ->break_handler() from the arm kprobes code,
because it was only used by jprobes which got removed.
This also makes skip_singlestep() a static function since
only ftrace-kprobe.c is using this function.
Signed-off-by: Masami Hiramatsu
---
arch/powerpc/include/asm/k
Don't call the ->break_handler() from the ia64 kprobes code,
because it was only used by jprobes which got removed.
Signed-off-by: Masami Hiramatsu
---
arch/ia64/include/uapi/asm/break.h |1 -
arch/ia64/kernel/kprobes.c | 10 --
2 files changed, 11 deletions(-)
di
Don't call the ->break_handler() from the MIPS kprobes code,
because it was only used by jprobes which got removed.
Signed-off-by: Masami Hiramatsu
---
arch/mips/kernel/kprobes.c | 21 +++--
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/arch/mip
Don't call the ->break_handler() from the s390 kprobes code,
because it was only used by jprobes which got removed.
Signed-off-by: Masami Hiramatsu
---
arch/s390/kernel/kprobes.c | 20
1 file changed, 20 deletions(-)
diff --git a/arch/s390/kernel/kprobes.c b/a
Don't call the ->break_handler() from the SH kprobes code,
because it was only used by jprobes which got removed.
Signed-off-by: Masami Hiramatsu
---
arch/sh/kernel/kprobes.c | 14 +-
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/arch/sh/kernel/kprobes.c b
Don't call the ->break_handler() from the sparc64 kprobes code,
because it was only used by jprobes which got removed.
Signed-off-by: Masami Hiramatsu
---
arch/sparc/kernel/kprobes.c | 11 ++-
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/arch/sparc/kernel/kpr
Since int3 and debug exception(for singlestep) are run with
IRQ disabled and while running single stepping we drop IF
from regs->flags, that path must not be preemptible. So we
can remove the preempt disable/enable calls from that path.
Signed-off-by: Masami Hiramatsu
Suggested-by: Ingo Mol
-off-by: Masami Hiramatsu
---
arch/arc/kernel/kprobes.c |5 +++--
arch/arm/probes/kprobes/core.c | 10 +-
arch/arm64/kernel/probes/kprobes.c | 10 +-
arch/ia64/kernel/kprobes.c | 13 -
arch/mips/kernel/kprobes.c |4 ++--
arch
Add a section that explaining how to change the execution
path with kprobes.
Signed-off-by: Masami Hiramatsu
---
Documentation/kprobes.txt | 20
1 file changed, 20 insertions(+)
diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt
index 3e9e99ea751b
Remove jprobe stub APIs from linux/kprobes.h since
the jprobe implementation was completely gone.
Signed-off-by: Masami Hiramatsu
---
include/linux/kprobes.h | 50 ---
1 file changed, 50 deletions(-)
diff --git a/include/linux/kprobes.h b/include
Hi Greg,
Could you pick this series to stable?
Thank you,
On Tue, 8 May 2018 12:25:03 +0100
Russell King - ARM Linux wrote:
> On Fri, May 04, 2018 at 01:14:31PM +0900, Masami Hiramatsu wrote:
> > Hi,
> >
> > This is the 3rd version of bugfix series for kprobes on arm.
&g
Hi Russell,
On Tue, 8 May 2018 12:25:03 +0100
Russell King - ARM Linux wrote:
> On Fri, May 04, 2018 at 01:14:31PM +0900, Masami Hiramatsu wrote:
> > Hi,
> >
> > This is the 3rd version of bugfix series for kprobes on arm.
> > This series fixes 4 different issues whi
by new post call
> trigger users.
>
OK, so after commit the event record, the event handler should not access it.
Looks good to me.
Reviewed-by: Masami Hiramatsu
Thanks,
> Signed-off-by: Steven Rostedt (VMware)
> ---
> include/linux/trace_events.h| 3 +--
> kernel/t
return 1;
> - return 0;
> + /* len means str is dynamic and ends with '\0' */
^^^
!len (or len == 0)?
Thank you,
--
Masami Hiramatsu
On Sat, 12 May 2018 10:29:57 -0700
Florian Fainelli wrote:
> On May 12, 2018 4:31:37 AM PDT, Masami Hiramatsu wrote:
> >Hi Russell,
> >
> >On Tue, 8 May 2018 12:25:03 +0100
> >Russell King - ARM Linux wrote:
> >
> >> On Fri, May 04, 2018 at 01:14:31P
On Sun, 13 May 2018 21:55:38 +0200 (CEST)
Thomas Gleixner wrote:
> On Tue, 8 May 2018, Masami Hiramatsu wrote:
>
> > Remove jprobe arch independent generic code
> > from kernel/kprobes.c.
>
> # git grep register_jprobes
> include/linux/kprobes.h:static inline int reg
+-
> tools/perf/util/probe-finder.c | 152
> ++---
> tools/perf/util/probe-finder.h | 3 +
> tools/perf/util/string.c | 57
> tools/perf/util/string2.h | 1 +
> 6 files changed, 247 insertions(+), 45 deletions(-)
>
> --
> 2.7.4
>
--
Masami Hiramatsu
; My test set includes:
>
> ./perf probe -x . -L "std::vector >::at"
> ./perf probe -x . -L "std::vector >::at:2-3"
>
> ./perf probe -x . -V "std::vector >::at"
> ./perf probe -x . -V "std::vector >::at:2"
> ./perf probe -x
gn arguments to 80 columns where sensible
> o Coalesce formats
>
> Signed-off-by: Joe Perches
Kprobes part looks good to me.
Acked-by: Masami Hiramatsu
Thanks!
--
Masami Hiramatsu
synthetic/preemptdisable/filter
Have you tried if statement as below?
echo "stacktrace if lat > 400" >
/sys/kernel/debug/tracing/events/synthetic/preemptdisable/trigger
As my understanding, filter is used for controlling "recording the event"
and trigger is out of its scope. Trigger itself has own filter as
"if statement", so you should use it.
Thank you,
--
Masami Hiramatsu
above patches.
Result
=
I've tested it with kprobe sanity test on x86-64, and arm64
but for other archs, I just did cross-build test.
Thank you,
---
Masami Hiramatsu (27):
Documentation/kprobes: Fix to remove remaining jprobe
kprobes: Remove jprobe API implementation
k
Remove jprobe API implementations and test cases for
those APIs which is no more used.
Signed-off-by: Masami Hiramatsu
---
Changes in v4:
- Cleanup lib/Kconfig.debug description too.
Changes in v3:
- Remove test cases.
---
include/linux/kprobes.h |3 --
kernel/kprobes.c| 78
Remove arch dependent setjump/longjump functions
and unused fields in kprobe_ctlblk for jprobes
from arch/x86.
Signed-off-by: Masami Hiramatsu
Cc: Thomas Gleixner
Cc: Ingo Molnar
Cc: "H. Peter Anvin"
Cc: x...@kernel.org
---
arch/x86/include/asm/kprobes.h |3 -
arch/x86/kern
Remove arch dependent setjump/longjump functions
and unused fields in kprobe_ctlblk for jprobes
from arch/arm.
Signed-off-by: Masami Hiramatsu
Cc: Russell King
Cc: linux-arm-ker...@lists.infradead.org
---
arch/arm/include/asm/kprobes.h |2 -
arch/arm/include/asm/probes.h |1
arch/arm
Remove arch dependent setjump/longjump functions
and unused fields in kprobe_ctlblk for jprobes
from arch/arm64.
Signed-off-by: Masami Hiramatsu
Acked-by: Will Deacon
Cc: Catalin Marinas
Cc: linux-arm-ker...@lists.infradead.org
---
arch/arm64/include/asm/kprobes.h |1 -
arch/arm64
.
Signed-off-by: Masami Hiramatsu
Cc: Tony Luck
Cc: Fenghua Yu
Cc: linux-i...@vger.kernel.org
---
arch/ia64/include/asm/kprobes.h |2 -
arch/ia64/kernel/Makefile |2 -
arch/ia64/kernel/jprobes.S | 90 ---
arch/ia64/kernel/kprobes.c
Remove arch dependent setjump/longjump functions
and unused fields in kprobe_ctlblk for jprobes
from arch/mips.
Signed-off-by: Masami Hiramatsu
Cc: Ralf Baechle
Cc: James Hogan
Cc: linux-m...@linux-mips.org
---
arch/mips/include/asm/kprobes.h | 13 ---
arch/mips/kernel/kprobes.c
Remove arch dependent setjump/longjump functions
and unused fields in kprobe_ctlblk for jprobes
from arch/s390.
Signed-off-by: Masami Hiramatsu
Cc: Martin Schwidefsky
Cc: Heiko Carstens
Cc: linux-s...@vger.kernel.org
---
arch/s390/include/asm/kprobes.h |2 -
arch/s390/kernel/kprobes.c
801 - 900 of 6170 matches
Mail list logo