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
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, 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/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
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
address fixup for user handlers.
Signed-off-by: Masami Hiramatsu
---
Changes in v4:
- Remove orig_ret_address
- Change the type of trampoline_address to void *
---
include/linux/kprobes.h | 32 ++--
kernel/kprobes.c| 96 +++
2
probe_events
echo 1 > events/kprobes/enable
sleep 1
less trace
cat ../kprobes/list
cd ~/linux/tools/testing/selftests/ftrace
./ftracetest
Then hits a BUG_ON at kernel/kprobes.c:1893 (no test executed, maybe
it happened when removing kretprobes?)
Thank you,
---
Masami Hiramatsu (17):
x.
>
> Running the selftests testcase kprobes_args_use.tc shows the result
> as passed.
Good catch! BTW, this is for tracing (ftrace kprobe events), so the
"tracing/kprobes:" tag is better.
Anyway,
Acked-by: Masami Hiramatsu
Thank you,
>
> Signed-off-by: Vamshi K Sthambamkadi
&g
On Fri, 28 Aug 2020 11:18:13 +0200
pet...@infradead.org wrote:
> On Fri, Aug 28, 2020 at 06:13:41PM +0900, Masami Hiramatsu wrote:
> > On Fri, 28 Aug 2020 10:48:51 +0200
> > pet...@infradead.org wrote:
> >
> > > On Thu, Aug 27, 2020 at 06:12:44PM +0200, Peter Z
t_node llist;
>
> for v4, because after some sleep I'm fairly sure what I wrote above was
> broken.
>
> We'll only use RCU once the freelist is gone, so sharing that storage
> should still be okay.
Hmm, would you mean there is a chance that an instance belongs to
both freelist and llist?
Thank you,
--
Masami Hiramatsu
On Fri, 28 Aug 2020 03:00:59 +0900
Masami Hiramatsu wrote:
> On Thu, 27 Aug 2020 18:12:40 +0200
> Peter Zijlstra wrote:
>
> > +static void invalidate_rp_inst(struct task_struct *t, struct kretprobe *rp)
> > +{
> > + struct invl_rp_ipi iri = {
> > +
ty_rp;
> struct hlist_node *tmp;
Here too.
I'm trying to port this patch on my v4 series. I'll add my RFC patch of
kretprobe_holder too.
Thank you,
--
Masami Hiramatsu
On Fri, 28 Aug 2020 01:38:44 +0900
Masami Hiramatsu wrote:
> +unsigned long __kretprobe_trampoline_handler(struct pt_regs *regs,
> + unsigned long trampoline_address,
> + void *frame_pointer)
> +{
&g
(and still keep lockless, atomic op is in the rcu callback).
Thank you,
--
Masami Hiramatsu
Signed-off-by: Masami Hiramatsu
---
Changes in v2:
Fix to use correct trampoline_address.
---
arch/powerpc/kernel/kprobes.c | 55 -
1 file changed, 5 insertions(+), 50 deletions(-)
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel
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 cbd2ad1af7b7..311033e4b8e4 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
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
---
include/linux/kprobes.h | 15 ---
kernel/kprobes.c| 12
2 files changed, 8 insertions(+), 19
Signed-off-by: Masami Hiramatsu
---
arch/s390/kernel/kprobes.c | 81 ++--
1 file changed, 4 insertions(+), 77 deletions(-)
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c
index d2a71d872638..6009f08836f4 100644
--- a/arch/s390
Signed-off-by: Masami Hiramatsu
---
arch/sparc/kernel/kprobes.c | 52 +++
1 file changed, 4 insertions(+), 48 deletions(-)
diff --git a/arch/sparc/kernel/kprobes.c b/arch/sparc/kernel/kprobes.c
index dfbca2470536..cd34aeaa3ebb 100644
--- a/arch/sparc
Signed-off-by: Masami Hiramatsu
---
arch/csky/kernel/probes/kprobes.c | 78 +
1 file changed, 3 insertions(+), 75 deletions(-)
diff --git a/arch/csky/kernel/probes/kprobes.c
b/arch/csky/kernel/probes/kprobes.c
index f0f733b7ac5a..a891fb422e76 100644
Signed-off-by: Masami Hiramatsu
---
arch/sh/kernel/kprobes.c | 59 +++---
1 file changed, 4 insertions(+), 55 deletions(-)
diff --git a/arch/sh/kernel/kprobes.c b/arch/sh/kernel/kprobes.c
index 318296f48f1a..118927ab63af 100644
--- a/arch/sh/kernel
Signed-off-by: Masami Hiramatsu
---
arch/arc/kernel/kprobes.c | 55 ++---
1 file changed, 3 insertions(+), 52 deletions(-)
diff --git a/arch/arc/kernel/kprobes.c b/arch/arc/kernel/kprobes.c
index 7d3efe83cba7..da615684240b 100644
--- a/arch/arc/kernel
Signed-off-by: Masami Hiramatsu
---
arch/parisc/kernel/kprobes.c | 78 +++---
1 file changed, 6 insertions(+), 72 deletions(-)
diff --git a/arch/parisc/kernel/kprobes.c b/arch/parisc/kernel/kprobes.c
index 77ec51818916..2f9389ae91a3 100644
--- a/arch/parisc
Signed-off-by: Masami Hiramatsu
---
arch/ia64/kernel/kprobes.c | 79 ++--
1 file changed, 4 insertions(+), 75 deletions(-)
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c
index 7a7df944d798..0e725ca9c60d 100644
--- a/arch/ia64
Signed-off-by: Masami Hiramatsu
---
arch/mips/kernel/kprobes.c | 55 +++-
1 file changed, 4 insertions(+), 51 deletions(-)
diff --git a/arch/mips/kernel/kprobes.c b/arch/mips/kernel/kprobes.c
index d043c2f897fc..b58f49b7555e 100644
--- a/arch/mips
the in_nmi() check from pre_kretprobe_handler() since we
can avoid double-lock deadlock from NMI by kprobe_busy_begin/end() and use
kfree_rcu() to release kretprobe_instance. Also, cleanup local functions to
static symbols.
Thank you,
---
Masami Hiramatsu (16):
kprobes: Add generic kretprobe
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 | 79 ++--
1 file changed
Signed-off-by: Masami Hiramatsu
---
arch/x86/kernel/kprobes/core.c | 109 +---
1 file changed, 4 insertions(+), 105 deletions(-)
diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
index fdadc37d72af..7c6473a12cee 100644
--- a/arch
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 | 79 ++--
1 file changed, 4 insertions(+), 75 deletions(-)
diff --git
address fixup for user handlers.
Signed-off-by: Masami Hiramatsu
---
include/linux/kprobes.h | 32 +--
kernel/kprobes.c| 101 +++
2 files changed, 129 insertions(+), 4 deletions(-)
diff --git a/include/linux/kprobes.h b/include/linux
address fixup for user handlers.
Signed-off-by: Masami Hiramatsu
---
include/linux/kprobes.h | 32 +--
kernel/kprobes.c| 101 +++
2 files changed, 129 insertions(+), 4 deletions(-)
diff --git a/include/linux/kprobes.h b/include/linux
Signed-off-by: Masami Hiramatsu
---
arch/csky/kernel/probes/kprobes.c | 78 +
1 file changed, 3 insertions(+), 75 deletions(-)
diff --git a/arch/csky/kernel/probes/kprobes.c
b/arch/csky/kernel/probes/kprobes.c
index f0f733b7ac5a..a891fb422e76 100644
Signed-off-by: Masami Hiramatsu
---
arch/ia64/kernel/kprobes.c | 79 ++--
1 file changed, 4 insertions(+), 75 deletions(-)
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c
index 7a7df944d798..0e725ca9c60d 100644
--- a/arch/ia64
Signed-off-by: Masami Hiramatsu
---
arch/mips/kernel/kprobes.c | 55 +++-
1 file changed, 4 insertions(+), 51 deletions(-)
diff --git a/arch/mips/kernel/kprobes.c b/arch/mips/kernel/kprobes.c
index d043c2f897fc..b58f49b7555e 100644
--- a/arch/mips
Signed-off-by: Masami Hiramatsu
---
arch/parisc/kernel/kprobes.c | 78 +++---
1 file changed, 6 insertions(+), 72 deletions(-)
diff --git a/arch/parisc/kernel/kprobes.c b/arch/parisc/kernel/kprobes.c
index 77ec51818916..2f9389ae91a3 100644
--- a/arch/parisc
Signed-off-by: Masami Hiramatsu
---
Changes in v2:
Fix to use correct trampoline_address.
---
arch/powerpc/kernel/kprobes.c | 55 -
1 file changed, 5 insertions(+), 50 deletions(-)
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel
Signed-off-by: Masami Hiramatsu
---
arch/s390/kernel/kprobes.c | 81 ++--
1 file changed, 4 insertions(+), 77 deletions(-)
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c
index d2a71d872638..6009f08836f4 100644
--- a/arch/s390
Signed-off-by: Masami Hiramatsu
---
arch/sparc/kernel/kprobes.c | 52 +++
1 file changed, 4 insertions(+), 48 deletions(-)
diff --git a/arch/sparc/kernel/kprobes.c b/arch/sparc/kernel/kprobes.c
index dfbca2470536..cd34aeaa3ebb 100644
--- a/arch/sparc
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
---
include/linux/kprobes.h |3 ++-
kernel/kprobes.c| 25
On Thu, 27 Aug 2020 13:49:19 +0200
pet...@infradead.org wrote:
> On Thu, Aug 27, 2020 at 08:37:49PM +0900, Masami Hiramatsu wrote:
>
> > +void recycle_rp_inst(struct kretprobe_instance *ri)
>
> Also note, that at this point there is no external caller of this
> function a
On Thu, 27 Aug 2020 13:48:07 +0200
pet...@infradead.org wrote:
> On Thu, Aug 27, 2020 at 08:37:49PM +0900, Masami Hiramatsu wrote:
> > Free kretprobe_instance with rcu callback instead of directly
> > freeing the object in the kretprobe handler context.
> >
> > This wi
Signed-off-by: Masami Hiramatsu
---
arch/sh/kernel/kprobes.c | 59 +++---
1 file changed, 4 insertions(+), 55 deletions(-)
diff --git a/arch/sh/kernel/kprobes.c b/arch/sh/kernel/kprobes.c
index 318296f48f1a..118927ab63af 100644
--- a/arch/sh/kernel
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 cbd2ad1af7b7..311033e4b8e4 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -1359,7 +1359,8 @@ s
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 | 79 ++--
1 file changed, 4 insertions(+), 75 deletions(-)
diff --git
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 | 79 ++--
1 file changed
Signed-off-by: Masami Hiramatsu
---
arch/arc/kernel/kprobes.c | 55 ++---
1 file changed, 3 insertions(+), 52 deletions(-)
diff --git a/arch/arc/kernel/kprobes.c b/arch/arc/kernel/kprobes.c
index 7d3efe83cba7..da615684240b 100644
--- a/arch/arc/kernel
Signed-off-by: Masami Hiramatsu
---
arch/x86/kernel/kprobes/core.c | 109 +---
1 file changed, 4 insertions(+), 105 deletions(-)
diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
index fdadc37d72af..7c6473a12cee 100644
--- a/arch
;fp and pass it to kretprobe_trampoline_handler() as the
3rd parameter, instead of NULL.
Thank you,
---
Masami Hiramatsu (15):
kprobes: Add generic kretprobe trampoline handler
x86/kprobes: Use generic kretprobe trampoline handler
arm: kprobes: Use generic kretprobe trampoline hand
On Wed, 26 Aug 2020 16:10:25 +0200
pet...@infradead.org wrote:
> On Wed, Aug 26, 2020 at 04:08:52PM +0200, pet...@infradead.org wrote:
> > On Wed, Aug 26, 2020 at 10:46:43PM +0900, Masami Hiramatsu wrote:
> > > static __used __kprobes void *trampoline_handler(st
On Wed, 26 Aug 2020 13:36:15 +
"eddy...@trendmicro.com" wrote:
>
>
> > -Original Message-
> > From: pet...@infradead.org
> > Sent: Wednesday, August 26, 2020 6:26 PM
> > To: Masami Hiramatsu
> > Cc: Eddy Wu (RD-TW) ; linux-kernel@vge
Signed-off-by: Masami Hiramatsu
---
arch/sh/kernel/kprobes.c | 59 +++---
1 file changed, 4 insertions(+), 55 deletions(-)
diff --git a/arch/sh/kernel/kprobes.c b/arch/sh/kernel/kprobes.c
index 318296f48f1a..118927ab63af 100644
--- a/arch/sh/kernel
Signed-off-by: Masami Hiramatsu
---
arch/s390/kernel/kprobes.c | 81 ++--
1 file changed, 4 insertions(+), 77 deletions(-)
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c
index d2a71d872638..6009f08836f4 100644
--- a/arch/s390
Signed-off-by: Masami Hiramatsu
---
arch/mips/kernel/kprobes.c | 55 +++-
1 file changed, 4 insertions(+), 51 deletions(-)
diff --git a/arch/mips/kernel/kprobes.c b/arch/mips/kernel/kprobes.c
index d043c2f897fc..b58f49b7555e 100644
--- a/arch/mips
Signed-off-by: Masami Hiramatsu
---
arch/parisc/kernel/kprobes.c | 78 +++---
1 file changed, 6 insertions(+), 72 deletions(-)
diff --git a/arch/parisc/kernel/kprobes.c b/arch/parisc/kernel/kprobes.c
index 77ec51818916..2f9389ae91a3 100644
--- a/arch/parisc
Signed-off-by: Masami Hiramatsu
---
arch/powerpc/kernel/kprobes.c | 55 -
1 file changed, 5 insertions(+), 50 deletions(-)
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c
index 6ab9b4d037c3..ad4208e6e95b 100644
--- a/arch
Signed-off-by: Masami Hiramatsu
---
arch/sparc/kernel/kprobes.c | 52 +++
1 file changed, 4 insertions(+), 48 deletions(-)
diff --git a/arch/sparc/kernel/kprobes.c b/arch/sparc/kernel/kprobes.c
index dfbca2470536..cd34aeaa3ebb 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 cbd2ad1af7b7..311033e4b8e4 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -1359,7 +1359,8 @@ s
Signed-off-by: Masami Hiramatsu
---
arch/csky/kernel/probes/kprobes.c | 78 +
1 file changed, 3 insertions(+), 75 deletions(-)
diff --git a/arch/csky/kernel/probes/kprobes.c
b/arch/csky/kernel/probes/kprobes.c
index f0f733b7ac5a..a891fb422e76 100644
Signed-off-by: Masami Hiramatsu
---
arch/ia64/kernel/kprobes.c | 79 ++--
1 file changed, 4 insertions(+), 75 deletions(-)
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c
index 7a7df944d798..0e725ca9c60d 100644
--- a/arch/ia64
Signed-off-by: Masami Hiramatsu
---
arch/arm64/kernel/probes/kprobes.c | 79 ++--
1 file changed, 4 insertions(+), 75 deletions(-)
diff --git a/arch/arm64/kernel/probes/kprobes.c
b/arch/arm64/kernel/probes/kprobes.c
index 5290f17a4d80..1e4768001039 100644
Signed-off-by: Masami Hiramatsu
---
arch/arc/kernel/kprobes.c | 55 ++---
1 file changed, 3 insertions(+), 52 deletions(-)
diff --git a/arch/arc/kernel/kprobes.c b/arch/arc/kernel/kprobes.c
index 7d3efe83cba7..da615684240b 100644
--- a/arch/arc/kernel
address fixup for user handlers.
Signed-off-by: Masami Hiramatsu
---
include/linux/kprobes.h | 32 +--
kernel/kprobes.c| 101 +++
2 files changed, 129 insertions(+), 4 deletions(-)
diff --git a/include/linux/kprobes.h b/include/linux
Signed-off-by: Masami Hiramatsu
---
arch/x86/kernel/kprobes/core.c | 109 +---
1 file changed, 4 insertions(+), 105 deletions(-)
diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
index 2ca10b770cff..45cfaa097110 100644
--- a/arch
Use the generic kretprobe trampoline handler. Use regs->ARM_fp
for framepointer verification.
Signed-off-by: Masami Hiramatsu
---
arch/arm/probes/kprobes/core.c | 79 ++--
1 file changed, 4 insertions(+), 75 deletions(-)
diff --git a/arch/arm/pro
zle.
Thank you,
---
Masami Hiramatsu (14):
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 trampoline handler
arc: kprobes:
On Wed, 26 Aug 2020 18:06:45 +0900
Masami Hiramatsu wrote:
> On Wed, 26 Aug 2020 17:22:39 +0900
> Masami Hiramatsu wrote:
>
> > On Wed, 26 Aug 2020 07:07:09 +
> > "eddy...@trendmicro.com" wrote:
> >
> > >
> > > > ---
On Wed, 26 Aug 2020 17:22:39 +0900
Masami Hiramatsu wrote:
> On Wed, 26 Aug 2020 07:07:09 +
> "eddy...@trendmicro.com" wrote:
>
> >
> > > -Original Message-
> > > From: pet...@infradead.org
> > > Sent: Tuesday, August 25, 2020 8
* If we have multiple consumers with llist_del_first used in one consumer, and
^^^
* llist_del_first or llist_del_all used in other consumers, then a lock is
* needed.
pre_handler_kretprobe() can be invoked simultaneously on the different CPUs
if those are calling the same probed function.
Thank you,
--
Masami Hiramatsu
On Wed, 26 Aug 2020 07:07:09 +
"eddy...@trendmicro.com" wrote:
>
> > -Original Message-
> > From: pet...@infradead.org
> > Sent: Tuesday, August 25, 2020 8:09 PM
> > To: Masami Hiramatsu
> > Cc: Eddy Wu (RD-TW) ; linux-kernel@vger.kernel
On Tue, 25 Aug 2020 16:10:58 +0200
pet...@infradead.org wrote:
> On Tue, Aug 25, 2020 at 03:30:05PM +0200, pet...@infradead.org wrote:
> > On Tue, Aug 25, 2020 at 10:15:55PM +0900, Masami Hiramatsu wrote:
>
> > > OK, this looks good to me too.
> > > I'll make a ser
On Tue, 25 Aug 2020 15:30:05 +0200
pet...@infradead.org wrote:
> On Tue, Aug 25, 2020 at 10:15:55PM +0900, Masami Hiramatsu wrote:
>
> > > damn... one last problem is dangling instances.. so close.
> > > We can apparently unregister a kretprobe wh
On Tue, 25 Aug 2020 14:09:11 +0200
pet...@infradead.org wrote:
> On Tue, Aug 25, 2020 at 03:15:38PM +0900, Masami Hiramatsu wrote:
>
> > From 24390dffe6eb9a3e95f7d46a528a1dcfd716dc81 Mon Sep 17 00:00:00 2001
> > From: Masami Hiramatsu
> > Date: Tue, 25 Aug 2020 01
Hi Eddy,
On Mon, 24 Aug 2020 16:41:58 +
"eddy...@trendmicro.com" wrote:
> > -Original Message-
> > From: Masami Hiramatsu
> > Sent: Monday, August 24, 2020 11:54 PM
> > To: Eddy Wu (RD-TW)
> > Cc: Peter Zijlstra ; linux-kernel@vger.kernel.or
> + goto out;
> }
>
> arch_prepare_kretprobe(ri, regs);
> @@ -1978,6 +1973,8 @@ static int pre_handler_kretprobe(struct kprobe *p,
> struct pt_regs *regs)
> rp->nmissed++;
> raw_spin_unlock_irqrestore(>lock, flags);
> }
> +out:
> + atomic_dec(>recursion);
> return 0;
> }
> NOKPROBE_SYMBOL(pre_handler_kretprobe);
>
--
Masami Hiramatsu
1001 - 1100 of 10539 matches
Mail list logo