lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 10 May 2022 15:49:59 -0700 From: Hao Luo <haoluo@...gle.com> To: Tejun Heo <tj@...nel.org> Cc: Yosry Ahmed <yosryahmed@...gle.com>, Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, Andrii Nakryiko <andrii@...nel.org>, Martin KaFai Lau <kafai@...com>, Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>, John Fastabend <john.fastabend@...il.com>, KP Singh <kpsingh@...nel.org>, Zefan Li <lizefan.x@...edance.com>, Johannes Weiner <hannes@...xchg.org>, Shuah Khan <shuah@...nel.org>, Roman Gushchin <roman.gushchin@...ux.dev>, Michal Hocko <mhocko@...nel.org>, Stanislav Fomichev <sdf@...gle.com>, David Rientjes <rientjes@...gle.com>, Greg Thelen <gthelen@...gle.com>, Shakeel Butt <shakeelb@...gle.com>, linux-kernel@...r.kernel.org, netdev@...r.kernel.org, bpf@...r.kernel.org, cgroups@...r.kernel.org Subject: Re: [RFC PATCH bpf-next 8/9] bpf: Introduce cgroup iter On Tue, May 10, 2022 at 3:07 PM Tejun Heo <tj@...nel.org> wrote: > > Hello, > > On Tue, May 10, 2022 at 02:12:16PM -0700, Hao Luo wrote: > > > Is there a reason why this can't be a proper iterator which supports > > > lseek64() to locate a specific cgroup? > > > > > > > There are two reasons: > > > > - Bpf_iter assumes no_llseek. I haven't looked closely on why this is > > so and whether we can add its support. > > > > - Second, the name 'iter' in this patch is misleading. What this patch > > really does is reusing the functionality of dumping in bpf_iter. > > 'Dumper' is a better name. We want to create one file in bpffs for > > each cgroup. We are essentially just iterating a set of one single > > element. > > I see. I'm just shooting in the dark without context but at least in > principle there's no reason why cgroups wouldn't be iterable, so it might be > something worth at least thinking about before baking in the interface. > Yep. Conceptually there should be no problem to iterate cgroups in the system. It may be better to have two independent bpf objects: bpf_iter and bpf_dumper. In our use case, we want bpf_dumper, which just exports data out through fs interface. Hao
Powered by blists - more mailing lists