Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754513AbbHOTvh (ORCPT ); Sat, 15 Aug 2015 15:51:37 -0400 Received: from casper.infradead.org ([85.118.1.10]:45011 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754229AbbHOTva (ORCPT ); Sat, 15 Aug 2015 15:51:30 -0400 Date: Sat, 15 Aug 2015 14:40:59 +0200 From: Peter Zijlstra To: Michael Turquette Cc: Morten Rasmussen , mingo@redhat.com, vincent.guittot@linaro.org, daniel.lezcano@linaro.org, Dietmar Eggemann , yuyang.du@intel.com, rjw@rjwysocki.net, Juri Lelli , sgurrappadi@nvidia.com, pang.xunlei@zte.com.cn, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [RFCv5 PATCH 39/46] sched/cpufreq_sched: use static key for cpu frequency selection Message-ID: <20150815124059.GF10304@worktop.programming.kicks-ass.net> References: <1436293469-25707-1-git-send-email-morten.rasmussen@arm.com> <1436293469-25707-40-git-send-email-morten.rasmussen@arm.com> <20150708151956.9112.52403@quantum> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150708151956.9112.52403@quantum> User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1106 Lines: 31 On Wed, Jul 08, 2015 at 08:19:56AM -0700, Michael Turquette wrote: > > @@ -254,6 +267,7 @@ static int cpufreq_sched_stop(struct cpufreq_policy *policy) > > { > > struct gov_data *gd = policy->governor_data; > > > > + clear_sched_energy_freq(); > > > > These controls are exposed to userspace via cpufreq sysfs knobs. Should > we use a struct static_key_deferred and static_key_slow_dec_deferred() > instead? This helps avoid a possible attack vector for slowing down the > system. > > > > I don't really know what a sane default rate limit would be in that case > though. Otherwise feel free to add: Exposed through being able to change the policy, right? No other new knobs, right? IIRC the policy is only writable by root, in which case deferred isn't really needed, root can kill the machine many other ways. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/