Initialize boot-time tracing in core_initcall_sync instead of
fs_initcall, and initialize required tracers (kprobes and synth)
in core_initcall. This will allow the boot-time tracing to trace
__init code from the beginning of postcore_initcall stage.
Signed-off-by: Masami Hiramatsu
---
kernel
Enable creating new trace_array instance in early boot stage.
If the instances directory is not created, postpone it until
the tracefs is initialized.
Signed-off-by: Masami Hiramatsu
---
kernel/trace/trace.c | 53
kernel/trace/trace.h
Add the note about when to start the boot-time tracing.
This will be needed for the people who wants to trace
earlier boot sequence.
Signed-off-by: Masami Hiramatsu
---
Documentation/trace/boottime-trace.rst | 14 ++
1 file changed, 14 insertions(+)
diff --git a/Documentation
Add per-instance tracing_on option, which will be useful with
traceon/traceoff event trigger actions. For example, if we
disable tracing_on by default and set traceon and traceoff on
a pair of events, we can trace functions between the pair of
events.
Signed-off-by: Masami Hiramatsu
---
kernel
Support perf-style return probe ("SYMBOL%return") for uprobe events
as same as kprobe events does.
Signed-off-by: Masami Hiramatsu
---
kernel/trace/trace.c|2 +-
kernel/trace/trace_uprobe.c | 15 ++-
2 files changed, 15 insertions(+), 2 deletions(-)
Add kprobe %return suffix testcase and syntax error tests
for %return suffix.
Signed-off-by: Masami Hiramatsu
---
.../ftrace/test.d/kprobe/kprobe_syntax_errors.tc |6 ++
.../test.d/kprobe/kretprobe_return_suffix.tc | 21
.../ftrace/test.d/kprobe
Add an example of tracing function calls on a specific function.
Signed-off-by: Masami Hiramatsu
---
Documentation/trace/boottime-trace.rst | 20
1 file changed, 20 insertions(+)
diff --git a/Documentation/trace/boottime-trace.rst
b/Documentation/trace/boottime
Add a description of the %return suffix option for kprobe event and
uprobe event.
Signed-off-by: Masami Hiramatsu
---
Changes in v3
- Add description for uprobe events too.
Changes in v2
- Use a tab for indentation as other lines do.
---
Documentation/trace/kprobetrace.rst |2
Add tracing_on option description to the boot-time tracer.
Signed-off-by: Masami Hiramatsu
---
Documentation/trace/boottime-trace.rst |4
1 file changed, 4 insertions(+)
diff --git a/Documentation/trace/boottime-trace.rst
b/Documentation/trace/boottime-trace.rst
index dcb390075ca1
Support perf-style return probe ("SYMBOL%return") for kprobe events.
This will allow boot-time tracing user to define a return probe event.
Signed-off-by: Masami Hiramatsu
---
Changes in v3:
- Update README so that user can notice the kernel supports this feature.
- Add a new err
access non-exist text area to disable or
remove it.
Fixes: 970988e19eb0 ("tracing/kprobe: Add kprobe_event= boot parameter")
Cc: sta...@vger.kernel.org
Signed-off-by: Masami Hiramatsu
---
Changes in v2:
- Fix kprobe_free_init_mem() not depending on CONFIG_DEBUG_FS.
---
include/linux
__raw_spin_lock_init();
0) 7.575 us|}
0) |proc_register() {
0) | _raw_spin_lock_irqsave() {
0) 0.187 us|preempt_count_add();
...
Thank you,
---
Masami Hiramatsu (8):
kprobes: tracing/kprobes: Fix to kill kpr
On Tue, 1 Sep 2020 16:57:10 +0900
Masami Hiramatsu wrote:
> Support perf-style return probe ("SYMBOL%return") in kprobe events.
> This will allow boot-time tracing user to define a return probe event.
>
Hmm, I think I should add this for uprobe event too.
I'll update the
5829] DR0: DR1: 0000 DR2:
>
> [ 634.592964] DR3: DR6: fffe0ff0 DR7:
> 0400
>
> full test log,
> https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20200908/testrun/3171064/suite/linux-log-parser/test/check-kernel-bug-1743477/log
>
> --
> Linaro LKFT
> https://lkft.linaro.org
--
Masami Hiramatsu
On Wed, 9 Sep 2020 00:09:23 +0900
Masami Hiramatsu wrote:
> > > Of course make it lockless then warning is gone.
> > > But even without the lockless patch, this warning can be false-positive
> > > because we prohibit nested kprobe call, right?
> >
> > Yes
On Tue, 8 Sep 2020 12:37:36 +0200
pet...@infradead.org wrote:
> On Thu, Sep 03, 2020 at 10:39:54AM +0900, Masami Hiramatsu wrote:
>
> > > There's a bug, that might make it miss it. I have a patch. I'll send it
> > > shortly.
> >
> > OK, I've confirmed that
On Mon, 07 Sep 2020 13:44:19 -0400
f...@redhat.com (Frank Ch. Eigler) wrote:
> Masami Hiramatsu writes:
>
> > Sorry, for noticing this point, I Cc'd to systemtap. Is systemtap taking
> > care of spinlock too?
>
> On PRREMPT_RT configurations, systemtap uses the raw_spin
Hi,
On Wed, 19 Aug 2020 12:46:52 +0200
Christian Brauner wrote:
> The old _do_fork() helper is removed in favor of the new kernel_clone()
> helper.
> The latter adheres to naming conventions for kernel internal syscall helpers.
This looks good to me.
Acked-by: Masami Hiramatsu
On Wed, 19 Aug 2020 12:46:54 +0200
Christian Brauner wrote:
> The old _do_fork() helper is removed in favor of the new kernel_clone()
> helper.
> The latter adheres to naming conventions for kernel internal syscall helpers.
>
This looks good to me.
Acked-by: Masami Hiramatsu
ll not
> set any of the interrupt bits and will thus never match.
>
> In order to properly fix the situation and allow rcu_read_lock() to
> correctly work, split LOCK_USED into LOCK_USED and LOCK_USED_READ and by
> having .read users set USED_READ and test USED, pure read-recursive
&
On Thu, 3 Sep 2020 10:39:54 +0900
Masami Hiramatsu wrote:
> OK, I've confirmed that the lockdep warns on kretprobe from INT3
> with your fix. Of course make it lockless then warning is gone.
> But even without the lockless patch, this warning can be false-positive
> because we pro
On Wed, 2 Sep 2020 15:42:52 +0200
pet...@infradead.org wrote:
> On Wed, Sep 02, 2020 at 10:19:26PM +0900, Masami Hiramatsu wrote:
> > On Wed, 2 Sep 2020 11:36:13 +0200
> > pet...@infradead.org wrote:
> >
> > > On Wed, Sep 02, 2020 at 05:17:55PM +0900, Masami Hirama
On Wed, 2 Sep 2020 11:36:13 +0200
pet...@infradead.org wrote:
> On Wed, Sep 02, 2020 at 05:17:55PM +0900, Masami Hiramatsu wrote:
>
> > > Ok, but then lockdep will yell at you if you have that enabled and run
> > > the unoptimized things.
> >
> > Oh,
On Wed, 2 Sep 2020 11:48:20 +0200
pet...@infradead.org wrote:
> On Wed, Sep 02, 2020 at 10:35:08AM +0900, Masami Hiramatsu wrote:
> > On Tue, 18 Aug 2020 15:57:43 +0200
> > Peter Zijlstra wrote:
> >
> > > Similar to how we disallow kprobes on any other dynamic
On Wed, 2 Sep 2020 09:02:26 +0200
pet...@infradead.org wrote:
> On Wed, Sep 02, 2020 at 09:37:39AM +0900, Masami Hiramatsu wrote:
> > On Tue, 1 Sep 2020 21:08:08 +0200
> > Peter Zijlstra wrote:
> >
> > > On Sat, Aug 29, 2020 at 09:59:49PM +0900, Masami Hiramatsu w
ned-off-by: Muchun Song
> > Co-developed-by: Chengming Zhou
> > Signed-off-by: Chengming Zhou
> > Acked-by: Masami Hiramatsu
> > ---
> > changelogs in v2:
> > 1. Add a WARN_ON_ONCE in the kill_kprobe() to catch incorrect use of it.
> > 2. Update 'F
On Tue, 18 Aug 2020 15:57:43 +0200
Peter Zijlstra wrote:
> Similar to how we disallow kprobes on any other dynamic text
> (ftrace/jump_label) also disallow kprobes on inline static_call()s.
Looks good to me.
Acked-by: Masami Hiramatsu
BTW, here we already have 5 subsystems which re
On Tue, 1 Sep 2020 21:08:08 +0200
Peter Zijlstra wrote:
> On Sat, Aug 29, 2020 at 09:59:49PM +0900, Masami Hiramatsu wrote:
> > Masami Hiramatsu (16):
> > kprobes: Add generic kretprobe trampoline handler
> > x86/kprobes: Use generic kretprobe trampoline
Support perf-style return probe ("SYMBOL%return") in kprobe events.
This will allow boot-time tracing user to define a return probe event.
Signed-off-by: Masami Hiramatsu
---
kernel/trace/trace_kprobe.c | 21 -
1 file changed, 20 insertions(+), 1 deletion(-)
Add an example of tracing function calls on a specific function.
Signed-off-by: Masami Hiramatsu
---
Documentation/trace/boottime-trace.rst | 20
1 file changed, 20 insertions(+)
diff --git a/Documentation/trace/boottime-trace.rst
b/Documentation/trace/boottime
Add per-instance tracing_on option, which will be useful with
traceon/traceoff event trigger actions. For example, if we
disable tracing_on by default and set traceon and traceoff on
a pair of events, we can trace functions between the pair of
events.
Signed-off-by: Masami Hiramatsu
---
kernel
Add a description of the %return suffix option for kprobe tracer.
Signed-off-by: Masami Hiramatsu
---
Changes in v2
- Use a tab for indentation as other lines do.
---
Documentation/trace/kprobetrace.rst |2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/trace
Add tracing_on option description to the boot-time tracer.
Signed-off-by: Masami Hiramatsu
---
Documentation/trace/boottime-trace.rst |4
1 file changed, 4 insertions(+)
diff --git a/Documentation/trace/boottime-trace.rst
b/Documentation/trace/boottime-trace.rst
index dcb390075ca1
access non-exist text area to disable or
remove it.
Fixes: 970988e19eb0 ("tracing/kprobe: Add kprobe_event= boot parameter")
Cc: sta...@vger.kernel.org
Signed-off-by: Masami Hiramatsu
---
Changes in v2:
- Fix kprobe_free_init_mem() not depending on CONFIG_DEBUG_FS.
---
include/linux
|proc_register() {
0) | _raw_spin_lock_irqsave() {
0) 0.187 us|preempt_count_add();
...
Thank you,
---
Masami Hiramatsu (6):
kprobes: tracing/kprobes: Fix to kill kprobes on initmem after boot
tracing/boot: Add per-instance tracing_on option s
If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
>
> url:
> https://github.com/0day-ci/linux/commits/Masami-Hiramatsu/tracing-boot-Add-new-optio
On Tue, 1 Sep 2020 07:27:45 +0900
Masami Hiramatsu wrote:
> On Mon, 31 Aug 2020 11:50:20 -0700
> Randy Dunlap wrote:
>
> > On 8/31/20 5:46 AM, Masami Hiramatsu wrote:
> > > Add a description of the %return suffix option for kprobe tracer.
> > >
>
On Mon, 31 Aug 2020 11:50:20 -0700
Randy Dunlap wrote:
> On 8/31/20 5:46 AM, Masami Hiramatsu wrote:
> > Add a description of the %return suffix option for kprobe tracer.
> >
> > Signed-off-by: Masami Hiramatsu
> > ---
> > Documentation/trace/kprobetrace.rst
Hi Muchun,
On Mon, 31 Aug 2020 23:47:14 +0800
Muchun Song wrote:
> On Mon, Aug 31, 2020 at 11:12 PM Masami Hiramatsu wrote:
> >
> > Commit 0cb2f1372baa ("kprobes: Fix NULL pointer dereference at
> > kprobe_ftrace_handler") fixed one bug but not comp
the given probe point is not registered to ftrace.
Fix to check the given (going) probe is enabled before invoking
disarm_kprobe_ftrace().
Fixes: 0cb2f1372baa ("kprobes: Fix NULL pointer dereference at
kprobe_ftrace_handler")
Cc: sta...@vger.kernel.org
Signed-off-by: Masami Hiramat
access non-exist text area to disable or
remove it.
Fixes: 970988e19eb0 ("tracing/kprobe: Add kprobe_event= boot parameter")
Cc: sta...@vger.kernel.org
Signed-off-by: Masami Hiramatsu
---
include/linux/kprobes.h |5 +
init/main.c |2 ++
kernel/kprobes.c
Add a description of the %return suffix option for kprobe tracer.
Signed-off-by: Masami Hiramatsu
---
Documentation/trace/kprobetrace.rst |2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/trace/kprobetrace.rst
b/Documentation/trace/kprobetrace.rst
index c1709165c553
Add tracing_on option description to the boot-time tracer.
Signed-off-by: Masami Hiramatsu
---
Documentation/trace/boottime-trace.rst |4
1 file changed, 4 insertions(+)
diff --git a/Documentation/trace/boottime-trace.rst
b/Documentation/trace/boottime-trace.rst
index dcb390075ca1
Add an example of tracing function calls on a specific function.
Signed-off-by: Masami Hiramatsu
---
Documentation/trace/boottime-trace.rst | 20
1 file changed, 20 insertions(+)
diff --git a/Documentation/trace/boottime-trace.rst
b/Documentation/trace/boottime
Add per-instance tracing_on option, which will be useful with
traceon/traceoff event trigger actions. For example, if we
disable tracing_on by default and set traceon and traceoff on
a pair of events, we can trace functions between the pair of
events.
Signed-off-by: Masami Hiramatsu
---
kernel
Support perf-style return probe ("SYMBOL%return") in kprobe events.
This will allow boot-time tracing user to define a return probe event.
Signed-off-by: Masami Hiramatsu
---
kernel/trace/trace_kprobe.c | 21 -
1 file changed, 20 insertions(+), 1 deletion(-)
.054 us|}
0) 3.407 us| }
0) 0.168 us| __raw_spin_lock_init();
0) 7.575 us|}
0) |proc_register() {
0) | _raw_spin_lock_irqsave() {
0) 0.187 us|preempt_count_add();
...
Thank you,
Signed-off-by: Masami Hiramatsu
Acked-by: Guo Ren
---
arch/csky/kernel/probes/kprobes.c | 77 +
1 file changed, 2 insertions(+), 75 deletions(-)
diff --git a/arch/csky/kernel/probes/kprobes.c
b/arch/csky/kernel/probes/kprobes.c
index f0f733b7ac5a
Signed-off-by: Masami Hiramatsu
---
arch/ia64/kernel/kprobes.c | 77 +---
1 file changed, 2 insertions(+), 75 deletions(-)
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c
index 7a7df944d798..fc1ff8a4d7de 100644
--- a/arch/ia64
Signed-off-by: Masami Hiramatsu
---
arch/mips/kernel/kprobes.c | 54 ++--
1 file changed, 3 insertions(+), 51 deletions(-)
diff --git a/arch/mips/kernel/kprobes.c b/arch/mips/kernel/kprobes.c
index d043c2f897fc..54dfba8fa77c 100644
--- a/arch/mips
Signed-off-by: Masami Hiramatsu
---
arch/parisc/kernel/kprobes.c | 76 ++
1 file changed, 4 insertions(+), 72 deletions(-)
diff --git a/arch/parisc/kernel/kprobes.c b/arch/parisc/kernel/kprobes.c
index 77ec51818916..6d21a515eea5 100644
--- a/arch/parisc
Signed-off-by: Masami Hiramatsu
---
Changes in v2:
Fix to use correct trampoline_address.
---
arch/powerpc/kernel/kprobes.c | 53 ++---
1 file changed, 3 insertions(+), 50 deletions(-)
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel
Since we unified the kretprobe trampoline handler from arch/* code,
some functions and objects no need to be exported anymore.
Signed-off-by: Masami Hiramatsu
---
Changes in v4:
- Convert kretprobe_assert() into a BUG_ON().
---
include/linux/kprobes.h | 15 ---
kernel
use
get_kretprobe(ri) instead.
Signed-off-by: Peter Zijlstra (Intel)
Signed-off-by: Masami Hiramatsu
---
Changes in v5:
- Fix not to flush current task's kretprobe_instance
- Remove task scan by merging kretprobe_holder patch
- Use READ_ONCE() and rcu_locked check instead of smp_r/
From: Peter Zijlstra
Only x86 provides try_cmpxchg() outside of the atomic_t interfaces,
provide generic fallbacks to create this interface from the widely
available cmpxchg() function.
Signed-off-by: Peter Zijlstra (Intel)
Acked-by: Will Deacon
---
arch/x86/include/asm/atomic.h
From: Peter Zijlstra
Cc: came...@moodycamel.com
Cc: o...@redhat.com
Cc: w...@kernel.org
Signed-off-by: Peter Zijlstra (Intel)
---
include/linux/freelist.h | 129 ++
1 file changed, 129 insertions(+)
create mode 100644 include/linux/freelist.h
diff
From: Peter Zijlstra
Gets rid of rp->lock, and as a result kretprobes are now fully
lockless.
Signed-off-by: Peter Zijlstra (Intel)
---
Changes
- [MH] expel the llist from anon union in kretprobe_instance
---
include/linux/kprobes.h |8 +++
kernel/kprobes.c| 56
From: Peter Zijlstra
Signed-off-by: Peter Zijlstra (Intel)
---
drivers/gpu/drm/i915/i915_request.c |6 --
include/linux/llist.h | 23 +++
2 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_request.c
Free kretprobe_instance with rcu callback instead of directly
freeing the object in the kretprobe handler context.
This will make kretprobe run safer in NMI context.
Signed-off-by: Masami Hiramatsu
---
Changes in v3:
- Stick the rcu_head with hlist_node in kretprobe_instance
- Make
Signed-off-by: Masami Hiramatsu
---
arch/sh/kernel/kprobes.c | 58 ++
1 file changed, 3 insertions(+), 55 deletions(-)
diff --git a/arch/sh/kernel/kprobes.c b/arch/sh/kernel/kprobes.c
index 318296f48f1a..756100b01e84 100644
--- a/arch/sh/kernel
Use the generic kretprobe trampoline handler, and use the
kernel_stack_pointer(regs) for framepointer verification.
Signed-off-by: Masami Hiramatsu
---
arch/arm64/kernel/probes/kprobes.c | 78 +---
1 file changed, 3 insertions(+), 75 deletions(-)
diff --git
Signed-off-by: Masami Hiramatsu
---
arch/sparc/kernel/kprobes.c | 51 +++
1 file changed, 3 insertions(+), 48 deletions(-)
diff --git a/arch/sparc/kernel/kprobes.c b/arch/sparc/kernel/kprobes.c
index dfbca2470536..217c21a6986a 100644
--- a/arch/sparc
ndent code.
Signed-off-by: Masami Hiramatsu
---
kernel/kprobes.c | 16
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index a0afaa79024e..211138225fa5 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -1359,7 +1359,8 @@ s
Signed-off-by: Masami Hiramatsu
---
arch/s390/kernel/kprobes.c | 79 +---
1 file changed, 2 insertions(+), 77 deletions(-)
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c
index d2a71d872638..fc30e799bd84 100644
--- a/arch/s390
Signed-off-by: Masami Hiramatsu
---
arch/arc/kernel/kprobes.c | 54 ++---
1 file changed, 2 insertions(+), 52 deletions(-)
diff --git a/arch/arc/kernel/kprobes.c b/arch/arc/kernel/kprobes.c
index 7d3efe83cba7..cabef45f11df 100644
--- a/arch/arc/kernel
Use the generic kretprobe trampoline handler. Use regs->ARM_fp
for framepointer verification.
Signed-off-by: Masami Hiramatsu
---
Changes in v2:
- Fix to cast frame_pointer type to void *.
---
arch/arm/probes/kprobes/core.c | 78 ++--
1 file changed
Signed-off-by: Masami Hiramatsu
---
arch/x86/kernel/kprobes/core.c | 108 +---
1 file changed, 3 insertions(+), 105 deletions(-)
diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
index fdadc37d72af..882b95313ad6 100644
--- a/arch
address fixup for user handlers.
Signed-off-by: Masami Hiramatsu
---
Changes in v5:
- Restore actual current_kprobe instead of kprobe_busy.
Changes in v4:
- Remove orig_ret_address
- Change the type of trampoline_address to void *
---
include/linux/kprobes.h | 32 +--
kernel
for x86-64, i386,
arm,
arm64, and mips.
Thank you,
---
Masami Hiramatsu (16):
kprobes: Add generic kretprobe trampoline handler
x86/kprobes: Use generic kretprobe trampoline handler
arm: kprobes: Use generic kretprobe trampoline handler
arm64: kprobes: Use generic kretprobe
On Fri, 28 Aug 2020 20:34:22 +0800
Guo Ren wrote:
> Looks more clear.
>
> Acked-by: Guo Ren
Thanks Guo! I'll add it to the next version.
>
> On Fri, Aug 28, 2020 at 12:39 AM Masami Hiramatsu wrote:
> >
> > Signed-off-by: Masami Hiramatsu
> > ---
>
ter the node is taken off the freelist.
Thanks for the check, but I personally would like to keep it separated
because the memory layouts of those in-kernel list-like data structures
can be changed by debug config option...
Thank you,
--
Masami Hiramatsu
On Fri, 28 Aug 2020 21:29:55 +0900
Masami Hiramatsu wrote:
> From: Peter Zijlstra
In the next version I will drop this since I will merge the kretprobe_holder
things into removing kretporbe hash patch.
However, this patch itself seems fixing a bug of commit 2beaf3280e57
("sched/c
On Fri, 28 Aug 2020 22:29:12 +0200
Peter Zijlstra wrote:
> On Fri, Aug 28, 2020 at 07:32:11PM +, eddy...@trendmicro.com wrote:
> >
> > > -Original Message-
> > > From: Masami Hiramatsu
> > >
> > > @@ -1311,24 +1257,23 @@ void kprobe
On Fri, 28 Aug 2020 21:30:06 +0900
Masami Hiramatsu wrote:
> From: Peter Zijlstra
>
> The kretprobe hash is mostly superfluous, replace it with a per-task
> variable.
>
> This gets rid of the task hash and it's related locking.
>
> The whole invalidate_rp_inst() is t
On Fri, 28 Aug 2020 17:18:06 +0200
pet...@infradead.org wrote:
> On Sat, Aug 29, 2020 at 12:10:10AM +0900, Masami Hiramatsu wrote:
> > On Fri, 28 Aug 2020 14:52:36 +0200
> > pet...@infradead.org wrote:
>
> > > > synchronize_rcu();
> > >
> >
8, 2020 at 09:30:17PM +0900, Masami Hiramatsu wrote:
>
>
> > +static nokprobe_inline struct kretprobe *get_kretprobe(struct
> > kretprobe_instance *ri)
> > +{
> > + /* rph->rp can be updated by unregister_kretprobe() on other cpu */
> > + smp_rmb();
&
c91cbd58 R15: 88807c4e4000
[ 335.337956] FS: () GS:88807d7c()
knlGS:
[ 335.338917] CS: 0010 DS: ES: CR0: 80050033
[ 335.339618] CR2: 005c0a56 CR3: 0222 CR4: 06a0
[ 335.340373] Kernel panic - not syncing: Fatal exception
[ 335.341086] Kernel Offset: disabled
[ 335.341587] ---[ end Kernel panic - not syncing: Fatal exception ]---
--
Masami Hiramatsu
On Fri, 28 Aug 2020 16:19:17 +0200
pet...@infradead.org wrote:
> On Fri, Aug 28, 2020 at 02:11:18PM +, eddy...@trendmicro.com wrote:
> > > From: Masami Hiramatsu
> > >
> > > OK, schedule function will be the key. I guess the senario is..
> > >
> &
On Fri, 28 Aug 2020 15:58:24 +0200
pet...@infradead.org wrote:
> On Fri, Aug 28, 2020 at 10:51:13PM +0900, Masami Hiramatsu wrote:
>
> > OK, schedule function will be the key. I guess the senario is..
> >
> > 1) kretporbe replace the return address with kretprobe_tr
On Fri, 28 Aug 2020 15:37:18 +0200
pet...@infradead.org wrote:
> On Fri, Aug 28, 2020 at 02:31:31PM +0100, Mark Rutland wrote:
> > Hi,
> >
> > On Fri, Aug 28, 2020 at 09:27:22PM +0900, Masami Hiramatsu wrote:
> > > Use the generic kretpro
confidential
> and may be subject to copyright or other intellectual property protection. If
> you are not the intended recipient, you are not authorized to use or disclose
> this information, and we request that you notify us by reply mail or
> telephone and delete the original message from your mail system.
>
> For details about what personal information we collect and why, please see
> our Privacy Notice on our website at: Read privacy
> policy<http://www.trendmicro.com/privacy>
--
Masami Hiramatsu
On Fri, 28 Aug 2020 21:26:38 +0900
Masami Hiramatsu wrote:
> Hi,
>
> Here is the 4th version of the series to unify the kretprobe trampoline
> handler
> and make kretprobe lockless.
>
> Previous version is here;
>
>
> https://lkml.kernel.org/r/159854631442.73
ave to update
the kretprobe handler to use get_kretprobe(ri) for accessing kretprobe
data structure instead of ri->rp. Also, now we remove ri->task.
Signed-off-by: Masami Hiramatsu
---
include/linux/kprobes.h | 17 ++
kernel/kprobes.c
Signed-off-by: Masami Hiramatsu
---
arch/s390/kernel/kprobes.c | 79 +---
1 file changed, 2 insertions(+), 77 deletions(-)
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c
index d2a71d872638..fc30e799bd84 100644
--- a/arch/s390
From: Peter Zijlstra
The kretprobe hash is mostly superfluous, replace it with a per-task
variable.
This gets rid of the task hash and it's related locking.
The whole invalidate_rp_inst() is tedious and could go away once we
drop rp specific ri size.
Signed-off-by: Peter Zijlstra (Intel)
---
From: Peter Zijlstra
Signed-off-by: Peter Zijlstra (Intel)
---
kernel/sched/core.c |9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 2d95dc3f4644..13b0db2d0be2 100644
--- a/kernel/sched/core.c
+++
From: Peter Zijlstra
Only x86 provides try_cmpxchg() outside of the atomic_t interfaces,
provide generic fallbacks to create this interface from the widely
available cmpxchg() function.
Signed-off-by: Peter Zijlstra (Intel)
Acked-by: Will Deacon
---
arch/x86/include/asm/atomic.h
From: Peter Zijlstra
Cc: came...@moodycamel.com
Cc: o...@redhat.com
Cc: w...@kernel.org
Signed-off-by: Peter Zijlstra (Intel)
---
include/linux/freelist.h | 129 ++
1 file changed, 129 insertions(+)
create mode 100644 include/linux/freelist.h
diff
From: Peter Zijlstra
Gets rid of rp->lock, and as a result kretprobes are now fully
lockless.
Signed-off-by: Peter Zijlstra (Intel)
---
Changes
- [MH] expel the llist from anon union in kretprobe_instance
---
include/linux/kprobes.h |8 +++
kernel/kprobes.c| 56
Signed-off-by: Masami Hiramatsu
---
arch/sparc/kernel/kprobes.c | 51 +++
1 file changed, 3 insertions(+), 48 deletions(-)
diff --git a/arch/sparc/kernel/kprobes.c b/arch/sparc/kernel/kprobes.c
index dfbca2470536..217c21a6986a 100644
--- a/arch/sparc
ndent code.
Signed-off-by: Masami Hiramatsu
---
kernel/kprobes.c | 16
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 46510e5000ff..c8de76d230e3 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -1359,7 +1359,8 @@ s
Free kretprobe_instance with rcu callback instead of directly
freeing the object in the kretprobe handler context.
This will make kretprobe run safer in NMI context.
Signed-off-by: Masami Hiramatsu
---
Changes in v3:
- Stick the rcu_head with hlist_node in kretprobe_instance
- Make
From: Peter Zijlstra
Signed-off-by: Peter Zijlstra (Intel)
---
drivers/gpu/drm/i915/i915_request.c |6 --
include/linux/llist.h | 15 +++
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_request.c
Since we unified the kretprobe trampoline handler from arch/* code,
some functions and objects no need to be exported anymore.
Signed-off-by: Masami Hiramatsu
---
Changes in v4:
- Convert kretprobe_assert() into a BUG_ON().
---
include/linux/kprobes.h | 15 ---
kernel
Signed-off-by: Masami Hiramatsu
---
arch/sh/kernel/kprobes.c | 58 ++
1 file changed, 3 insertions(+), 55 deletions(-)
diff --git a/arch/sh/kernel/kprobes.c b/arch/sh/kernel/kprobes.c
index 318296f48f1a..756100b01e84 100644
--- a/arch/sh/kernel
Signed-off-by: Masami Hiramatsu
---
Changes in v2:
Fix to use correct trampoline_address.
---
arch/powerpc/kernel/kprobes.c | 53 ++---
1 file changed, 3 insertions(+), 50 deletions(-)
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel
Signed-off-by: Masami Hiramatsu
---
arch/mips/kernel/kprobes.c | 54 ++--
1 file changed, 3 insertions(+), 51 deletions(-)
diff --git a/arch/mips/kernel/kprobes.c b/arch/mips/kernel/kprobes.c
index d043c2f897fc..54dfba8fa77c 100644
--- a/arch/mips
Signed-off-by: Masami Hiramatsu
---
arch/parisc/kernel/kprobes.c | 76 ++
1 file changed, 4 insertions(+), 72 deletions(-)
diff --git a/arch/parisc/kernel/kprobes.c b/arch/parisc/kernel/kprobes.c
index 77ec51818916..6d21a515eea5 100644
--- a/arch/parisc
Signed-off-by: Masami Hiramatsu
---
arch/ia64/kernel/kprobes.c | 77 +---
1 file changed, 2 insertions(+), 75 deletions(-)
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c
index 7a7df944d798..fc1ff8a4d7de 100644
--- a/arch/ia64
Signed-off-by: Masami Hiramatsu
---
arch/csky/kernel/probes/kprobes.c | 77 +
1 file changed, 2 insertions(+), 75 deletions(-)
diff --git a/arch/csky/kernel/probes/kprobes.c
b/arch/csky/kernel/probes/kprobes.c
index f0f733b7ac5a..589f090f48b9 100644
901 - 1000 of 10513 matches
Mail list logo