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: <1362995984.14933.0.camel@laptop>
Date:	Mon, 11 Mar 2013 10:59:44 +0100
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Paul Mackerras <paulus@...ba.org>,
	Ingo Molnar <mingo@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Stephane Eranian <eranian@...gle.com>,
	Namhyung Kim <namhyung.kim@....com>,
	Jiri Olsa <jolsa@...hat.com>,
	Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [PATCH 1/2] perf: Reset detached siblings' group_flags

On Thu, 2013-03-07 at 13:19 +0900, Namhyung Kim wrote:
> From: Namhyung Kim <namhyung.kim@....com>
> 
> Currently if a group_leader event is deleted, the sibling events are
> upgraded to singleton events of a same group list.  At this time, the
> siblings inherit the leader's group_flags.
> 
> However, if the group has mixed hw/sw events the leader's group_flag
> does not contain PERF_GROUP_SOFTWARE so sibling sw events will miss
> the flag also.  Fix it.
> 
> Cc: Jiri Olsa <jolsa@...hat.com>
> Cc: Frederic Weisbecker <fweisbec@...il.com>
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> ---
>  kernel/events/core.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index 5c75791d7269..007dfe846d4d 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -1107,8 +1107,9 @@ static void perf_group_detach(struct perf_event *event)
>  			list_move_tail(&sibling->group_entry, list);
>  		sibling->group_leader = sibling;
>  
> -		/* Inherit group flags from the previous leader */
> -		sibling->group_flags = event->group_flags;
> +		/* Reset group flags for each siblings */
> +		sibling->group_flags = is_software_event(sibling) ?
> +						PERF_GROUP_SOFTWARE : 0;
>  	}


In such a case, does the event not continue to live on the hw pmu? That
is, after this patch we'll have a software event on the hardware pmu
list with PERF_GROUP_SOFTWARE set, right? Seems odd.

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