[PATCH] uprobe: add support for overlayfs

2018-04-10 Thread Howard McLauchlan
inode. In the case of overlayfs(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 Bac

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

2018-03-21 Thread Howard McLauchlan
INE 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,

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 > wrote: >> Error injection is a useful mechanism to fail arbitrary kernel >> functions. However, it is often hard to guarantee an error propagates >> appropriately to

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] uprobe: add support for overlayfs

2018-02-27 Thread Howard McLauchlan
inode. In the case of overlayfs(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: