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] [day] [month] [year] [list]
Date:	Wed, 14 Oct 2009 12:54:12 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Paul Mackerras <paulus@...ba.org>
Cc:	Ingo Molnar <mingo@...e.hu>,
	"Mark W. Krentel" <krentel@...rice.edu>,
	linux-kernel@...r.kernel.org,
	Corey Ashford <cjashfor@...ux.vnet.ibm.com>
Subject: Re: [PATCH] perf_event: Adjust frequency and unthrottle for
 non-group-leader events

On Wed, 2009-10-14 at 16:58 +1100, Paul Mackerras wrote:
> The loop in perf_ctx_adjust_freq checks the frequency of sampling
> event counters, and adjusts the event interval and unthrottles the
> event if required, and resets the interrupt count for the event.
> However, at present it only looks at group leaders.
> 
> This means that a sampling event that is not a group leader will
> eventually get throttled, once its interrupt count reaches
> sysctl_perf_event_sample_rate/HZ --- and that is guaranteed to
> happen, if the event is active for long enough, since the interrupt
> count never gets reset.  Once it is throttled it never gets
> unthrottled, so it basically just stops working at that point.
> 
> This fixes it by making perf_ctx_adjust_freq use ctx->event_list
> rather than ctx->group_list.  The existing spin_lock/spin_unlock
> around the loop makes it unnecessary to put rcu_read_lock/
> rcu_read_unlock around the list_for_each_entry_rcu().
> 
> Reported-by: Mark W. Krentel <krentel@...rice.edu>
> Signed-off-by: Paul Mackerras <paulus@...ba.org>

Looks good, thanks Paul!

Acked-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>

> ---
> Apparently this bug was only seen on powerpc, and not on x86.  I have
> no idea why.

Weird, should work the same way on both of them.


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