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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230417105727.GG83892@hirez.programming.kicks-ass.net>
Date:   Mon, 17 Apr 2023 12:57:27 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Adrian Hunter <adrian.hunter@...el.com>
Cc:     Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Ian Rogers <irogers@...gle.com>,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC 1/5] perf: Add ioctl to emit sideband events

On Fri, Apr 14, 2023 at 11:22:56AM +0300, Adrian Hunter wrote:
> perf tools currently read /proc to get this information, but that
> races with changes made by the kernel.
> 
> Add an ioctl to output status-only sideband events for a currently
> active event on the current CPU. Using timestamps, these status-only
> sideband events will be correctly ordered with respect to "real"
> sideband events.
> 
> The assumption is a user will:
> 	- open and enable a dummy event to track sideband events
> 	- call the new ioctl to get sideband information for currently
> 	  running processes as needed
> 	- enable the remaining selected events
> 
> The initial sideband events to be supported will be: fork, namespaces, comm
> and mmap.
> 
> Add a new misc flag PERF_RECORD_MISC_STATUS_ONLY to differentiate "real"
> sideband events from status-only sideband events.
> 
> The limitation that the event must be active is significant. The ioctl
> caller must either:
> 	i)  For a CPU context, set CPU affinity to the correct CPU.
> 	    Note, obviously that would not need to be done for system-wide
> 	    tracing on all CPUs. It would also only need to be done for the
> 	    period of tracing when the ioctl is to be used.
> 	ii) Use an event opened for the current process on all CPUs.
> 	    Note, if such an additional event is needed, it would also use
> 	    additional memory from the user's perf_event_mlock_kb /
> 	    RLIMIT_MEMLOCK limit.

Why would a single per-task event not work? I see nothing in the code
that would require a per-task-per-cpu setup. Or am I just having trouble
reading again?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ