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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 5 Aug 2022 14:48:15 -0700 From: Hao Luo <haoluo@...gle.com> To: linux-kernel@...r.kernel.org, bpf@...r.kernel.org, cgroups@...r.kernel.org, netdev@...r.kernel.org Cc: Alexei Starovoitov <ast@...nel.org>, Andrii Nakryiko <andrii@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, Martin KaFai Lau <martin.lau@...ux.dev>, Song Liu <song@...nel.org>, Yonghong Song <yhs@...com>, Tejun Heo <tj@...nel.org>, Zefan Li <lizefan.x@...edance.com>, KP Singh <kpsingh@...nel.org>, Johannes Weiner <hannes@...xchg.org>, Michal Hocko <mhocko@...nel.org>, Benjamin Tissoires <benjamin.tissoires@...hat.com>, John Fastabend <john.fastabend@...il.com>, Michal Koutny <mkoutny@...e.com>, Roman Gushchin <roman.gushchin@...ux.dev>, David Rientjes <rientjes@...gle.com>, Stanislav Fomichev <sdf@...gle.com>, Shakeel Butt <shakeelb@...gle.com>, Yosry Ahmed <yosryahmed@...gle.com>, Hao Luo <haoluo@...gle.com> Subject: [PATCH bpf-next v7 2/8] cgroup: enable cgroup_get_from_file() on cgroup1 From: Yosry Ahmed <yosryahmed@...gle.com> cgroup_get_from_file() currently fails with -EBADF if called on cgroup v1. However, the current implementation works on cgroup v1 as well, so the restriction is unnecessary. This enabled cgroup_get_from_fd() to work on cgroup v1, which would be the only thing stopping bpf cgroup_iter from supporting cgroup v1. Signed-off-by: Yosry Ahmed <yosryahmed@...gle.com> Acked-by: Tejun Heo <tj@...nel.org> Signed-off-by: Hao Luo <haoluo@...gle.com> --- kernel/cgroup/cgroup.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index 13c8e91d7862..49803849a289 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -6099,11 +6099,6 @@ static struct cgroup *cgroup_get_from_file(struct file *f) return ERR_CAST(css); cgrp = css->cgroup; - if (!cgroup_on_dfl(cgrp)) { - cgroup_put(cgrp); - return ERR_PTR(-EBADF); - } - return cgrp; } -- 2.37.1.559.g78731f0fdb-goog
Powered by blists - more mailing lists