[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150601053245.GA22455@danjae>
Date: Mon, 1 Jun 2015 14:32:45 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Wang Nan <wangnan0@...wei.com>
Cc: paulus@...ba.org, a.p.zijlstra@...llo.nl, mingo@...hat.com,
acme@...nel.org, jolsa@...nel.org, dsahern@...il.com,
daniel@...earbox.net, brendan.d.gregg@...il.com,
masami.hiramatsu.pt@...achi.com, lizefan@...wei.com,
linux-kernel@...r.kernel.org, pi3orama@....com
Subject: Re: [RFC PATCH v4 17/29] bpf tools: Relocate eBPF programs
On Wed, May 27, 2015 at 05:19:52AM +0000, Wang Nan wrote:
> If an eBPF program access a map, LLVM generates a relocated load
> instruction. To enable the usage of that map, relocation must be done
> by replacing original instructions by map loading instructions.
>
> Based on relocation description collected during 'opening' phase, this
> patch replaces the instructions with map loading with correct map fd.
I think this message is a bit confusing.. How about this?
If an eBPF program accesses a map, LLVM generates a load instruction
with pseudo map fd. Since actual map fd can only be known after it
loads the map at runtime, it records such information in relocation
section(s). So in order to access the map, relocation must be done by
replacing original (pseudo) map fd with correct map fd.
Thanks,
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists