Re: [PATCH RFC bpf-next 1/4] bpf: add struct largest member size in func model

2025-04-28 Thread Eduard Zingerman
On Fri, 2025-04-25 at 17:23 +0800, Xu Kuohai wrote: [...] > For the two questions you mentioned, I’m not sure if we can access DWARF > attributes > at runtime. As for adding parameter locations to BTF at building time, I > think it > means we would need to record CPU-related register info in BT

Re: [PATCH RFC bpf-next 1/4] bpf: add struct largest member size in func model

2025-04-25 Thread Xu Kuohai
On 4/24/2025 9:38 PM, Alexis Lothoré wrote: Hi Xu, On Thu Apr 24, 2025 at 2:00 PM CEST, Xu Kuohai wrote: On 4/24/2025 3:24 AM, Alexis Lothoré wrote: Hi Andrii, On Wed Apr 23, 2025 at 7:15 PM CEST, Andrii Nakryiko wrote: On Thu, Apr 17, 2025 at 12:14 AM Alexis Lothoré wrote: Hi Andrii, On

Re: [PATCH RFC bpf-next 1/4] bpf: add struct largest member size in func model

2025-04-25 Thread Alexis Lothoré
Hello Alexei, On Fri Apr 25, 2025 at 1:14 AM CEST, Alexei Starovoitov wrote: > On Thu, Apr 24, 2025 at 6:38 AM Alexis Lothoré > wrote: [...] >> > With DWARF info, we might not need to detect the structure alignment >> > anymore, >> > since the DW_AT_location attribute tells us where the struct

Re: [PATCH RFC bpf-next 1/4] bpf: add struct largest member size in func model

2025-04-24 Thread Alexei Starovoitov
On Thu, Apr 24, 2025 at 6:38 AM Alexis Lothoré wrote: > > Hi Xu, > > On Thu Apr 24, 2025 at 2:00 PM CEST, Xu Kuohai wrote: > > On 4/24/2025 3:24 AM, Alexis Lothoré wrote: > >> Hi Andrii, > >> > >> On Wed Apr 23, 2025 at 7:15 PM CEST, Andrii Nakryiko wrote: > >>> On Thu, Apr 17, 2025 at 12:14 AM Al

Re: [PATCH RFC bpf-next 1/4] bpf: add struct largest member size in func model

2025-04-24 Thread Alexis Lothoré
Hi Xu, On Thu Apr 24, 2025 at 2:00 PM CEST, Xu Kuohai wrote: > On 4/24/2025 3:24 AM, Alexis Lothoré wrote: >> Hi Andrii, >> >> On Wed Apr 23, 2025 at 7:15 PM CEST, Andrii Nakryiko wrote: >>> On Thu, Apr 17, 2025 at 12:14 AM Alexis Lothoré >>> wrote: Hi Andrii, On Wed Apr 16,

Re: [PATCH RFC bpf-next 1/4] bpf: add struct largest member size in func model

2025-04-24 Thread Xu Kuohai
On 4/24/2025 3:24 AM, Alexis Lothoré wrote: Hi Andrii, On Wed Apr 23, 2025 at 7:15 PM CEST, Andrii Nakryiko wrote: On Thu, Apr 17, 2025 at 12:14 AM Alexis Lothoré wrote: Hi Andrii, On Wed Apr 16, 2025 at 11:24 PM CEST, Andrii Nakryiko wrote: On Fri, Apr 11, 2025 at 1:32 PM Alexis Lothoré (

Re: [PATCH RFC bpf-next 1/4] bpf: add struct largest member size in func model

2025-04-23 Thread Alexis Lothoré
Hi Andrii, On Wed Apr 23, 2025 at 7:15 PM CEST, Andrii Nakryiko wrote: > On Thu, Apr 17, 2025 at 12:14 AM Alexis Lothoré > wrote: >> >> Hi Andrii, >> >> On Wed Apr 16, 2025 at 11:24 PM CEST, Andrii Nakryiko wrote: >> > On Fri, Apr 11, 2025 at 1:32 PM Alexis Lothoré (eBPF Foundation) >> > wrote:

Re: [PATCH RFC bpf-next 1/4] bpf: add struct largest member size in func model

2025-04-23 Thread Andrii Nakryiko
On Thu, Apr 17, 2025 at 12:14 AM Alexis Lothoré wrote: > > Hi Andrii, > > On Wed Apr 16, 2025 at 11:24 PM CEST, Andrii Nakryiko wrote: > > On Fri, Apr 11, 2025 at 1:32 PM Alexis Lothoré (eBPF Foundation) > > wrote: > >> > >> In order to properly JIT the trampolines needed to attach BPF programs >

Re: [PATCH RFC bpf-next 1/4] bpf: add struct largest member size in func model

2025-04-23 Thread Alexis Lothoré
On Mon Apr 21, 2025 at 4:14 AM CEST, Xu Kuohai wrote: > On 4/21/2025 12:02 AM, Alexis Lothoré wrote: >> Hi Xu, >> >> On Thu Apr 17, 2025 at 4:10 PM CEST, Xu Kuohai wrote: >>> On 4/17/2025 3:14 PM, Alexis Lothoré wrote: Hi Andrii, On Wed Apr 16, 2025 at 11:24 PM CEST, Andrii Nakryiko

Re: [PATCH RFC bpf-next 1/4] bpf: add struct largest member size in func model

2025-04-20 Thread Xu Kuohai
On 4/21/2025 12:02 AM, Alexis Lothoré wrote: Hi Xu, On Thu Apr 17, 2025 at 4:10 PM CEST, Xu Kuohai wrote: On 4/17/2025 3:14 PM, Alexis Lothoré wrote: Hi Andrii, On Wed Apr 16, 2025 at 11:24 PM CEST, Andrii Nakryiko wrote: On Fri, Apr 11, 2025 at 1:32 PM Alexis Lothoré (eBPF Foundation) wrot

Re: [PATCH RFC bpf-next 1/4] bpf: add struct largest member size in func model

2025-04-20 Thread Alexis Lothoré
Hi Xu, On Thu Apr 17, 2025 at 4:10 PM CEST, Xu Kuohai wrote: > On 4/17/2025 3:14 PM, Alexis Lothoré wrote: >> Hi Andrii, >> >> On Wed Apr 16, 2025 at 11:24 PM CEST, Andrii Nakryiko wrote: >>> On Fri, Apr 11, 2025 at 1:32 PM Alexis Lothoré (eBPF Foundation) >>> wrote: [...] >>> I might be missi

Re: [PATCH RFC bpf-next 1/4] bpf: add struct largest member size in func model

2025-04-17 Thread Xu Kuohai
On 4/17/2025 3:14 PM, Alexis Lothoré wrote: Hi Andrii, On Wed Apr 16, 2025 at 11:24 PM CEST, Andrii Nakryiko wrote: On Fri, Apr 11, 2025 at 1:32 PM Alexis Lothoré (eBPF Foundation) wrote: In order to properly JIT the trampolines needed to attach BPF programs to functions, some architectures

Re: [PATCH RFC bpf-next 1/4] bpf: add struct largest member size in func model

2025-04-17 Thread Alexis Lothoré
Hi Andrii, On Wed Apr 16, 2025 at 11:24 PM CEST, Andrii Nakryiko wrote: > On Fri, Apr 11, 2025 at 1:32 PM Alexis Lothoré (eBPF Foundation) > wrote: >> >> In order to properly JIT the trampolines needed to attach BPF programs >> to functions, some architectures like ARM64 need to know about the >>

Re: [PATCH RFC bpf-next 1/4] bpf: add struct largest member size in func model

2025-04-16 Thread Andrii Nakryiko
On Fri, Apr 11, 2025 at 1:32 PM Alexis Lothoré (eBPF Foundation) wrote: > > In order to properly JIT the trampolines needed to attach BPF programs > to functions, some architectures like ARM64 need to know about the > alignment needed for the function arguments. Such alignment can > generally be d

Re: [PATCH RFC bpf-next 1/4] bpf: add struct largest member size in func model

2025-04-14 Thread Alexis Lothoré
Hello Jiri, On Mon Apr 14, 2025 at 1:04 PM CEST, Jiri Olsa wrote: > On Fri, Apr 11, 2025 at 10:32:10PM +0200, Alexis Lothoré (eBPF Foundation) > wrote: [...] >> +for_each_member(i, t, member) { >> +mtype = btf_type_by_id(btf, member->type); >> +while (mtype && btf_ty

Re: [PATCH RFC bpf-next 1/4] bpf: add struct largest member size in func model

2025-04-14 Thread Jiri Olsa
On Fri, Apr 11, 2025 at 10:32:10PM +0200, Alexis Lothoré (eBPF Foundation) wrote: > In order to properly JIT the trampolines needed to attach BPF programs > to functions, some architectures like ARM64 need to know about the > alignment needed for the function arguments. Such alignment can > genera

[PATCH RFC bpf-next 1/4] bpf: add struct largest member size in func model

2025-04-11 Thread eBPF Foundation
In order to properly JIT the trampolines needed to attach BPF programs to functions, some architectures like ARM64 need to know about the alignment needed for the function arguments. Such alignment can generally be deduced from the argument size, but that's not completely true for composite types.