Received: by 10.223.185.116 with SMTP id b49csp3881848wrg; Mon, 26 Feb 2018 07:37:18 -0800 (PST) X-Google-Smtp-Source: AH8x227g2egQuJNkteZnGfZA1Dp3tVH3TM4jr4t0fFIyDCRzPnGLUPBr7LGuGDsK28Lo8uYMc/qx X-Received: by 2002:a17:902:8214:: with SMTP id x20-v6mr10847443pln.182.1519659438876; Mon, 26 Feb 2018 07:37:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519659438; cv=none; d=google.com; s=arc-20160816; b=Qlj40WVP6U9rX9jqz2dXMpCsn5mwzZJcGsHMJce/vZI9IZLWxj8FMudPPBfQx2FeSU 0dqW5k/QRdfc/I/ubn9KNsqAVwhMroKebvfM4jS+Ogk5S7RmbduDwkBPLjwtHinY4Ovw eci9XSLMZKUmzffvB4OQI0OMyvBXOtdUAHyvNGJaVnxbwBFu4M6yff2xhZgWVhLG0D8B st5M7lYDbshQ6xyniwz03krXbPGc9ZUJjpBZc2hXj0cg5HsudryK8zxB1K3+Bro1okec 52PWii8PYyZ5SMfqUWN37NZ4GvbxwTE9sx9dcHhnpa+WfESk+AoCyf71Px11h3LBeZhM Ku0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=PX09OYQ9semG4OJ6aeJuUL3rzDz6BtV1ZSM3OeJ2kGc=; b=E2iBU2thI0UXi2YaoYcPoNfioEBwKFL+V/NyUkDE/waeznYXSdkbcM/QnO8LvrL4Id 1tXKPqy77OmfhlvK0Bbs/l7m4FMZQwPfoAjChKD/WALZ05r4RX7Gga3lNxAf/4MCLq0O BVZhJrGAliYnzErW72LpDS7SxQoLh2v/AcyITB3R6EuTUPv7Fyy8FSOk+MQIl6HpzRYe Swko6tZctwa0Twhx9Bf+y6LO6BjpyEtYHftbAnBNoevfcIhV+O22M+llkRbEsC9Np2Lz dqaVrm3AOLeVC/3AJIMcTGhR9yYhuLVEG9kwf8q5YBbl09SocimZZpmy/FORWZavgqtP +mnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u27si6889869pfk.241.2018.02.26.07.37.04; Mon, 26 Feb 2018 07:37:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751908AbeBZPg2 (ORCPT + 99 others); Mon, 26 Feb 2018 10:36:28 -0500 Received: from mail.fireflyinternet.com ([109.228.58.192]:55829 "EHLO fireflyinternet.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751608AbeBZPg1 (ORCPT ); Mon, 26 Feb 2018 10:36:27 -0500 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from haswell.alporthouse.com (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 10819878-1500050 for multiple; Mon, 26 Feb 2018 15:19:24 +0000 Received: by haswell.alporthouse.com (sSMTP sendmail emulation); Mon, 26 Feb 2018 15:19:26 +0000 From: Chris Wilson To: linux-kernel@vger.kernel.org Cc: intel-gfx@lists.freedesktop.org, Chris Wilson , Jani Nikula , Rusty Russell , Jean Delvare , Andrew Morton , Li Zhong , Petri Latvala , Daniel Vetter Subject: [PATCH] kernel: Downgrade warning for unsafe parameters Date: Mon, 26 Feb 2018 15:19:19 +0000 Message-Id: <20180226151919.9674-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.16.2 X-Originating-IP: 78.156.65.138 X-Country: code=GB country="United Kingdom" ip=78.156.65.138 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As using an unsafe module parameter is, by its very definition, an expected user action, emitting a warning is overkill. Nothing has yet gone wrong, and we add a taint flag for any future oops should something actually go wrong. So instead of having a user controllable pr_warn, downgrade it to a pr_notice for "a normal, but significant condition". We make use of unsafe kernel parameters in igt (we have not yet succeeded in removing all such debugging options), which generates a warning and taints the kernel. The warning is unhelpful as we then need to filter it out again as we check that every test themselves do not provoke any kernel warnings. References: 91f9d330cc14 ("module: make it possible to have unsafe, tainting module params") Signed-off-by: Chris Wilson Cc: Jani Nikula Cc: Rusty Russell Cc: Jean Delvare Cc: Andrew Morton Cc: Li Zhong Cc: Petri Latvala Cc: Daniel Vetter --- kernel/params.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/params.c b/kernel/params.c index cc9108c2a1fd..ce89f757e6da 100644 --- a/kernel/params.c +++ b/kernel/params.c @@ -111,8 +111,8 @@ bool parameq(const char *a, const char *b) static void param_check_unsafe(const struct kernel_param *kp) { if (kp->flags & KERNEL_PARAM_FL_UNSAFE) { - pr_warn("Setting dangerous option %s - tainting kernel\n", - kp->name); + pr_notice("Setting dangerous option %s - tainting kernel\n", + kp->name); add_taint(TAINT_USER, LOCKDEP_STILL_OK); } } -- 2.16.2