All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel: Downgrade warning for unsafe parameters
@ 2018-02-26 15:19 ` Chris Wilson
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2018-02-26 15:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: intel-gfx, Chris Wilson, Jani Nikula, Rusty Russell,
	Jean Delvare, Andrew Morton, Li Zhong, Petri Latvala,
	Daniel Vetter

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 <chris@chris-wilson.co.uk>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Li Zhong <zhong@linux.vnet.ibm.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-02-26 19:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-26 15:19 [PATCH] kernel: Downgrade warning for unsafe parameters Chris Wilson
2018-02-26 15:19 ` Chris Wilson
2018-02-26 15:31 ` Jani Nikula
2018-02-26 15:31   ` Jani Nikula
2018-02-26 15:41 ` ✓ Fi.CI.BAT: success for kernel: Downgrade warning for unsafe parameters (rev2) Patchwork
2018-02-26 19:41 ` ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.