[PATCH] uprobe: add support for overlayfs

2018-04-10 Thread Howard McLauchlan
; Signed-off-by: Howard McLauchlan <hmclauch...@fb.com> --- kernel/trace/trace_uprobe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index 2014f4351ae0..17c65fa4136d 100644 --- a/kernel/trace/trace_uprobe.c

[PATCH] uprobe: add support for overlayfs

2018-04-10 Thread Howard McLauchlan
rlayfs(and similar fs) we will obtain the underlying dentry and corresponding inode, upon which uprobes can successfully register. Running the example above with the patch applied, we can see that the uprobe is enabled and will output to trace as expected. Reviewed-by: Josef Bacik Signed-off-by: Howard McLa

[PATCH v2] bpf: whitelist all syscalls for error injection

2018-03-21 Thread Howard McLauchlan
ALL_DEFINE for error injection. These changes are not intended to be considered stable, and would normally be configured off. Signed-off-by: Howard McLauchlan <hmclauch...@fb.com> --- Dominik, I've updated the patch to support compat syscalls. Please let me know if there are additional changes to be m

[PATCH v2] bpf: whitelist all syscalls for error injection

2018-03-21 Thread Howard McLauchlan
ALL_DEFINE for error injection. These changes are not intended to be considered stable, and would normally be configured off. Signed-off-by: Howard McLauchlan --- Dominik, I've updated the patch to support compat syscalls. Please let me know if there are additional changes to be made. Cheers, V

Re: [PATCH] bpf: whitelist syscalls for error injection

2018-03-19 Thread Howard McLauchlan
On 03/18/2018 07:13 PM, Andy Lutomirski wrote: On Sun, Mar 18, 2018 at 6:47 AM, Dominik Brodowski <li...@dominikbrodowski.net> wrote: On Fri, Mar 16, 2018 at 03:55:04PM -0700, Howard McLauchlan wrote: On 03/13/2018 04:56 PM, Andy Lutomirski wrote: On Tue, Mar 13, 2018 at 11:16 PM,

Re: [PATCH] bpf: whitelist syscalls for error injection

2018-03-19 Thread Howard McLauchlan
On 03/18/2018 07:13 PM, Andy Lutomirski wrote: On Sun, Mar 18, 2018 at 6:47 AM, Dominik Brodowski wrote: On Fri, Mar 16, 2018 at 03:55:04PM -0700, Howard McLauchlan wrote: On 03/13/2018 04:56 PM, Andy Lutomirski wrote: On Tue, Mar 13, 2018 at 11:16 PM, Howard McLauchlan wrote: Error

Re: [PATCH] bpf: whitelist syscalls for error injection

2018-03-16 Thread Howard McLauchlan
On 03/13/2018 04:56 PM, Andy Lutomirski wrote: > On Tue, Mar 13, 2018 at 11:16 PM, Howard McLauchlan <hmclauch...@fb.com> > wrote: >> Error injection is a useful mechanism to fail arbitrary kernel >> functions. However, it is often hard to guarantee an error propagates

Re: [PATCH] bpf: whitelist syscalls for error injection

2018-03-16 Thread Howard McLauchlan
On 03/13/2018 04:56 PM, Andy Lutomirski wrote: > On Tue, Mar 13, 2018 at 11:16 PM, Howard McLauchlan > wrote: >> Error injection is a useful mechanism to fail arbitrary kernel >> functions. However, it is often hard to guarantee an error propagates >> appropriatel

Re: [PATCH] bpf: whitelist syscalls for error injection

2018-03-13 Thread Howard McLauchlan
On 03/13/2018 04:49 PM, Yonghong Song wrote: > > > On 3/13/18 4:45 PM, Omar Sandoval wrote: >> On Tue, Mar 13, 2018 at 04:16:27PM -0700, Howard McLauchlan wrote: >>> Error injection is a useful mechanism to fail arbitrary kernel >>> functions. However, it is

Re: [PATCH] bpf: whitelist syscalls for error injection

2018-03-13 Thread Howard McLauchlan
On 03/13/2018 04:49 PM, Yonghong Song wrote: > > > On 3/13/18 4:45 PM, Omar Sandoval wrote: >> On Tue, Mar 13, 2018 at 04:16:27PM -0700, Howard McLauchlan wrote: >>> Error injection is a useful mechanism to fail arbitrary kernel >>> functions. However, it is

[PATCH] bpf: whitelist syscalls for error injection

2018-03-13 Thread Howard McLauchlan
name, int flags) { u32 pid = bpf_get_current_pid_tgid(); if (pid == %s) bpf_override_return(ctx, -ENOENT); return 0; } """ % pid b = BPF(text = prog) while 1: b.perf_buffer_poll() This patch whitelists all syscalls defined with SYSCALL_DEFINE for error injection. Si

[PATCH] bpf: whitelist syscalls for error injection

2018-03-13 Thread Howard McLauchlan
name, int flags) { u32 pid = bpf_get_current_pid_tgid(); if (pid == %s) bpf_override_return(ctx, -ENOENT); return 0; } """ % pid b = BPF(text = prog) while 1: b.perf_buffer_poll() This patch whitelists all syscalls defined with SYSCALL_DEFINE for error injection. Si

[PATCH] uprobe: add support for overlayfs

2018-02-27 Thread Howard McLauchlan
rlayfs(and similar fs) we will obtain the underlying dentry and corresponding inode, upon which uprobes can successfully register. Running the example above with the patch applied, we can see that the uprobe is enabled and will output to trace as expected. Signed-off-by: Howard McLauchlan <hmclauch.

[PATCH] uprobe: add support for overlayfs

2018-02-27 Thread Howard McLauchlan
rlayfs(and similar fs) we will obtain the underlying dentry and corresponding inode, upon which uprobes can successfully register. Running the example above with the patch applied, we can see that the uprobe is enabled and will output to trace as expected. Signed-off-by: Howard McLauchlan --- kernel