Skip to content

Commit edc41b3

Browse files
ickletorvalds
authored andcommitted
kernel/params.c: downgrade warning for unsafe parameters
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 (https://cgit.freedesktop.org/drm/igt-gpu-tools/) (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. Link: http://lkml.kernel.org/r/20180226151919.9674-1-chris@chris-wilson.co.uk Fixes: 91f9d33 ("module: make it possible to have unsafe, tainting module params") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Jean Delvare <khali@linux-fr.org> Cc: Li Zhong <zhong@linux.vnet.ibm.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 2d87b30 commit edc41b3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎kernel/params.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ bool parameq(const char *a, const char *b)
111111
static void param_check_unsafe(const struct kernel_param *kp)
112112
{
113113
if (kp->flags & KERNEL_PARAM_FL_UNSAFE) {
114-
pr_warn("Setting dangerous option %s - tainting kernel\n",
115-
kp->name);
114+
pr_notice("Setting dangerous option %s - tainting kernel\n",
115+
kp->name);
116116
add_taint(TAINT_USER, LOCKDEP_STILL_OK);
117117
}
118118
}

0 commit comments

Comments
 (0)