[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190315221407.790154f634fc5fc084d7bf15@kernel.org>
Date: Fri, 15 Mar 2019 22:14:07 +0900
From: Masami Hiramatsu <mhiramat@...nel.org>
To: Joel Fernandes <joel@...lfernandes.org>
Cc: Steven Rostedt <rostedt@...dmis.org>,
Daniel Colascione <dancol@...gle.com>,
Karim Yaghmour <karim.yaghmour@...rsys.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Greg KH <gregkh@...uxfoundation.org>,
LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Alexei Starovoitov <ast@...nel.org>,
atish patra <atishp04@...il.com>,
Dan Williams <dan.j.williams@...el.com>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Guenter Roeck <groeck@...omium.org>,
Jonathan Corbet <corbet@....net>,
Kees Cook <keescook@...omium.org>,
Android Kernel Team <kernel-team@...roid.com>,
"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@...r.kernel.org>,
linux-trace-devel@...r.kernel.org,
Manoj Rao <linux@...ojrajarao.com>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Qais Yousef <qais.yousef@....com>,
Randy Dunlap <rdunlap@...radead.org>,
Shuah Khan <shuah@...nel.org>, Yonghong Song <yhs@...com>
Subject: Re: [PATCH v4 1/2] Provide in-kernel headers for making it easy to
extend the kernel
On Thu, 14 Mar 2019 08:27:48 -0400
Joel Fernandes <joel@...lfernandes.org> wrote:
> > But the eBPF is based on kprobe-events. What kind of usage would you
> > expected? (with macros??)
>
> eBPF C programs are compiled with kernel headers. They can execute inline
> functions or refer to macros in the kernel headers. They are similar to
> kernel modules where you build a C program that then later is executed in
> kernel context. It goes through the whole compiler pipeline. This is slightly
> different usage from pure kprobe-events. Also eBPF kprobe programs need
> LINUX_VERSION_CODE (or similarly named) macro which it provides to the bpf(2)
> syscall when loading kprobe programs. This is because eBPF implementation in
> the kernel checks if the eBPF programs that use kprobes are being loaded
> against the right kernel.
Ah, I got it. It's similar to SystemTap. :)
Thank you,
--
Masami Hiramatsu <mhiramat@...nel.org>
Powered by blists - more mailing lists