Received: by 10.223.185.116 with SMTP id b49csp3876841wrg; Mon, 26 Feb 2018 07:32:36 -0800 (PST) X-Google-Smtp-Source: AH8x226QOsMGOaIwm26WBgolJqhfLONvClgNHKwMDKQVdzLIGClcNLRym2kIvuzPke1sJFBSgtTC X-Received: by 2002:a17:902:3a1:: with SMTP id d30-v6mr10791678pld.409.1519659155984; Mon, 26 Feb 2018 07:32:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519659155; cv=none; d=google.com; s=arc-20160816; b=SbTskBbsTm8OUZvrH0A/Az/Fe3TPax1LI6zy3ipzku93PfZdG8uAuns66T1c6NuJm+ 2Q5/UEPgyfhWSs09rNZEDXUPxxUuIPhgLXup2ElpzCXlGNiR6aEc4g3x6cF7aUaPl58L XmQLNwZE16hNcNmoh+d5+WwgC65yGaukc5LgBrr/FIVOq4JY7OsfZhbI/ZtLBXgLMcDh ett7aYUFpebJMIZurzBNcxYvGdmHOi4XZab45H1hOOyjke3CexzErELiWVsDqBIt17n2 1V991R2jIZLUFYuwQWa/L6Y3VFi3GJxS5vjLeWLjItCe18VyNwIgTAehPnkUAe2leneL g1Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from :arc-authentication-results; bh=sdRMuSn/0caSS/VYpcg/KoM1QJIKGhG4x+CiamM/Oqk=; b=OzW7iHkJKlapVvJHKCWVkzAlt89jePMIyqcnj3/YuDbLBdoH7O+b0zBtq6dsKKvXIn jK8z+IInsmDJYdN+bSXFRu3inBW6mKHlKuIKwfabYKrHrFuznQjDJT6Xz9/IT79BX387 b3h7IimS4kdnFMyBBVLOtEdD4HpwxmIHMUJ6R4eJXdehf+ZSHUpwBRvuALVgTHGrVtuD GM/LUxstg0C4YoWSbr1K/jnlHKIFNojl1rBUkQJVuslO3pQUlYw8nEUhX/D1OHhYlh4m 0I9ztIX0NOdqzSiAluMpa4hC55mSLI3/6hmOl/3MdFNMljbtVwq8JpN0vRpawmZq6/bR xo3w== 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 t192si5586470pgc.594.2018.02.26.07.32.20; Mon, 26 Feb 2018 07:32:35 -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 S1751608AbeBZPbp (ORCPT + 99 others); Mon, 26 Feb 2018 10:31:45 -0500 Received: from mga07.intel.com ([134.134.136.100]:39490 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751628AbeBZPbj (ORCPT ); Mon, 26 Feb 2018 10:31:39 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Feb 2018 07:31:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,397,1515484800"; d="scan'208";a="33712202" Received: from ederpatr-mobl.ger.corp.intel.com (HELO localhost) ([10.249.35.171]) by fmsmga001.fm.intel.com with ESMTP; 26 Feb 2018 07:31:33 -0800 From: Jani Nikula To: Chris Wilson , linux-kernel@vger.kernel.org Cc: intel-gfx@lists.freedesktop.org, Chris Wilson , Rusty Russell , Jean Delvare , Andrew Morton , Li Zhong , Petri Latvala , Daniel Vetter Subject: Re: [PATCH] kernel: Downgrade warning for unsafe parameters In-Reply-To: <20180226151919.9674-1-chris@chris-wilson.co.uk> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20180226151919.9674-1-chris@chris-wilson.co.uk> Date: Mon, 26 Feb 2018 17:31:32 +0200 Message-ID: <87tvu322ej.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 26 Feb 2018, Chris Wilson wrote: > 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. IGT being https://cgit.freedesktop.org/drm/igt-gpu-tools/ for those not in the DRM/KMS circles. > 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 Acked-by: Jani Nikula When I added the unsafe module params, I erred on the side of making more noise about tainting, but there was really no discussion about it. FWIW, I don't mind the change, as long as it's not debug level. BR, Jani. > --- > 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); > } > } -- Jani Nikula, Intel Open Source Technology Center