Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp582854pxj; Fri, 14 May 2021 10:25:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOxV3mA3vqbe2Gez9b2k+nMPIidFecLF7bDbdwzw+Aoutg6OV1Y0Fo6AI9bPxUeK+c+kUv X-Received: by 2002:a17:907:7216:: with SMTP id dr22mr50144444ejc.185.1621013146307; Fri, 14 May 2021 10:25:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621013146; cv=none; d=google.com; s=arc-20160816; b=oi3jHnNn2kOjHy4ptwITW3RQu6Kq8dV7Aanh5ZoN/nr15bH0s08NL/9oi1YRyxnPOC 3BA1OL+F86h6G6U7K4OubQEKNJ7j/Cgk09KoIHQPlp0vRBBwMPWdYt5jlMxMVJVETu3p MUJyMkQgtT8t6+T4tPX/ws6pfVsJjjrpBkQi+XqPQEirczzXiEw7axcJSFkcr9vG7nUa 3CRh9ls29qZ19uz19VONAjvyvmy6711nqk2X6S9DNeZf/361iU+D4iy9qU3Uv5Anj79B uo596ANl5VSJLO8utYr+g+FwW7ewC9GCH0YqJ3FV3DXtGOI7eRdIrgDmBL+2Mx4Nx6q2 iXkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=XtJPNgENJo11S0NrI9swYaHsEBsmLOREfhcvYeNhgNk=; b=N/0mAXwYhh1lvZHaAbcpYGlYenhCbcP0JX37vIUumSUDbUEunRPCIqw14FJC2I8/CK YoLaBi5hm8sTmUd9cCh0B91NWjh1LeNepZj/Uc9mtwRZqNPBR7RfvW/xcyyWZyARtU6G BdpTGUdbFPV895GXhU2EVGYcCfUiCnXr6IJpYj2NatFD4hCZKw8HHwkxBvW4doY9AMUz uBg4sDi7Bceg9dFSlQ+JvzwbgFV8a1Tdecs+itv6ZNCCiFY50mRQDsHuXU9yXbQtNkii XbRWMmrMu9ZjHqyaZZIn2Ebq+rbtdR2XihO+VZ0u5atAqVNA/AZhPTMG9OKzK2BGNmAq 8nLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Voo6aXj0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i23si3460263ejo.22.2021.05.14.10.25.22; Fri, 14 May 2021 10:25:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Voo6aXj0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230289AbhENLXH (ORCPT + 99 others); Fri, 14 May 2021 07:23:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:56180 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230239AbhENLXF (ORCPT ); Fri, 14 May 2021 07:23:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 889D16145E for ; Fri, 14 May 2021 11:21:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620991314; bh=XtJPNgENJo11S0NrI9swYaHsEBsmLOREfhcvYeNhgNk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Voo6aXj0gbZ3AK0iegY08kc4l4Wyr9sq9YbD9zPEomjMTR2ZemYSw5tyJJur8cCdy WYSAykN9Gg1nzncG8hyuSPTXGqLtEeYmHD1qJT47EXBgNKOJY3OXcfBlwKJ7yqOQAL Y+gY5MkZFOB6e5x/GpR0XUhRhd+MCbufcR9VkzRg0NeAwlunqus2xjkvlgwjuNwX+X 7s5S8yub2PzSWD7sSDKEsbtYfTHJTnSNnOV2vV0nrdS3mxT0AVydpE2D3XOCgdQCMb fiA/0ITIE7WShKRgsAN37S+KHXoEQzdjCaBH+CtRRPZmXRNw/GxGXiUz4vsbw9Kke1 efD7LIwLOdKjQ== Received: by mail-lf1-f51.google.com with SMTP id m11so26180141lfg.3 for ; Fri, 14 May 2021 04:21:54 -0700 (PDT) X-Gm-Message-State: AOAM531UTFR8+RlwP1u2XyR/leFcjPQSv7DgBKk0/1DpTiLpjkLfQQ2G N30UYUCekcpsh8H7sEhu5KhRwvfBIeTa6C24D3gFzw== X-Received: by 2002:ac2:5f72:: with SMTP id c18mr32762345lfc.233.1620991312780; Fri, 14 May 2021 04:21:52 -0700 (PDT) MIME-Version: 1.0 References: <20210512095823.99162-1-yunbo.xufeng@linux.alibaba.com> <20210512095823.99162-2-yunbo.xufeng@linux.alibaba.com> <20210512225504.3kt6ij4xqzbtyej5@ast-mbp.dhcp.thefacebook.com> <9ae7e503-8f49-a7a4-3e18-0288c7989484@linux.alibaba.com> In-Reply-To: From: KP Singh Date: Fri, 14 May 2021 13:21:41 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC] [PATCH bpf-next 1/1] bpf: Add a BPF helper for getting the cgroup path of current task To: Alexei Starovoitov Cc: xufeng zhang , Alexei Starovoitov , Daniel Borkmann , bpf , LKML , LSM List , Florent Revest , Brendan Jackman , Yonghong Song , Song Liu , Martin KaFai Lau , John Fastabend , Joe Stringer , Quentin Monnet Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > About your suggestion, the *cgroup_id helpers only works for cgroup v2, > > however, we're still using cgroup v1 in product=EF=BC=8Cand even for cg= roup v2, > > I'm not sure if there is any way for user space to get this cgroup id > > timely(after container created, but before container start to run)=E3= =80=82 > > > > So if there is any effective way works for cgroup v1? > > https://github.com/systemd/systemd/blob/main/NEWS#L379 I agree that we should not focus on cgroup v1 if we do add a helper.