eport.txt?x=1597348d90
> > console output: https://syzkaller.appspot.com/x/log.txt?x=1197348d90
> > kernel config: https://syzkaller.appspot.com/x/.config?x=b12e84189082991c
> > dashboard link: https://syzkaller.appspot.com/bug?extid=9b64b619f10f19d19a7c
> > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1573a8ad90
> > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=164ee6c590
> >
> > Reported-by: syzbot+9b64b619f10f19d19...@syzkaller.appspotmail.com
> > Fixes: 4b2bd5fec007 ("proc: fix timerslack_ns CAP_SYS_NICE check when
> > adjusting self")
> >
> > For information about bisection process see: https://goo.gl/tpsmEJ#bisection
>
> --
> Kees Cook
--
Masami Hiramatsu
networking. (These boxes are often used headless, so this can be
> annoying)
>
>
> [0]
> http://snapshots.linaro.org/components/kernel/leg-96boards-developerbox-edk2/83/
--
Masami Hiramatsu
On Fri, 16 Apr 2021 12:48:34 -0400
Steven Rostedt wrote:
> On Sat, 17 Apr 2021 00:03:04 +0900
> Masami Hiramatsu wrote:
>
> > > Anyway, IIRC, Masami wasn't sure that the full regs was ever needed for
> > > the
> > > return (who cares about the r
work for both
> > > BPF and ftrace.
> >
> > Absolutely, ultimately for users it doesn't matter what specific
> > mechanism is used under the cover. It just seemed like BPF trampoline
> > has all the useful tracing features (entry IP and input arguments in
> > fexit) already and is just mostly missing a quick batch attach API. If
> > we can get the same from ftrace, all the better.
>
> Let me pull these patches out again, and see what we can do. Since then,
> I've added the code that lets function tracer save parameters and the
> stack, and function graph can use that as well.
>
>
> -- Steve
--
Masami Hiramatsu
e you
> allow tracing of the kernel, hiding /proc/kallsyms is pretty useless.
Also, there is a blacklist of kprobes under debugfs. If CAP_TRACING
introduced and it allows to access kallsyms, I would like to move the
blacklist under tracefs, or make an alias of blacklist entry on tracefs.
Thank you,
--
Masami Hiramatsu
values from kernel memory and that's no good,
> but at least we won't be breaking them today, so we have time to
> introduce bpf_user_read and bpf_kernel_read and folks have time to adopt them.
I see. I think bpf also has to introduce new bpf_probe_read_user() and
keep bpf_probe_read() for kernel dataa only.
> Imo that's much better than making current bpf_probe_read() fail
> on user addresses today and not providing a non disruptive path forward.
Agreed.
Thank you,
--
Masami Hiramatsu
he patching mm?
> > > >>>
> > > >>> Yes, this is a good point. I guess text_poke() should be defined with
> > > >>> “__kprobes” and open-code memcpy.
> > > >>>
> > > >>> Does it sound reasonable?
> > > >>
> > > >> Doesn't __text_poke() as implemented in the proposed patch use a
> > > >> couple other kernel functions, too? Like switch_mm_irqs_off() and
> > > >> pte_clear() (which can be a call into a separate function on paravirt
> > > >> kernels)?
> > > >
> > > > I will move the pte_clear() to be done after the poking mm was unloaded.
> > > > Give me a few minutes to send a sketch of what I think should be done.
> > >
> > > Err.. You are right, I don’t see an easy way of preventing a kprobe from
> > > being set on switch_mm_irqs_off(), and open-coding this monster is too
> > > ugly.
> > >
> > > The reasonable solution seems to me as taking all the relevant pieces of
> > > code (and data) that might be used during text-poking and encapsulating
> > > them, so they
> > > will be set in a memory area which cannot be kprobe'd. This can also be
> > > useful to write-protect data structures of code that calls text_poke(),
> > > e.g., static-keys. It can also protect data on that stack that is used
> > > during text_poke() from being overwritten from another core.
> > >
> > > This solution is somewhat similar to Igor Stoppa’s idea of using
> > > “enclaves”
> > > when doing write-rarely operations.
> > >
> > > Right now, I think that text_poke() will keep being susceptible to such
> > > an attack, unless you have a better suggestion.
> >
> > A relatively simple approach might be to teach BPF not to run kprobe
> > programs and such in contexts where current->mm isn't the active mm?
> > Maybe using nmi_uaccess_okay(), or something like that? It looks like
> > perf_callchain_user() also already uses that. Except that a lot of
> > this code is x86-specific...
>
> This sounds like exactly the right solution. If you're running from
> some unknown context (like NMI or tracing), then you should check
> nmi_uaccess_okay(). I think we should just promote that to be a
> non-arch-specific function (that returns true by default) and check it
> the relevant bpf_probe_xyz() functions.
This treat may also need for my work, like probe_user_read() we should
fail if nmi_uaccess_okay().
Thank you,
>
> Alexei, does that seem reasonable?
--
Masami Hiramatsu
between user/kernel addresses. In that
> case reading the user pointer using user accessors (possibly using
> bpf_probe_user_read helper) should be needed to fix this issue (as Yonghong
> also privately discussed with me).
OK, it sounds like the same issue. Please add a bpf_user_read() and use it
for __user pointer.
Thank you,
--
Masami Hiramatsu
ction framework")
Signed-off-by: Masami Hiramatsu
---
kernel/fail_function.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/kernel/fail_function.c b/kernel/fail_function.c
index 21b0122cb39c..1d5632d8bbcc 100644
--- a/kernel/fail_function.c
+++ b/kernel/fail_function.c
@@ -1
On Mon, 12 Mar 2018 19:00:49 +0900
Masami Hiramatsu wrote:
> Since the kprobe which was optimized by jump can not change
> the execution path, the kprobe for error-injection must not
> be optimized. To prohibit it, set a dummy post-handler as
> officially stated in Documentation
On Mon, 12 Mar 2018 11:44:21 +0100
Daniel Borkmann wrote:
> Hi Masami,
>
> On 03/12/2018 11:27 AM, Masami Hiramatsu wrote:
> > On Mon, 12 Mar 2018 19:00:49 +0900
> > Masami Hiramatsu wrote:
> >
> >> Since the kprobe which was optimized by jump can not
On Mon, 18 Dec 2017 12:05:16 -0500
Steven Rostedt wrote:
> On Mon, 18 Dec 2017 17:12:15 +0900
> Masami Hiramatsu wrote:
>
> > Add SCTP ACK tracking trace event to trace the changes of SCTP
> > association state in response to incoming packets.
> > It is used fo
bugfs_kprobe_ei_ops = {
> + .open = kprobe_ei_open,
> + .read = seq_read,
> + .llseek = seq_lseek,
> + .release= seq_release,
> +};
> +
> static void arm_all_kprobes(void)
> {
> struct hlist_head *head;
> @@ -2548,6 +2706,11 @@ static int __init debugfs_kprobe_init(void)
> if (!file)
> goto error;
>
> + file = debugfs_create_file("error_injection_list", 0444, dir, NULL,
> + &debugfs_kprobe_ei_ops);
> + if (!file)
> + goto error;
> +
> return 0;
>
> error:
> diff --git a/kernel/module.c b/kernel/module.c
> index dea01ac9cb74..bd695bfdc5c4 100644
> --- a/kernel/module.c
> +++ b/kernel/module.c
> @@ -3118,7 +3118,11 @@ static int find_module_sections(struct module *mod,
> struct load_info *info)
>sizeof(*mod->ftrace_callsites),
>&mod->num_ftrace_callsites);
> #endif
> -
> +#ifdef CONFIG_BPF_KPROBE_OVERRIDE
> + mod->kprobe_ei_funcs = section_objs(info, "_kprobe_error_inject_list",
> + sizeof(*mod->kprobe_ei_funcs),
> + &mod->num_kprobe_ei_funcs);
> +#endif
> mod->extable = section_objs(info, "__ex_table",
> sizeof(*mod->extable), &mod->num_exentries);
>
> --
> 2.7.5
>
--
Masami Hiramatsu
On Mon, 18 Dec 2017 16:09:30 +0100
Daniel Borkmann wrote:
> On 12/18/2017 10:51 AM, Masami Hiramatsu wrote:
> > On Fri, 15 Dec 2017 14:12:54 -0500
> > Josef Bacik wrote:
> >> From: Josef Bacik
> >>
> >> Error injection is sloppy and very ad-hoc. BPF
Oops, I found a build error for tcp.h
I'll update it.
On Mon, 18 Dec 2017 17:10:45 +0900
Masami Hiramatsu wrote:
> Hi,.
>
> This series is v2 of the replacement of jprobe usage with trace
> events, and is just rebased on current tip/master branch.
>
> Please review i
ed more test for this events by who can setup
DCCP and SCTP, since those are special protocols, I have
no environment to test it.
Thank you,
---
Masami Hiramatsu (6):
net: tcp: Add trace events for TCP congestion window tracing
net: tcp: Remove TCP probe module
net: sctp: Add
Remove TCP probe module since jprobe has been deprecated.
That function is now replaced by tcp/tcp_probe trace-event.
You can use it via ftrace or perftools.
Signed-off-by: Masami Hiramatsu
---
net/Kconfig | 17 ---
net/ipv4/Makefile|1
net/ipv4/tcp_probe.c | 301
1 > events/tcp/tcp_probe/enable
(run workloads)
# cat trace
Signed-off-by: Masami Hiramatsu
---
Changes in v3:
- Fix build errors caused by including events/tcp.h twice.
- Sort out the including headers.
---
include/trace/events/tcp.h |
event is always invoked from sctp_probe
event, you can not see any output if you only enable
sctp_probe_path.
Signed-off-by: Masami Hiramatsu
---
Changes in v3:
- Add checking whether sctp_probe_path event is enabled
before iterating sctp paths to record. Thanks Steven.
---
include/tra
Remove SCTP probe module since jprobe has been deprecated.
That function is now replaced by sctp/sctp_probe and
sctp/sctp_probe_path trace-events.
You can use it via ftrace or perftools.
Signed-off-by: Masami Hiramatsu
---
net/sctp/Kconfig | 12 ---
net/sctp/Makefile |3 -
net/sctp
Remove DCCP probe module since jprobe has been deprecated.
That function is now replaced by dccp/dccp_probe trace-event.
You can use it via ftrace or perftools.
Signed-off-by: Masami Hiramatsu
---
net/dccp/Kconfig | 17
net/dccp/Makefile |2 -
net/dccp/probe.c | 203
Add DCCP sendmsg trace event (dccp/dccp_probe) for
replacing dccpprobe. User can trace this event via
ftrace or perftools.
Signed-off-by: Masami Hiramatsu
---
net/dccp/proto.c |5 +++
net/dccp/trace.h | 105 ++
2 files changed, 110
On Tue, 19 Dec 2017 10:20:24 -0500
Steven Rostedt wrote:
> On Tue, 19 Dec 2017 17:58:25 +0900
> Masami Hiramatsu wrote:
>
> > +TRACE_EVENT(sctp_probe,
> > +
> > + TP_PROTO(const struct sctp_endpoint *ep,
> > +const struct sctp_association *asoc,
&
On Tue, 19 Dec 2017 10:01:56 -0800
Alexei Starovoitov wrote:
> On Tue, Dec 19, 2017 at 05:56:55PM +0900, Masami Hiramatsu wrote:
> > include/trace/events/sctp.h | 98 ++
> > include/trace/events/tcp.h | 80 +++
> > net/Kconfig |
[3/6]: fixes a build warning for i386 by casting pointer unsigned
long instead of __u64, and moves a temporal variable
definition in a block.
Thank you,
---
Masami Hiramatsu (6):
net: tcp: Add trace events for TCP congestion window tracing
net: tcp: Remove TCP probe
Remove TCP probe module since jprobe has been deprecated.
That function is now replaced by tcp/tcp_probe trace-event.
You can use it via ftrace or perftools.
Signed-off-by: Masami Hiramatsu
---
net/Kconfig | 17 ---
net/ipv4/Makefile|1
net/ipv4/tcp_probe.c | 301
1 > events/tcp/tcp_probe/enable
(run workloads)
# cat trace
Signed-off-by: Masami Hiramatsu
---
Changes in v3:
- Fix build errors caused by including events/tcp.h twice.
- Sort out the including headers.
---
include/trace/events/tcp.h |
event is always invoked from sctp_probe
event, you can not see any output if you only enable
sctp_probe_path.
Signed-off-by: Masami Hiramatsu
---
Changes in v3:
- Add checking whether sctp_probe_path event is enabled
before iterating sctp paths to record. Thanks Steven.
Changes in v4:
Remove DCCP probe module since jprobe has been deprecated.
That function is now replaced by dccp/dccp_probe trace-event.
You can use it via ftrace or perftools.
Signed-off-by: Masami Hiramatsu
---
net/dccp/Kconfig | 17
net/dccp/Makefile |2 -
net/dccp/probe.c | 203
Add DCCP sendmsg trace event (dccp/dccp_probe) for
replacing dccpprobe. User can trace this event via
ftrace or perftools.
Signed-off-by: Masami Hiramatsu
---
net/dccp/proto.c |5 +++
net/dccp/trace.h | 105 ++
2 files changed, 110
Remove SCTP probe module since jprobe has been deprecated.
That function is now replaced by sctp/sctp_probe and
sctp/sctp_probe_path trace-events.
You can use it via ftrace or perftools.
Signed-off-by: Masami Hiramatsu
---
net/sctp/Kconfig | 12 ---
net/sctp/Makefile |3 -
net/sctp
On Tue, 19 Dec 2017 18:14:17 -0800
Alexei Starovoitov wrote:
> On 12/18/17 10:29 PM, Masami Hiramatsu wrote:
> >>
> >> +#if defined(__KERNEL__) && !defined(__ASSEMBLY__)
> >> +#ifdef CONFIG_BPF_KPROBE_OVERRIDE
> >
> > BTW, CONFIG_BPF_KPROB
void arm_all_kprobes(void)
> {
> struct hlist_head *head;
> @@ -2548,6 +2706,11 @@ static int __init debugfs_kprobe_init(void)
> if (!file)
> goto error;
>
> + file = debugfs_create_file("error_injection_list", 0444, dir, NULL,
> + &debugfs_kprobe_ei_ops);
> + if (!file)
> + goto error;
> +
> return 0;
>
> error:
> diff --git a/kernel/module.c b/kernel/module.c
> index dea01ac9cb74..bd695bfdc5c4 100644
> --- a/kernel/module.c
> +++ b/kernel/module.c
> @@ -3118,7 +3118,11 @@ static int find_module_sections(struct module *mod,
> struct load_info *info)
>sizeof(*mod->ftrace_callsites),
>&mod->num_ftrace_callsites);
> #endif
> -
> +#ifdef CONFIG_BPF_KPROBE_OVERRIDE
> + mod->kprobe_ei_funcs = section_objs(info, "_kprobe_error_inject_list",
> + sizeof(*mod->kprobe_ei_funcs),
> + &mod->num_kprobe_ei_funcs);
> +#endif
> mod->extable = section_objs(info, "__ex_table",
> sizeof(*mod->extable), &mod->num_exentries);
>
> --
> 2.7.5
>
--
Masami Hiramatsu
On Wed, 20 Dec 2017 14:24:24 -0500 (EST)
David Miller wrote:
> From: David Miller
> Date: Wed, 20 Dec 2017 14:20:40 -0500 (EST)
>
> > From: Masami Hiramatsu
> > Date: Wed, 20 Dec 2017 13:14:11 +0900
> >
> >> This series is v4 of the replacement of jprob
On Wed, 20 Dec 2017 14:24:24 -0500 (EST)
David Miller wrote:
> From: David Miller
> Date: Wed, 20 Dec 2017 14:20:40 -0500 (EST)
>
> > From: Masami Hiramatsu
> > Date: Wed, 20 Dec 2017 13:14:11 +0900
> >
> >> This series is v4 of the replacement of jprob
On Wed, 20 Dec 2017 23:08:38 -0500 (EST)
David Miller wrote:
> From: Masami Hiramatsu
> Date: Thu, 21 Dec 2017 11:36:57 +0900
>
> > Could you share your .config file?
>
> You never need to ask me this question.
>
> All of my test builds are with "allmodc
On Wed, 20 Dec 2017 22:12:38 -0500
Steven Rostedt wrote:
> On Thu, 21 Dec 2017 11:36:57 +0900
> Masami Hiramatsu wrote:
>
> > On Wed, 20 Dec 2017 14:24:24 -0500 (EST)
> > David Miller wrote:
> >
> > > From: David Miller
> > > Date: Wed, 20 Dec 20
On Wed, 20 Dec 2017 22:12:38 -0500
Steven Rostedt wrote:
> On Thu, 21 Dec 2017 11:36:57 +0900
> Masami Hiramatsu wrote:
>
> > On Wed, 20 Dec 2017 14:24:24 -0500 (EST)
> > David Miller wrote:
> >
> > > From: David Miller
> > > Date: Wed, 20 Dec 20
Add DCCP sendmsg trace event (dccp/dccp_probe) for
replacing dccpprobe. User can trace this event via
ftrace or perftools.
Signed-off-by: Masami Hiramatsu
---
Changes in v4.1
- Fix to add local directory to include for trace.h.
Thanks Steven!
---
net/dccp/Makefile |3 ++
net/dccp
w that rule.
I'm happy to resend the series :)
Thank you,
--
Masami Hiramatsu
to add local directory to include for trace.h.
[6/6]: Fix a conflict with previous change.
Thank you,
---
Masami Hiramatsu (6):
net: tcp: Add trace events for TCP congestion window tracing
net: tcp: Remove TCP probe module
net: sctp: Add SCTP ACK tracking trace event
1 > events/tcp/tcp_probe/enable
(run workloads)
# cat trace
Signed-off-by: Masami Hiramatsu
---
Changes in v3:
- Fix build errors caused by including events/tcp.h twice.
- Sort out the including headers.
---
include/trace/events/tcp.h |
Remove TCP probe module since jprobe has been deprecated.
That function is now replaced by tcp/tcp_probe trace-event.
You can use it via ftrace or perftools.
Signed-off-by: Masami Hiramatsu
---
net/Kconfig | 17 ---
net/ipv4/Makefile|1
net/ipv4/tcp_probe.c | 301
Remove SCTP probe module since jprobe has been deprecated.
That function is now replaced by sctp/sctp_probe and
sctp/sctp_probe_path trace-events.
You can use it via ftrace or perftools.
Signed-off-by: Masami Hiramatsu
---
net/sctp/Kconfig | 12 ---
net/sctp/Makefile |3 -
net/sctp
event is always invoked from sctp_probe
event, you can not see any output if you only enable
sctp_probe_path.
Signed-off-by: Masami Hiramatsu
---
Changes in v3:
- Add checking whether sctp_probe_path event is enabled
before iterating sctp paths to record. Thanks Steven.
Changes in v4:
Remove DCCP probe module since jprobe has been deprecated.
That function is now replaced by dccp/dccp_probe trace-event.
You can use it via ftrace or perftools.
Signed-off-by: Masami Hiramatsu
---
Changes in v5:
- Fix a conflict with previous change in Makefile.
---
net/dccp/Kconfig | 17
Add DCCP sendmsg trace event (dccp/dccp_probe) for
replacing dccpprobe. User can trace this event via
ftrace or perftools.
Signed-off-by: Masami Hiramatsu
---
Changes in v5
- Fix to add local directory to include for trace.h.
Thanks Steven!
---
net/dccp/Makefile |3 ++
net/dccp
maybe we also need a document how to use)
BTW, it seems there are many error injection frameworks in
lib/. We may also consider these distinctions.
Thank you,
---
Masami Hiramatsu (3):
tracing/kprobe: bpf: Check error injectable event is on function entry
tracing/kprobe: bpf:
value, that operation must
be done before the target function starts making stackframe.
As a side effect, bpf error injection is no need to depend on
function-tracer. It can work with sw-breakpoint based kprobe
events too.
Signed-off-by: Masami Hiramatsu
---
kernel/trace/Kconfig|2
Compare instruction pointer with original one on the
stack instead using per-cpu bpf_kprobe_override flag.
This patch also consolidates reset_current_kprobe() and
preempt_enable_no_resched() blocks. Those can be done
in one place.
Signed-off-by: Masami Hiramatsu
---
kernel/trace/bpf_trace.c
eature for kprobe or ftrace etc.
Signed-off-by: Masami Hiramatsu
---
arch/Kconfig |2
arch/x86/Kconfig |2
arch/x86/include/asm/error-injection.h | 12 ++
arch/x86/kernel/kprobes/ftrace.c | 14 --
arch/x86/lib/Makefile
TW, I think we should add an error-range description in
ALLOW_ERROR_INJECTION() macro. If user sets a success
return value and override it by mistake, caller must
break data or cause kernel panic.
Thank you,
---
Masami Hiramatsu (4):
tracing/kprobe: bpf: Check error injectable event is on fun
value, that operation must
be done before the target function starts making stackframe.
As a side effect, bpf error injection is no need to depend on
function-tracer. It can work with sw-breakpoint based kprobe
events too.
Signed-off-by: Masami Hiramatsu
---
kernel/trace/Kconfig|2
Compare instruction pointer with original one on the
stack instead using per-cpu bpf_kprobe_override flag.
This patch also consolidates reset_current_kprobe() and
preempt_enable_no_resched() blocks. Those can be done
in one place.
Signed-off-by: Masami Hiramatsu
---
kernel/trace/bpf_trace.c
eature for kprobe or ftrace etc.
Signed-off-by: Masami Hiramatsu
---
Changes in v2:
- Fix the override function name to override_function_with_return()
- Show only function name in the list, user don't have to care about
it's size, since function override only happens at the entr
Support in-kernel fault-injection framework via debugfs.
This allows you to inject a conditional error to specified
function using debugfs interfaces.
Signed-off-by: Masami Hiramatsu
---
Documentation/fault-injection/fault-injection.txt |5 +
kernel/Makefile
On Tue, 26 Dec 2017 18:51:55 -0500 (EST)
David Miller wrote:
> From: Masami Hiramatsu
> Date: Fri, 22 Dec 2017 11:05:33 +0900
>
> > This adds an event to trace TCP stat variables with
> > slightly intrusive trace-event. This uses ftrace/perf
> > event log buffer to
On Tue, 26 Dec 2017 17:57:32 -0800
Alexei Starovoitov wrote:
> On Tue, Dec 26, 2017 at 04:46:59PM +0900, Masami Hiramatsu wrote:
> > Check whether error injectable event is on function entry or not.
> > Currently it checks the event is ftrace-based kprobes or not,
> >
On Tue, 26 Dec 2017 18:12:56 -0800
Alexei Starovoitov wrote:
> On Tue, Dec 26, 2017 at 04:48:25PM +0900, Masami Hiramatsu wrote:
> > Support in-kernel fault-injection framework via debugfs.
> > This allows you to inject a conditional error to specified
> > function usi
On Wed, 27 Dec 2017 14:49:46 -0800
Alexei Starovoitov wrote:
> On 12/27/17 12:09 AM, Masami Hiramatsu wrote:
> > On Tue, 26 Dec 2017 18:12:56 -0800
> > Alexei Starovoitov wrote:
> >
> >> On Tue, Dec 26, 2017 at 04:48:25PM +0900, Masami Hiramatsu wrote:
> >
On Wed, 27 Dec 2017 14:46:24 -0800
Alexei Starovoitov wrote:
> On 12/26/17 9:56 PM, Masami Hiramatsu wrote:
> > On Tue, 26 Dec 2017 17:57:32 -0800
> > Alexei Starovoitov wrote:
> >
> >> On Tue, Dec 26, 2017 at 04:46:59PM +0900, Masami Hiramatsu wrote:
> >>
Avoid preprocessor directives in tracepoint macro args
Thank you,
---
Masami Hiramatsu (6):
net: tcp: Add trace events for TCP congestion window tracing
net: tcp: Remove TCP probe module
net: sctp: Add SCTP ACK tracking trace event
net: sctp: Remove debug SCTP probe module
net:
Add DCCP sendmsg trace event (dccp/dccp_probe) for
replacing dccpprobe. User can trace this event via
ftrace or perftools.
Signed-off-by: Masami Hiramatsu
---
Changes in v5
- Fix to add local directory to include for trace.h.
Thanks Steven!
---
net/dccp/Makefile |3 ++
net/dccp
1 > events/tcp/tcp_probe/enable
(run workloads)
# cat trace
Signed-off-by: Masami Hiramatsu
---
Changes in v6:
- Avoid preprocessor directives in tracepoint macro args as
Mat did on net tree.
---
include/trace/events/tcp.h | 97
net/i
Remove TCP probe module since jprobe has been deprecated.
That function is now replaced by tcp/tcp_probe trace-event.
You can use it via ftrace or perftools.
Signed-off-by: Masami Hiramatsu
---
net/Kconfig | 17 ---
net/ipv4/Makefile|1
net/ipv4/tcp_probe.c | 301
event is always invoked from sctp_probe
event, you can not see any output if you only enable
sctp_probe_path.
Signed-off-by: Masami Hiramatsu
---
Changes in v3:
- Add checking whether sctp_probe_path event is enabled
before iterating sctp paths to record. Thanks Steven.
Changes in v4:
Remove SCTP probe module since jprobe has been deprecated.
That function is now replaced by sctp/sctp_probe and
sctp/sctp_probe_path trace-events.
You can use it via ftrace or perftools.
Signed-off-by: Masami Hiramatsu
---
net/sctp/Kconfig | 12 ---
net/sctp/Makefile |3 -
net/sctp
Remove DCCP probe module since jprobe has been deprecated.
That function is now replaced by dccp/dccp_probe trace-event.
You can use it via ftrace or perftools.
Signed-off-by: Masami Hiramatsu
---
Changes in v5:
- Fix a conflict with previous change in Makefile.
---
net/dccp/Kconfig | 17
On Wed, 27 Dec 2017 19:49:28 -0800
Alexei Starovoitov wrote:
> On 12/27/17 5:38 PM, Masami Hiramatsu wrote:
> > On Wed, 27 Dec 2017 14:49:46 -0800
> > Alexei Starovoitov wrote:
> >
> >> On 12/27/17 12:09 AM, Masami Hiramatsu wrote:
> >>> On Tu
On Wed, 27 Dec 2017 19:45:42 -0800
Alexei Starovoitov wrote:
> On 12/27/17 6:34 PM, Masami Hiramatsu wrote:
> > On Wed, 27 Dec 2017 14:46:24 -0800
> > Alexei Starovoitov wrote:
> >
> >> On 12/26/17 9:56 PM, Masami Hiramatsu wrote:
> >>> On Tu
ll cover this situation.
> Probably only special .config is needed to disable ftrace, so
> "kprobe on entry but not ftrace" check will kick in.
Right. If you need to test it, you can run Josef's test case without
CONFIG_DYNAMIC_FTRACE.
> But I didn't get an impression that this situation was tested.
> Instead I see only logical reasoning that it's _supposed_ to work.
> That's not enough.
OK, so would you just ask me to run samples/bpf ?
Thanks,
--
Masami Hiramatsu
On Thu, 28 Dec 2017 12:06:13 -0500 (EST)
David Miller wrote:
> From: Masami Hiramatsu
> Date: Thu, 28 Dec 2017 15:10:00 +0900
>
> > Changes from v5:
> > [1/6]: Avoid preprocessor directives in tracepoint macro args
>
> Patch #1 is not the only patch which has
.
Previous version is here;
https://lkml.org/lkml/2017/12/28/7
Changes from v6:
[5/6]: Avoid preprocessor directives in tracepoint macro args
Thank you,
---
Masami Hiramatsu (6):
net: tcp: Add trace events for TCP congestion window tracing
net: tcp: Remove TCP probe module
net
1 > events/tcp/tcp_probe/enable
(run workloads)
# cat trace
Signed-off-by: Masami Hiramatsu
---
Changes in v6:
- Avoid preprocessor directives in tracepoint macro args as
Mat did on net tree.
---
include/trace/events/tcp.h | 97
net/i
Remove TCP probe module since jprobe has been deprecated.
That function is now replaced by tcp/tcp_probe trace-event.
You can use it via ftrace or perftools.
Signed-off-by: Masami Hiramatsu
---
net/Kconfig | 17 ---
net/ipv4/Makefile|1
net/ipv4/tcp_probe.c | 301
event is always invoked from sctp_probe
event, you can not see any output if you only enable
sctp_probe_path.
Signed-off-by: Masami Hiramatsu
---
Changes in v3:
- Add checking whether sctp_probe_path event is enabled
before iterating sctp paths to record. Thanks Steven.
Changes in v4:
Remove SCTP probe module since jprobe has been deprecated.
That function is now replaced by sctp/sctp_probe and
sctp/sctp_probe_path trace-events.
You can use it via ftrace or perftools.
Signed-off-by: Masami Hiramatsu
---
net/sctp/Kconfig | 12 ---
net/sctp/Makefile |3 -
net/sctp
Add DCCP sendmsg trace event (dccp/dccp_probe) for
replacing dccpprobe. User can trace this event via
ftrace or perftools.
Signed-off-by: Masami Hiramatsu
---
Changes in v5:
- Fix to add local directory to include for trace.h.
Thanks Steven!
Changes in v7:
- Avoid preprocessor
Remove DCCP probe module since jprobe has been deprecated.
That function is now replaced by dccp/dccp_probe trace-event.
You can use it via ftrace or perftools.
Signed-off-by: Masami Hiramatsu
---
Changes in v5:
- Fix a conflict with previous change in Makefile.
---
net/dccp/Kconfig | 17
On Thu, 28 Dec 2017 17:11:31 -0800
Alexei Starovoitov wrote:
> On 12/27/17 11:51 PM, Masami Hiramatsu wrote:
> >
> > Then what happen if the user set invalid retval to those functions?
> > even if we limit the injectable functions, it can cause a problem,
> >
&g
On Thu, 28 Dec 2017 17:03:24 -0800
Alexei Starovoitov wrote:
> On 12/28/17 12:20 AM, Masami Hiramatsu wrote:
> > On Wed, 27 Dec 2017 20:32:07 -0800
> > Alexei Starovoitov wrote:
> >
> >> On 12/27/17 8:16 PM, Steven Rostedt wrote:
> >>> On Wed, 27 Dec 20
On Sun, 7 Jan 2018 19:01:57 -0800
Alexei Starovoitov wrote:
> On 12/29/17 12:20 AM, Masami Hiramatsu wrote:
> >> Please run Josef's test in the !ftrace setup.
> > Yes, I'll add the result of the test case.
>
> if Josef's test is passing in !ftrace config,
On Thu, 4 Jan 2018 11:07:16 -0500
Josef Bacik wrote:
> On Tue, Dec 26, 2017 at 04:46:28PM +0900, Masami Hiramatsu wrote:
> > Hi Josef and Alexei,
> >
> > Here are the 2nd version of patches to moving error injection
> > table from kprobes. In this series I did a small
n late_initcall stage.
- [4/5] Newly added
- [5/5] Check and adjust error value for each target function
and add more documents and example.
Thank you,
---
Masami Hiramatsu (5):
tracing/kprobe: bpf: Check error injectable event is on function entry
tracing/kprobe: bpf: Co
value, that operation must
be done before the target function starts making stackframe.
As a side effect, bpf error injection is no need to depend on
function-tracer. It can work with sw-breakpoint based kprobe
events too.
Signed-off-by: Masami Hiramatsu
---
Changes in v3:
- Move
devices: 1
Devices:
IDSIZE PATH
1 1001.00MiB /dev/loop2
mount: mount /dev/loop2 on /opt/tmpmnt failed: Cannot allocate memory
SUCCESS!
===
Signed-off-by: Masami Hiramatsu
---
Changes in v3:
- Check and adjust error value for each target function
/debug/error_injection/list
open_ctree [btrfs]ERRNO
io_ctl_init [btrfs] ERRNO
Signed-off-by: Masami Hiramatsu
---
fs/btrfs/disk-io.c|2 +-
fs/btrfs/free-space-cache.c |2 +-
include/asm-generic/error-injection.h | 23 +++---
include
eature for kprobe or ftrace etc.
Signed-off-by: Masami Hiramatsu
---
Changes in v3:
- Fix a build error for asmlinkage on i386 by including compiler.h
- Fix "CONFIG_FUNCTION_ERROR_INJECT" typo.
- Separate CONFIG_MODULES dependent code
- Add CONFIG_KPROBES dependency for ar
Compare instruction pointer with original one on the
stack instead using per-cpu bpf_kprobe_override flag.
This patch also consolidates reset_current_kprobe() and
preempt_enable_no_resched() blocks. Those can be done
in one place.
Signed-off-by: Masami Hiramatsu
---
kernel/trace/bpf_trace.c
On Wed, 10 Jan 2018 10:36:15 -0500
Josef Bacik wrote:
> On Wed, Jan 10, 2018 at 07:18:05PM +0900, Masami Hiramatsu wrote:
> > Since error-injection framework is not limited to be used
> > by kprobes, nor bpf. Other kernel subsystems can use it
> > freely for checking safene
/858176/
Changes in v3:
- [3/5] Change error-injection.h including points to each file
which uses ALLOW_ERROR_INJECTION instead of bpf.h
- Add Reviewed-by from Josef Bacik except [3/5]
Thank you,
---
Masami Hiramatsu (5):
tracing/kprobe: bpf: Check error injectable event is on function
Compare instruction pointer with original one on the
stack instead using per-cpu bpf_kprobe_override flag.
This patch also consolidates reset_current_kprobe() and
preempt_enable_no_resched() blocks. Those can be done
in one place.
Signed-off-by: Masami Hiramatsu
Reviewed-by: Josef Bacik
value, that operation must
be done before the target function starts making stackframe.
As a side effect, bpf error injection is no need to depend on
function-tracer. It can work with sw-breakpoint based kprobe
events too.
Signed-off-by: Masami Hiramatsu
Reviewed-by: Josef Bacik
---
Changes in v3
eature for kprobe or ftrace etc.
Signed-off-by: Masami Hiramatsu
---
Changes in v3:
- Fix a build error for asmlinkage on i386 by including compiler.h
- Fix "CONFIG_FUNCTION_ERROR_INJECT" typo.
- Separate CONFIG_MODULES dependent code
- Add CONFIG_KPROBES dependency for ar
/debug/error_injection/list
open_ctree [btrfs]ERRNO
io_ctl_init [btrfs] ERRNO
Signed-off-by: Masami Hiramatsu
Reviewed-by: Josef Bacik
---
fs/btrfs/disk-io.c|2 +-
fs/btrfs/free-space-cache.c |2 +-
include/asm-generic/error-injection.h | 23
devices: 1
Devices:
IDSIZE PATH
1 1001.00MiB /dev/loop2
mount: mount /dev/loop2 on /opt/tmpmnt failed: Cannot allocate memory
SUCCESS!
===
Signed-off-by: Masami Hiramatsu
Reviewed-by: Josef Bacik
---
Changes in v3:
- Check and adjust error value for
On Thu, 11 Jan 2018 23:44:57 +0900
Akinobu Mita wrote:
> 2018-01-11 9:51 GMT+09:00 Masami Hiramatsu :
> > Support in-kernel fault-injection framework via debugfs.
> > This allows you to inject a conditional error to specified
> > function using debugfs interfaces.
> >
within_error_injection returns false always.
- [5/5] Update to support multiple function error injection.
Thank you,
---
Masami Hiramatsu (5):
tracing/kprobe: bpf: Check error injectable event is on function entry
tracing/kprobe: bpf: Compare instruction pointer with original one
value, that operation must
be done before the target function starts making stackframe.
As a side effect, bpf error injection is no need to depend on
function-tracer. It can work with sw-breakpoint based kprobe
events too.
Signed-off-by: Masami Hiramatsu
Reviewed-by: Josef Bacik
---
Changes in v3
Compare instruction pointer with original one on the
stack instead using per-cpu bpf_kprobe_override flag.
This patch also consolidates reset_current_kprobe() and
preempt_enable_no_resched() blocks. Those can be done
in one place.
Signed-off-by: Masami Hiramatsu
Reviewed-by: Josef Bacik
1 - 100 of 173 matches
Mail list logo