[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5503128D.70908@plumgrid.com>
Date: Fri, 13 Mar 2015 09:38:37 -0700
From: Alexei Starovoitov <ast@...mgrid.com>
To: He Kuang <hekuang@...wei.com>, Ingo Molnar <mingo@...nel.org>
CC: Steven Rostedt <rostedt@...dmis.org>,
Namhyung Kim <namhyung@...nel.org>,
Arnaldo Carvalho de Melo <acme@...radead.org>,
Jiri Olsa <jolsa@...hat.com>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
"David S. Miller" <davem@...emloft.net>,
Daniel Borkmann <daniel@...earbox.net>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
linux-api@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, wangnan0@...wei.com
Subject: Re: [PATCH v6 tip 3/8] tracing: allow BPF programs to call bpf_ktime_get_ns()
On 3/13/15 4:24 AM, He Kuang wrote:
> Hi, Alexei
>
> I've followed up your bpf version. In bpf filter, sometimes we need to
> get 'pid' and some other context informations to decide whether to
> filter or not.
>
> For example, to trace a vfs read procedure, we can insert bpf program to
> '__vfs_read(struct file *file, char __user *buf ...)', mark some of
> 'buf' addresses and only trace the read procedure of these 'buf's. But
> this parameter is a userspace pointer, the value is meaningless to other
> processes, so we should also record 'pid' to make sense.
>
> To a function like __vfs_read, 'pid' can't be extracted from function
> parameters directly. What's your opinion on this issue?
yes. it's the next thing on todo list after this set of patches.
There are several ways to let programs see 'pid'. We'll debate about
the best approach hopefully soon :)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists