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]
Message-ID: <20191220151622.GF2914998@devbig004.ftw2.facebook.com>
Date:   Fri, 20 Dec 2019 07:16:22 -0800
From:   Tejun Heo <tj@...nel.org>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Namhyung Kim <namhyung@...nel.org>, Ingo Molnar <mingo@...nel.org>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Jiri Olsa <jolsa@...hat.com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Mark Rutland <mark.rutland@....com>,
        Stephane Eranian <eranian@...gle.com>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-perf-users@...r.kernel.org, Li Zefan <lizefan@...wei.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Adrian Hunter <adrian.hunter@...el.com>
Subject: Re: [PATCH 1/9] perf/core: Add PERF_RECORD_CGROUP event

On Fri, Dec 20, 2019 at 10:33:35AM +0100, Peter Zijlstra wrote:
> On Fri, Dec 20, 2019 at 01:32:45PM +0900, Namhyung Kim wrote:
> > To support cgroup tracking, add CGROUP event to save a link between
> > cgroup path and inode number.  The attr.cgroup bit was also added to
> > enable cgroup tracking from userspace.
> > 
> > This event will be generated when a new cgroup becomes active.
> > Userspace might need to synthesize those events for existing cgroups.
> > 
> > Cc: Tejun Heo <tj@...nel.org>
> > Cc: Li Zefan <lizefan@...wei.com>
> > Cc: Johannes Weiner <hannes@...xchg.org>
> > Cc: Adrian Hunter <adrian.hunter@...el.com>
> > Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> 
> TJ, is this the right thing to do? ISTR you had concerns on this topic
> on the past.

Yeah, cgroup->id is now the same as ino (on 64bit ino matchines) and
fhandle and uniquely identifies a cgroup instance in that boot
instance.  That said, id -> path mapping can be done from userspace by
passing the cgroup id to open_by_handle_at(2) and then reading the
symlink in /proc/self/fd, so this event isn't necessary per-se if the
goal is mapping back ids to paths.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ