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:	Wed, 19 Aug 2009 12:58:18 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	Paul Mackerras <paulus@...ba.org>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Mike Galbraith <efault@....de>, linux-kernel@...r.kernel.org,
	stephane eranian <eranian@...glemail.com>
Subject: Re: [PATCH 4/4][RFC] perf_counter: Allow sharing of output channels


* Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:

> Provide the ability to configure a counter to send its output to
> another (already existing) counter's output stream.
> 
> [ compile tested only ]

very nice!

two comments:

> Index: linux-2.6/include/linux/perf_counter.h
> ===================================================================
> --- linux-2.6.orig/include/linux/perf_counter.h
> +++ linux-2.6/include/linux/perf_counter.h
> @@ -216,6 +216,7 @@ struct perf_counter_attr {
>  #define PERF_COUNTER_IOC_REFRESH	_IO ('$', 2)
>  #define PERF_COUNTER_IOC_RESET		_IO ('$', 3)
>  #define PERF_COUNTER_IOC_PERIOD		_IOW('$', 4, u64)
> +#define PERF_COUNTER_IOC_SET_OUTPUT	_IO ('$', 5)

Time to add a new sys_perf_counter_chattr() syscall and deprecate 
the ioctls?

> @@ -415,6 +416,9 @@ enum perf_callchain_context {
>  	PERF_CONTEXT_MAX		= (__u64)-4095,
>  };
>  
> +#define PERF_FLAG_FD_NO_GROUP	(1U << 0)
> +#define PERF_FLAG_FD_OUTPUT	(1U << 1)

Why not extend the size of perf_counter_attr and add an output_fd 
parameter? Zero would mean no fd (and this is also backwards 
compatible behavior).

FD_NO_GROUP is a bit unclean API as it aliases group_fd to two 
purposes: the real group_fd and this new output_fd. I think we 
should move output_fd to the attribute structure.

That way one could also create a group counter which shares the 
output channel with another counter, in the same 
perf_counter_open() call.

	Ingo
--
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