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: <20250903081211.GO3245006@noisy.programming.kicks-ass.net>
Date: Wed, 3 Sep 2025 10:12:11 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: kan.liang@...ux.intel.com
Cc: mingo@...hat.com, acme@...nel.org, namhyung@...nel.org,
	irogers@...gle.com, linux-kernel@...r.kernel.org,
	linux-perf-users@...r.kernel.org, linux-s390@...r.kernel.org,
	Sumanth Korikkar <sumanthk@...ux.ibm.com>
Subject: Re: [PATCH] perf: Fix the POLL_HUP delivery breakage

On Mon, Aug 11, 2025 at 11:26:44AM -0700, kan.liang@...ux.intel.com wrote:
> From: Kan Liang <kan.liang@...ux.intel.com>
> 
> The event_limit can be set by the PERF_EVENT_IOC_REFRESH to limit the
> number of events. When the event_limit reaches 0, the POLL_HUP signal
> should be sent. But it's missed.
> 
> The corresponding counter should be stopped when the event_limit reaches
> 0. It was implemented in the ARCH-specific code. However, since the
> commit 9734e25fbf5a ("perf: Fix the throttle logic for a group"), all
> the ARCH-specific code has been moved to the generic code. The code to
> handle the event_limit was lost.
> 
> Add the event->pmu->stop(event, 0); back.
> 
> Fixes: 9734e25fbf5a ("perf: Fix the throttle logic for a group")
> Closes: https://lore.kernel.org/lkml/aICYAqM5EQUlTqtX@li-2b55cdcc-350b-11b2-a85c-a78bff51fc11.ibm.com/
> Reported-by: Sumanth Korikkar <sumanthk@...ux.ibm.com>
> Tested-by: Sumanth Korikkar <sumanthk@...ux.ibm.com>
> Signed-off-by: Kan Liang <kan.liang@...ux.intel.com>
> ---
>  kernel/events/core.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index dd8cf3c7fb7a..ec19c456b66d 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -10378,6 +10378,7 @@ static int __perf_event_overflow(struct perf_event *event,
>  		ret = 1;
>  		event->pending_kill = POLL_HUP;
>  		perf_event_disable_inatomic(event);
> +		event->pmu->stop(event, 0);
>  	}
>  
>  	if (event->attr.sigtrap) {

Right. I've queued the patch, but should we take a hard look at anybody
still consuming the return value of perf_event_overflow?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ