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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 11 Oct 2022 06:49:18 -1000
From:   Tejun Heo <tj@...nel.org>
To:     Martin KaFai Lau <martin.lau@...ux.dev>
Cc:     Yosry Ahmed <yosryahmed@...gle.com>, cgroups@...r.kernel.org,
        linux-kernel@...r.kernel.org, bpf@...r.kernel.org,
        Zefan Li <lizefan.x@...edance.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Yonghong Song <yhs@...com>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Song Liu <song@...nel.org>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>,
        Stanislav Fomichev <sdf@...gle.com>,
        Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>
Subject: Re: [PATCH v2 2/2] bpf: cgroup_iter: support cgroup1 using cgroup fd

On Tue, Oct 11, 2022 at 09:46:27AM -0700, Martin KaFai Lau wrote:
> On 10/10/22 5:33 PM, Yosry Ahmed wrote:
> > Use cgroup_v1v2_get_from_fd() in cgroup_iter to support attaching to
> > both cgroup v1 and v2 using fds.
> > 
> > Signed-off-by: Yosry Ahmed <yosryahmed@...gle.com>
> > ---
> >   kernel/bpf/cgroup_iter.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/kernel/bpf/cgroup_iter.c b/kernel/bpf/cgroup_iter.c
> > index 0d200a993489..9fcf09f2ef00 100644
> > --- a/kernel/bpf/cgroup_iter.c
> > +++ b/kernel/bpf/cgroup_iter.c
> > @@ -196,7 +196,7 @@ static int bpf_iter_attach_cgroup(struct bpf_prog *prog,
> >   		return -EINVAL;
> >   	if (fd)
> > -		cgrp = cgroup_get_from_fd(fd);
> > +		cgrp = cgroup_v1v2_get_from_fd(fd);
> 
> Acked-by: Martin KaFai Lau <martin.lau@...nel.org>
> 
> Tejun, patch 1 should depend on a recent revert that is not in the bpf tree
> yet.  Do you want to take this set to the cgroup tree?

Yeah, will do.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ