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, 7 Jul 2015 10:25:52 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Adrian Hunter <adrian.hunter@...el.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Andi Kleen <ak@...ux.intel.com>,
	Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
	Jiri Olsa <jolsa@...hat.com>,
	Stephane Eranian <eranian@...gle.com>,
	mathieu.poirier@...aro.org, Pawel Moll <pawel.moll@....com>
Subject: Re: [PATCH V3 1/4] perf: Add PERF_RECORD_SWITCH to indicate context
 switches

Em Tue, Jul 07, 2015 at 11:36:39AM +0300, Adrian Hunter escreveu:
> To make the event useful for privileged users also, if the
> context is cpu-wide then the event will also provide the
> next or previous pid/tid.

<SNIP>
  
> +	/*
> +	 * Records a context switch in or out (flagged by
> +	 * PERF_RECORD_MISC_SWITCH_OUT).  next_prev_pid and next_prev_tid are
> +	 * (u32)-1 unless the context is cpu-wide, in which case they are the

Why carry those extra 8 bytes for non priviledged users, all the time
with -1?

Can't userspace cope with this, i.e. we should be able to look for those
fields when the context is CPU wide, and to not look for them otherwise,
no?

> +	 * next (switching out) or previous (switching in) pid/tid.
> +	 *
> +	 * struct {
> +	 *	struct perf_event_header	header;
> +	 *	u32				next_prev_pid;
> +	 *	u32				next_prev_tid;
> +	 *	struct sample_id		sample_id;
> +	 * };
> +	 */
> +	PERF_RECORD_SWITCH			= 14,
> +

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ