Re: [PATCH v3 bpf-next 02/12] libbpf: implement BPF CO-RE offset relocation algorithm

2019-08-03 Thread Andrii Nakryiko
On Sat, Aug 3, 2019 at 9:26 AM Alexei Starovoitov wrote: > > On Fri, Aug 02, 2019 at 11:30:21PM -0700, Andrii Nakryiko wrote: > > > > No, not anonymous. > > > > struct my_struct___local { > > int a; > > }; > > > > struct my_struct___target { > > long long a; > > }; > > > > my_struct___loca

Re: [PATCH v3 bpf-next 02/12] libbpf: implement BPF CO-RE offset relocation algorithm

2019-08-03 Thread Alexei Starovoitov
On Fri, Aug 02, 2019 at 11:30:21PM -0700, Andrii Nakryiko wrote: > > No, not anonymous. > > struct my_struct___local { > int a; > }; > > struct my_struct___target { > long long a; > }; > > my_struct___local->a will not match my_struct___target->a, but it's > not a reason to stop relocat

Re: [PATCH v3 bpf-next 02/12] libbpf: implement BPF CO-RE offset relocation algorithm

2019-08-02 Thread Andrii Nakryiko
On Fri, Aug 2, 2019 at 2:56 PM Alexei Starovoitov wrote: > > On Fri, Aug 02, 2019 at 12:16:52AM -0700, Andrii Nakryiko wrote: > > On Thu, Aug 1, 2019 at 4:50 PM Alexei Starovoitov > > wrote: > > > > > > On Wed, Jul 31, 2019 at 11:47:53PM -0700, Andrii Nakryiko wrote: > > > > This patch implements

Re: [PATCH v3 bpf-next 02/12] libbpf: implement BPF CO-RE offset relocation algorithm

2019-08-02 Thread Alexei Starovoitov
On Fri, Aug 02, 2019 at 12:16:52AM -0700, Andrii Nakryiko wrote: > On Thu, Aug 1, 2019 at 4:50 PM Alexei Starovoitov > wrote: > > > > On Wed, Jul 31, 2019 at 11:47:53PM -0700, Andrii Nakryiko wrote: > > > This patch implements the core logic for BPF CO-RE offsets relocations. > > > Every instructi

Re: [PATCH v3 bpf-next 02/12] libbpf: implement BPF CO-RE offset relocation algorithm

2019-08-02 Thread Andrii Nakryiko
On Thu, Aug 1, 2019 at 4:50 PM Alexei Starovoitov wrote: > > On Wed, Jul 31, 2019 at 11:47:53PM -0700, Andrii Nakryiko wrote: > > This patch implements the core logic for BPF CO-RE offsets relocations. > > Every instruction that needs to be relocated has corresponding > > bpf_offset_reloc as part

Re: [PATCH v3 bpf-next 02/12] libbpf: implement BPF CO-RE offset relocation algorithm

2019-08-01 Thread Alexei Starovoitov
On Wed, Jul 31, 2019 at 11:47:53PM -0700, Andrii Nakryiko wrote: > This patch implements the core logic for BPF CO-RE offsets relocations. > Every instruction that needs to be relocated has corresponding > bpf_offset_reloc as part of BTF.ext. Relocations are performed by trying > to match recorded

[PATCH v3 bpf-next 02/12] libbpf: implement BPF CO-RE offset relocation algorithm

2019-07-31 Thread Andrii Nakryiko
This patch implements the core logic for BPF CO-RE offsets relocations. Every instruction that needs to be relocated has corresponding bpf_offset_reloc as part of BTF.ext. Relocations are performed by trying to match recorded "local" relocation spec against potentially many compatible "target" type