Re: [PATCH bpf-next v1 1/2] bpf: Create cgroup storage if needed when updating link

2025-04-23 Thread Martin KaFai Lau
On 4/22/25 7:21 PM, Jiayuan Chen wrote: April 23, 2025 at 08:13, "Martin KaFai Lau" wrote: On 4/16/25 9:40 PM, Jiayuan Chen wrote: when we attach a prog without cgroup_storage map being used, cgroup_storage in struct bpf_prog_array_item is empty. Then, if we use BPF_LINK_UPDATE to re

Re: [PATCH bpf-next v1 1/2] bpf: Create cgroup storage if needed when updating link

2025-04-22 Thread Jiayuan Chen
April 23, 2025 at 08:13, "Martin KaFai Lau" wrote: > > On 4/16/25 9:40 PM, Jiayuan Chen wrote: > > > > > when we attach a prog without cgroup_storage map being used, > > > > cgroup_storage in struct bpf_prog_array_item is empty. Then, if we use > > > > BPF_LINK_UPDATE to replace old prog w

Re: [PATCH bpf-next v1 1/2] bpf: Create cgroup storage if needed when updating link

2025-04-22 Thread Martin KaFai Lau
On 4/16/25 9:40 PM, Jiayuan Chen wrote: when we attach a prog without cgroup_storage map being used, cgroup_storage in struct bpf_prog_array_item is empty. Then, if we use BPF_LINK_UPDATE to replace old prog with a new one that uses the cgroup_storage map, we miss cgroup_storage being initiated.

[PATCH bpf-next v1 1/2] bpf: Create cgroup storage if needed when updating link

2025-04-16 Thread Jiayuan Chen
when we attach a prog without cgroup_storage map being used, cgroup_storage in struct bpf_prog_array_item is empty. Then, if we use BPF_LINK_UPDATE to replace old prog with a new one that uses the cgroup_storage map, we miss cgroup_storage being initiated. This cause a painc when accessing stroage