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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 12 May 2016 13:26:53 +0000
From:	"Liang, Kan" <kan.liang@...el.com>
To:	Peter Zijlstra <peterz@...radead.org>
CC:	"mingo@...hat.com" <mingo@...hat.com>,
	"acme@...nel.org" <acme@...nel.org>,
	"alexander.shishkin@...ux.intel.com" 
	<alexander.shishkin@...ux.intel.com>,
	"ak@...ux.intel.com" <ak@...ux.intel.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 1/1] perf/core: fix implicitly enable dynamic interrupt
 throttle


> 
> 
> Hmm, would it not be nicer to simply reject the write instead of silently
> ignoring it?
>

Yes, I agree.

Thanks,
Kan

> ---
>  kernel/events/core.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/kernel/events/core.c b/kernel/events/core.c index
> 050a290c72c7..0a51a568d4eb 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -396,6 +396,13 @@ int perf_proc_update_handler(struct ctl_table
> *table, int write,
>  	if (ret || !write)
>  		return ret;
> 
> +	/*
> +	 * If the throttling is disabled; don't allow the write.
> +	 */
> +	if (sysctl_perf_cpu_time_max_percent == 100 ||
> +	    sysctl_perf_cpu_time_max_percent == 0)
> +		return -EINVAL;
> +
>  	max_samples_per_tick =
> DIV_ROUND_UP(sysctl_perf_event_sample_rate, HZ);
>  	perf_sample_period_ns = NSEC_PER_SEC /
> sysctl_perf_event_sample_rate;
>  	update_perf_cpu_limits();

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ