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
--- a
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
f this pazzle.
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:
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
ng is needed:
* 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
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
raw_spin_unlock_irqrestore(&rp->lock, flags);
> - return 0;
> + 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(&rp->lock, flags);
> }
> +out:
> + atomic_dec(&rp->recursion);
> return 0;
> }
> NOKPROBE_SYMBOL(pre_handler_kretprobe);
>
--
Masami Hiramatsu
return in_nmi()
}
@arch/x86/kernel/kprobes/core.c
bool arch_kprobe_in_nmi(void)
{
/*
* Since the int3 is one of NMI, we have to check in_nmi() is
* bigger than 1 << NMI_SHIFT instead of !0.
*/
return in_nmi() > (1 << NMI_SHIFT);
}
And use arch_kprobe_in_nmi() instead of in_nmi() in kprobes.c.
Thanks,
--
Masami Hiramatsu
On Thu, 20 Aug 2020 12:38:35 +0200
Peter Zijlstra wrote:
Looks good to me.
Acked-by: Masami Hiramatsu
Thanks,
>
> Signed-off-by: Peter Zijlstra (Intel)
> ---
> arch/x86/include/asm/kprobes.h |4
> arch/x86/kernel/traps.c| 10 --
> 2 files cha
On Fri, 21 Aug 2020 21:28:43 +0900
Masami Hiramatsu wrote:
> Hi Muchun,
>
> On Thu, 20 Aug 2020 11:19:33 +0800
> Muchun Song wrote:
>
> > If a kprobe is marked as gone, we should not kill it again. Otherwise,
> > we can disarm the kprobe more than once. In that
do not work.
>
Good catch! Hmm, I think we also need an assertion in
kill_kprobe() so that p is already gone. Anyway, this looks good to me.
Acked-by: Masami Hiramatsu
Thanks!
> Fixes: 0cb2f1372baa ("kprobes: Fix NULL pointer dereference at
> kprobe_ftrace_handler")
>
g
> Cc: Andi Kleen
> Cc: Ard Biesheuvel
> Cc: Jessica Yu
> Cc: Mark Rutland ,
> Cc: Masami Hiramatsu
> Cc: Mike Rapoport
> Cc: Peter Zijlstra
> Cc: Russell King
> Cc: Will Deacon
> Signed-off-by: Jarkko Sakkinen
OK, this looks good to me.
Acked-by: Masami Hiram
On Thu, 13 Aug 2020 21:01:00 -0400
Steven Rostedt wrote:
> On Mon, 10 Aug 2020 17:35:11 +0900
> Masami Hiramatsu wrote:
>
>
> > --- /dev/null
> > +++ b/tools/bootconfig/scripts/xbc.sh
> > @@ -0,0 +1,56 @@
> > +#!/bin/sh
> > +# SPDX-License-Identi
Since the ftrace current setting may conflict with the new setting
from bootconfig, add the --init option to initialize ftrace before
setting for bconf2ftrace.sh.
E.g.
$ bconf2ftrace.sh --init boottrace.bconf
This initialization method copied from selftests/ftrace.
Signed-off-by: Masami
usually you'll run it as
# ftrace2bconf.sh > ftrace.bconf
Note that some ftrace configurations are not supported. For example,
function-call/callgraph trace/notrace settings are not supported because
the wildcard has been expanded and lost in the ftrace anymore.
Signed-off-by: Masami H
Make all functions static except for main(). This is just a cleanup.
Signed-off-by: Masami Hiramatsu
---
tools/bootconfig/main.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c
index 78025267df20
ripts/bconf2ftrace.sh
create mode 100644 tools/bootconfig/scripts/ftrace.sh
create mode 100755 tools/bootconfig/scripts/ftrace2bconf.sh
create mode 100644 tools/bootconfig/scripts/xbc.sh
--
Masami Hiramatsu (Linaro)
Add list option (-l) to show the bootconfig in the list style.
This is same output of /proc/bootconfig. So users can check
how their bootconfig will be shown in procfs. This will help
them to write a user-space script to parse the /proc/bootconfig.
Signed-off-by: Masami Hiramatsu
---
tools
s it may act the same.
>
> That is, ret == size will make size = 0 with the size -= ret, and we
> get the same result.
>
> OK, you can drop the patch. Thanks for the review!
Thanks Andrew, you're right. If size == ret, then size -= ret makes
size = 0 and after that, the
can apply it directly.
# bconf2ftrace.sh --apply ftrace.bconf
Note that some boot-time tracing parameters under kernel.* are not able
to set via tracefs nor procfs (e.g. tp_printk, traceoff_on_warning.),
so those are ignored.
Signed-off-by: Masami Hiramatsu
---
Changes in v2
- Check
Show the bootconfig compact tree from the bootconfig file
instead of an initrd if the given file has no magic number
and is smaller than 32KB.
User can use this for checking the syntax error or output
checking before applying the bootconfig to initrd.
Signed-off-by: Masami Hiramatsu
---
tools
usually you'll run it as
# ftrace2bconf.sh > ftrace.bconf
Note that some ftrace configurations are not supported. For example,
function-call/callgraph trace/notrace settings are not supported because
the wildcard has been expanded and lost in the ftrace anymore.
Signed-off-by: Masami H
Since the ftrace current setting may conflict with the new setting
from bootconfig, add the --init option to initialize ftrace before
setting for bconf2ftrace.sh.
E.g.
$ bconf2ftrace.sh --init boottrace.bconf
This initialization method copied from selftests/ftrace.
Signed-off-by: Masami
Make all functions static except for main(). This is just a cleanup.
Signed-off-by: Masami Hiramatsu
---
tools/bootconfig/main.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c
index 78025267df20
Add list option (-l) to show the bootconfig in the list style.
This is same output of /proc/bootconfig. So users can check
how their bootconfig will be shown in procfs. This will help
them to write a user-space script to parse the /proc/bootconfig.
Signed-off-by: Masami Hiramatsu
---
tools
can apply it directly.
# bconf2ftrace.sh --apply ftrace.bconf
Note that some boot-time tracing parameters under kernel.* are not able
to set via tracefs nor procfs (e.g. tp_printk, traceoff_on_warning.),
so those are ignored.
Signed-off-by: Masami Hiramatsu
---
tools/bootconfig/scri
s the bootconfig as a key-value list, as same as /proc/bootconfig.
Thank you,
---
Masami Hiramatsu (6):
tools/bootconfig: Show bootconfig compact tree from bootconfig file
tools/bootconfig: Add list option
tools/bootconfig: Make all functions static
tools/bootconfig: Add a scri
Show the bootconfig compact tree from the bootconfig file
instead of an initrd if the given file has no magic number
and is smaller than 32KB.
User can use this for checking the syntax error or output
checking before applying the bootconfig to initrd.
Signed-off-by: Masami Hiramatsu
---
tools
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: 09fc67b500c7f0bb1b5ed774197ac7f2c5285655
Gitweb:
https://git.kernel.org/tip/09fc67b500c7f0bb1b5ed774197ac7f2c5285655
Author:Masami Hiramatsu
AuthorDate:Fri, 17 Jul 2020 17:42:55 +09:00
.auug.org.au
>
> Reported-by: Stephen Rothwell
> Fixes: 0cb2f1372baa ("kprobes: Fix NULL pointer dereference at
> kprobe_ftrace_handler")
> Signed-off-by: Muchun Song
Looks good to me.
Acked-by: Masami Hiramatsu
Thank you!
> ---
> kernel/kprobes.c | 17 +++
uct kprobe *p)
> > +{
> > + return -ENODEV
> > +}
> > #endif
>
> Looks like that would work. Care to send a formal patch. Could you also
> change arm_kprobe_ftrace() as well?
Looks good to me too as far as updating it to static inline function.
Thank you,
--
Masami Hiramatsu
Hi Steve,
On Tue, 4 Aug 2020 16:59:29 -0400
Steven Rostedt wrote:
> On Tue, 4 Aug 2020 11:52:13 +0900
> Masami Hiramatsu wrote:
>
> > Since the parse_args() stops parsing at '--', bootconfig_params()
> > will never get the '--' as param and initargs_f
quot;)
Cc: sta...@vger.kernel.org
Reported-by: Arvind Sankar
Suggested-by: Arvind Sankar
Signed-off-by: Masami Hiramatsu
---
Changes in v2:
- Remvoe unneede !IS_ERR().
---
init/main.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/init/main.c b/init/main
quot;)
Cc: sta...@vger.kernel.org
Reported-by: Arvind Sankar
Suggested-by: Arvind Sankar
Signed-off-by: Masami Hiramatsu
---
Changes in v2:
- Remvoe unneede !IS_ERR().
---
init/main.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/init/main.c b/init/main
OK, I'll update it.
>
> Thanks!
>
> (/me is currently going through all his patchwork patches to pull in
> for the merge window.)
Thank you!
>
> -- Steve
--
Masami Hiramatsu
e
> parsing. AFAICT, initargs_found will never be set to true here, because
> parse_args handles "--" itself by immediately returning: it doesn't
> invoke the callback for it. So you'd instead have to check the return of
> parse_args("bootconfig"...) to d
NE but not disarm the kprobe in the step 4).
> > The step 5) also do not disarm the kprobe when unregister kprobe. So
> > we do not remove the ip from the filter. In this case, when the module
> > loads again in the step 6), we will replace the code to ftrace_caller
> > vi
On Wed, 29 Jul 2020 09:13:21 +0300
Ard Biesheuvel wrote:
> On Wed, 29 Jul 2020 at 04:51, Masami Hiramatsu wrote:
> >
> > On Tue, 28 Jul 2020 20:51:08 +0300
> > Ard Biesheuvel wrote:
> >
> > > On Tue, 28 Jul 2020 at 16:35, Masami Hiramatsu
> > >
Hi Steve,
On Thu, 16 Jul 2020 10:27:03 +0900
Masami Hiramatsu wrote:
> Hi Steve,
>
> On Wed, 15 Jul 2020 20:02:12 -0400
> Steven Rostedt wrote:
>
> > On Thu, 16 Jul 2020 07:38:43 +0900
> > Masami Hiramatsu wrote:
> >
> >
> > > > So the en
On Tue, 28 Jul 2020 20:51:08 +0300
Ard Biesheuvel wrote:
> On Tue, 28 Jul 2020 at 16:35, Masami Hiramatsu wrote:
> >
> > On Tue, 28 Jul 2020 13:56:43 +0300
> > Ard Biesheuvel wrote:
> >
> > > On Tue, 28 Jul 2020 at 11:17, Masami Hiramatsu
> > > wr
On Tue, 28 Jul 2020 13:56:43 +0300
Ard Biesheuvel wrote:
> On Tue, 28 Jul 2020 at 11:17, Masami Hiramatsu wrote:
> > > Masami or Peter should correct me if I am wrong, but it seems to me
> > > that the way kprobes uses these pages does not require them to be in
> > &g
The following commit has been merged into the perf/core branch of tip:
Commit-ID: 112a0e4171e111e963aada3fe790c71accf4d705
Gitweb:
https://git.kernel.org/tip/112a0e4171e111e963aada3fe790c71accf4d705
Author:Masami Hiramatsu
AuthorDate:Tue, 28 Jul 2020 16:34:00 +09:00
gt;
> > > > * Jarkko Sakkinen wrote:
> > > >
> > > > > Use text_alloc() and text_free() instead of module_alloc() and
> > > > > module_memfree() when an arch provides them.
> > > > >
> > > > > Cc: linux...@kvack.org
nted better.
Good catch! This is not needed anymore.
It has been introduced to avoid conflict with text modification, at that
point we didn't get text_mutex. But after commit f1c6ece23729 ("kprobes: Fix
potential deadlock in kprobe_optimizer()") moved the text_mutex in the current
gt;
> warning: no file matchesF:Documentation/staging/kprobes.rst
>
> Adjust the entry to the new file location.
>
Good catch!
Acked-by: Masami Hiramatsu
Thanks!
> Signed-off-by: Lukas Bulwahn
> ---
> Naveen, Masami-san, please ack.
> Jonathan, please pick this mi
On Fri, 24 Jul 2020 15:06:11 +0800
Jisheng Zhang wrote:
>
> On Tue, 21 Jul 2020 22:24:55 +0900 Masami Hiramatsu wrote:
>
> >
> >
> > Hi Jisheng,
>
> Hi,
>
> >
> > Would you be still working on this series?
>
> I will rebase the
vack.org
> > Cc: Andi Kleen
> > Cc: Masami Hiramatsu
> > Cc: Peter Zijlstra
> > Signed-off-by: Jarkko Sakkinen
> > ---
> > kernel/kprobes.c | 9 +
> > 1 file changed, 9 insertions(+)
> >
> > diff --git a/kernel/kprobes.c b/kernel/kprobes.c
ompile time dependency, e.g. module_state, right?
Thank you,
>
> Cc: linux...@kvack.org
> Cc: Andi Kleen
> Cc: Peter Zijlstra
> Suggested-by: Masami Hiramatsu
> Signed-off-by: Jarkko Sakkinen
> ---
> include/linux/module.h | 18 ++
>
king a
placeholder with nop at the entry of the functions for direct patching.
Thank you,
>
> On Tue, Jul 21, 2020 at 9:27 PM Masami Hiramatsu wrote:
> >
> > On Wed, 15 Jul 2020 00:24:54 +0800
> > Guo Ren wrote:
> >
> > > Thx Masami,
> > >
>
On Wed, 22 Jul 2020 16:39:53 +0800
Guo Ren wrote:
> Hi Masami,
>
> On Tue, Jul 21, 2020 at 9:27 PM Masami Hiramatsu wrote:
> >
> > On Wed, 15 Jul 2020 00:24:54 +0800
> > Guo Ren wrote:
> >
> > > Thx Masami,
> > >
> > > On
For each line:
> If doesn't contain `\bxmlns\b`:
> For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
> If both the HTTP and HTTPS versions
> return 200 OK and serve the same content:
> Replace HTTP with HTTPS.
>
Acked-by: Masami
Hi Naveen,
On Tue, 21 Jul 2020 17:18:19 +0530
"Naveen N. Rao" wrote:
> This series updates some of the URLs in the kprobes document and moves
> the same under trace/ directory.
Thank you very much for fixing and updating it!
Acked-by: Masami Hiramatsu
for this
On Wed, 15 Jul 2020 00:24:54 +0800
Guo Ren wrote:
> Thx Masami,
>
> On Tue, Jul 14, 2020 at 7:38 PM Masami Hiramatsu wrote:
> >
> > On Mon, 13 Jul 2020 23:39:21 +
> > guo...@kernel.org wrote:
> >
> > > From: Guo Ren
> > >
> > >
Hi Jisheng,
Would you be still working on this series?
If you are still want to put a probe on func+4, it is OK if you can
completely emulate the 1st instruction. (lr save on the stack and
change the regs->sp)
Thank you,
On Thu, 26 Dec 2019 18:26:07 +0900
Masami Hiramatsu wrote:
> On T
On Tue, 14 Jul 2020 00:02:49 +0200
"Alexander A. Klimov" wrote:
>
>
> Am 13.07.20 um 16:20 schrieb Masami Hiramatsu:
> > Hi Naveen and Alexander,
> >
> > On Fri, 10 Jul 2020 19:14:47 +0530
> > "Naveen N. Rao" wrote:
> >
> >&
functions with
> > CONFIG_ARCH_HAS_TEXT_ALLOC. Provide default/fallback implementation
> > wrapping module_alloc() and module_memfree().
> >
> > Cc: Andi Kleen
> > Cc: Masami Hiramatsu
> > Suggested-by: Peter Zijlstra
> > Signed-off-by: Jarkko Sakkinen
> > ---
> &
On Thu, 16 Jul 2020 18:47:14 -0300
Arnaldo Carvalho de Melo wrote:
> Em Fri, Jul 10, 2020 at 10:11:04PM +0900, Masami Hiramatsu escreveu:
> > There is a case that the several same-name symbols points
> > same address. In that case, perf probe returns an error.
> >
> >
On Tue, 14 Jul 2020 14:08:12 +0200
Joerg Roedel wrote:
> From: Joerg Roedel
>
> Add a function to check whether an instruction has a REP prefix.
This looks good to me.
Reviewed-by: Masami Hiramatsu
Thank you,
>
> Signed-off-by: Joerg Roedel
> ---
> arch/x86/in
re-decompression boot-code has no support for applying ELF
> relocations, so initialize these arrays at runtime in the
> pre-decompression code to make sure all pointers are correctly
> initialized.
OK, This looks good to me.
Acked-by: Masami Hiramatsu
Thank you,
>
> Signed-off
_within_kprobe_blacklist().
This series looks good to me.
Acked-by: Masami Hiramatsu
To fix the build error with ipw2x00 driver, please feel free to
include my fix patch.
Thank you,
>
>
> Daniel Thompson (3):
> kgdb: Honour the kprobe blocklist when setting breakpoints
> kgdb:
gt; wrapping module_alloc() and module_memfree().
Doesn't it depend on CONFIG_MODULE?
Thank you,
>
> Cc: Andi Kleen
> Cc: Masami Hiramatsu
> Suggested-by: Peter Zijlstra
> Signed-off-by: Jarkko Sakkinen
> ---
> include/linux/vmalloc.h | 23 +++
> 1
Hi Steve,
On Wed, 15 Jul 2020 20:02:12 -0400
Steven Rostedt wrote:
> On Thu, 16 Jul 2020 07:38:43 +0900
> Masami Hiramatsu wrote:
>
>
> > > So the end of the initrd would have:
> > >
> > > [data][size/checksum/magic][more-data][size/checksum/magic]
&
On Wed, 15 Jul 2020 16:45:04 -0400
Steven Rostedt wrote:
> On Thu, 16 Jul 2020 01:00:21 +0900
> Masami Hiramatsu wrote:
>
> > With this change, if the bootloader wants to change some value
> > in the default bootconfig, it doesn't need to parse the existing
>
Add a sentence about bootconfig override operator (":=") to
bootconfig.rst.
Signed-off-by: Masami Hiramatsu
---
Documentation/admin-guide/bootconfig.rst | 11 +++
1 file changed, 11 insertions(+)
diff --git a/Documentation/admin-guide/bootconfig.rst
b/Documentation/a
e existing bootconfig and update it. However, with this
assignment, it can just append the updated (partial) bootconfig
text at the tail of existing one without parsing it.
(Of course, it must update the size, checksum and magic,
but that will be done easily)
Signed-off-by: Masami Hiramatsu
Add some testcases and examples for value override operator.
Signed-off-by: Masami Hiramatsu
---
tools/bootconfig/samples/bad-override.bconf |3 +++
tools/bootconfig/samples/bad-override2.bconf |3 +++
tools/bootconfig/samples/good-override.bconf |6 ++
tools/bootconfig/test
an just append the new configs at the tail
of the bootconfig and update the footer (size, checksum and magic
word).
Thank you,
---
Masami Hiramatsu (3):
lib/bootconfig: Add override operator support
tools/bootconfig: Add testcases for value override operator
Documentation:
On Wed, 15 Jul 2020 01:32:28 +0300
Jarkko Sakkinen wrote:
> Add wrappers to take the modules "big lock" in order to encapsulate
> conditional compilation (CONFIG_MODULES) inside the wrapper.
>
> Cc: Andi Kleen
> Suggested-by: Masami Hiramatsu
> Signed-off-by: Jarkk
/* Don't need to check busy - this should have gone. */
> __unregister_trace_kprobe(tk);
> ret = __register_trace_kprobe(tk);
> +#ifdef CONFIG_MODULES
> if (ret)
> pr_warn("Failed to re-register probe %s on %s:
> %d\n",
> trace_probe_name(&tk->tp),
> mod->name, ret);
> +#endif
I guess this CONFIG_MODULES is for avoiding build error according to mod->name,
if so, please use module_name(mod) macro instead of this #ifdef.
> }
> }
> mutex_unlock(&event_mutex);
> --
> 2.25.1
>
--
Masami Hiramatsu
preempt_enable();
> diff --git a/kernel/module.c b/kernel/module.c
> index aa183c9ac0a2..8adeb126b02c 100644
> --- a/kernel/module.c
> +++ b/kernel/module.c
> @@ -56,6 +56,7 @@
> #include
> #include
> #include
> +#include
> #include
> #include "module-internal.h"
>
> @@ -2151,7 +2152,12 @@ void __weak module_memfree(void *module_region)
>* supported by vmalloc.
>*/
> WARN_ON(in_interrupt());
> +
> +#ifdef CONFIG_ARCH_HAS_TEXT_ALLOC
> + text_free(module_region);
> +#else
> vfree(module_region);
> +#endif
> }
>
> void __weak module_arch_cleanup(struct module *mod)
> @@ -2786,9 +2792,13 @@ static void dynamic_debug_remove(struct module *mod,
> struct _ddebug *debug)
>
> void * __weak module_alloc(unsigned long size)
> {
> +#ifdef CONFIG_ARCH_HAS_TEXT_ALLOC
> + return text_alloc(size);
> +#else
> return __vmalloc_node_range(size, 1, VMALLOC_START, VMALLOC_END,
> GFP_KERNEL, PAGE_KERNEL_EXEC, VM_FLUSH_RESET_PERMS,
> NUMA_NO_NODE, __builtin_return_address(0));
> +#endif
> }
Please don't touch kernel/module.c too. This seems to make things complicated.
Thank you,
--
Masami Hiramatsu
On Tue, 14 Jul 2020 22:25:04 +0800
Wei Yongjun wrote:
> Fix sparse build warning:
>
> init/main.c:305:6: warning:
> symbol 'xbc_namebuf' was not declared. Should it be static?
Good catch!
Acked-by: Masami Hiramatsu
Thank you,
>
> Signed-off-by: Wei Yongj
> >
> > module_alloc() ensures the memory provided is within that range.
>
> Right, a relative jump is placed instead of 0xcc to the breakpoint?
Yes, a relative (far) jump is used. So the target address (copied buffer)
must be in +-2GB range from the jump.
Thank you,
--
Masami Hiramatsu
On Mon, 13 Jul 2020 08:49:55 +0300
Jarkko Sakkinen wrote:
> On Fri, Jul 10, 2020 at 01:32:38PM +0200, Peter Zijlstra wrote:
> > On Fri, Jul 10, 2020 at 07:32:57PM +0900, Masami Hiramatsu wrote:
> > > > - page = module_alloc(PAGE_SIZE);
> > > >
] fei_kprobe_handler+0x2c/0x5a
> [ 313.197687] [] kprobe_breakpoint_handler+0xb4/0x18a
> [ 313.200054] [] do_trap_break+0x36/0xca
> [ 313.202147] [] ret_from_exception+0x0/0xc
> [ 313.204556] [] ret_from_syscall+0x0/0x2
> -sh: can't fork: Invalid argument
OK, this looks good to me.
Review
| |
> sh-87[000] 551.557031: myprobe:
> (_do_fork+0x1a/0x2e6) dfd=0xffe00020af7e filename=0xffe00020b34e
> flags=0xffe00101e7c0 mode=0x20af86ffe0
>
> cat /sys/kernel/debug/kprobes/list
> ffe00020af7e k _do_fork+0x1a
ruction pointer.
>
Looks Good to me:)
Reviewed-by: Masami Hiramatsu
Thank you!
> Signed-off-by: Guo Ren
> Cc: Masami Hiramatsu
> Cc: Palmer Dabbelt
> ---
> arch/riscv/kernel/mcount-dyn.S | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a
Hi Guo,
On Tue, 14 Jul 2020 07:47:20 +0800
Guo Ren wrote:
> Hi Masami,
>
> On Sun, Jul 12, 2020 at 9:37 PM Masami Hiramatsu wrote:
> >
> > On Sat, 11 Jul 2020 09:32:01 +0800
> > Guo Ren wrote:
> >
> > > Thx Masami,
> > >
> > > On
On Mon, 13 Jul 2020 23:39:16 +
guo...@kernel.org wrote:
> From: Patrick Stählin
>
> Needed for kprobes support. Copied and adapted from arm64 code.
>
> Guo Ren fixup pt_regs type for linux-5.8-rc1.
>
Looks good to me.
Reviewed-by: Masami Hiramatsu
Thank you!
> S
eletions(-)
> create mode 100644 arch/riscv/include/asm/probes.h
> create mode 100644 arch/riscv/include/asm/uprobes.h
> create mode 100644 arch/riscv/kernel/probes/Makefile
> create mode 100644 arch/riscv/kernel/probes/decode-insn.c
> create mode 100644 arch/riscv/kernel/probes/decode-insn.h
> create mode 100644 arch/riscv/kernel/probes/ftrace.c
> create mode 100644 arch/riscv/kernel/probes/kprobes.c
> create mode 100644 arch/riscv/kernel/probes/kprobes_trampoline.S
> create mode 100644 arch/riscv/kernel/probes/simulate-insn.c
> create mode 100644 arch/riscv/kernel/probes/simulate-insn.h
> create mode 100644 arch/riscv/kernel/probes/uprobes.c
> create mode 100644 arch/riscv/lib/error-inject.c
>
> --
> 2.7.4
>
--
Masami Hiramatsu
Hi Naveen and Alexander,
On Fri, 10 Jul 2020 19:14:47 +0530
"Naveen N. Rao" wrote:
> Masami Hiramatsu wrote:
> > On Tue, 7 Jul 2020 21:49:59 +0200
> > "Alexander A. Klimov" wrote:
> >
> >> Rationale:
> >> Reduces attack surface on k
On Sat, 11 Jul 2020 09:32:01 +0800
Guo Ren wrote:
> Thx Masami,
>
> On Fri, Jul 10, 2020 at 9:50 PM Masami Hiramatsu wrote:
> >
> > Hi Guo,
> >
> > On Thu, 9 Jul 2020 02:19:14 +
> > guo...@kernel.org wrote:
> >
> > > +/* Ftrace callba
1101 - 1200 of 4209 matches
Mail list logo