From patchwork Tue Mar 26 21:38:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 2344061 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id EA50FDF264 for ; Tue, 26 Mar 2013 21:38:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751271Ab3CZVi5 (ORCPT ); Tue, 26 Mar 2013 17:38:57 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:44068 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751065Ab3CZVi4 (ORCPT ); Tue, 26 Mar 2013 17:38:56 -0400 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id r2QLct0r019745; Tue, 26 Mar 2013 16:38:55 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r2QLct97016380; Tue, 26 Mar 2013 16:38:55 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.2.342.3; Tue, 26 Mar 2013 16:38:55 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id r2QLct9j028408; Tue, 26 Mar 2013 16:38:55 -0500 Received: from localhost (h68-7.vpn.ti.com [172.24.68.7]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id r2QLcrV23406; Tue, 26 Mar 2013 16:38:53 -0500 (CDT) From: Eduardo Valentin To: CC: , Eduardo Valentin Subject: [PATCH 1/1] thermal: add a warning for temperature emulation feature Date: Tue, 26 Mar 2013 17:38:34 -0400 Message-ID: <1364333914-32586-1-git-send-email-eduardo.valentin@ti.com> X-Mailer: git-send-email 1.7.7.1.488.ge8e1c MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Because this feature is for debuging purposes, it is highly recommended to do not enable this on production systems. This patch adds warnings for system integrators, so that people are aware of this potential security issue. Signed-off-by: Eduardo Valentin --- Documentation/thermal/sysfs-api.txt | 4 ++++ drivers/thermal/Kconfig | 5 +++++ 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt index a9abb84..0a7d6df 100644 --- a/Documentation/thermal/sysfs-api.txt +++ b/Documentation/thermal/sysfs-api.txt @@ -265,6 +265,10 @@ emul_temp Unit: millidegree Celsius WO, Optional + WARNING: Be careful while enabling this option on production systems, + because userland can easily disable the thermal policy by simply + flooding this sysfs node with low temperature values. + ***************************** * Cooling device attributes * ***************************** diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index a764f16..004e5f7 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -80,12 +80,17 @@ config CPU_THERMAL config THERMAL_EMULATION bool "Thermal emulation mode support" + default false help Enable this option to make a emul_temp sysfs node in thermal zone directory to support temperature emulation. With emulation sysfs node, user can manually input temperature and test the different trip threshold behaviour for simulation purpose. + WARNING: Be careful while enabling this option on production systems, + because userland can easily disable the thermal policy by simply + flooding this sysfs node with low temperature values. + config SPEAR_THERMAL bool "SPEAr thermal sensor driver" depends on PLAT_SPEAR