Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH] [CI] kernel: Downgrade warning for unsafe parameters
@ 2018-02-20 17:18 Chris Wilson
  2018-02-20 17:21 ` [Intel-gfx] " Chris Wilson
  2018-02-26 10:42 ` [Intel-gfx] [igt-dev] " Jani Nikula
  0 siblings, 2 replies; 5+ messages in thread
From: Chris Wilson @ 2018-02-20 17:18 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

We make use of unsafe kernel parameters in igt, which generates a
warning and taints the kernel. The warning is unhelpful as we then need
to filter it out again, so kill it at source.

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.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [Intel-gfx] [PATCH] [CI] kernel: Downgrade warning for unsafe parameters
  2018-02-20 17:18 [igt-dev] [PATCH] [CI] kernel: Downgrade warning for unsafe parameters Chris Wilson
@ 2018-02-20 17:21 ` Chris Wilson
  2018-02-26 10:42 ` [Intel-gfx] [igt-dev] " Jani Nikula
  1 sibling, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2018-02-20 17:21 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev, Daniel Vetter

Quoting Chris Wilson (2018-02-20 17:18:42)
> We make use of unsafe kernel parameters in igt, which generates a
> warning and taints the kernel. The warning is unhelpful as we then need
> to filter it out again, so kill it at source.
> 
> Cc: Petri Latvala <petri.latvala@intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>

Longterm goal is that we replace poking the unsafe parameters (indeed we
remove them) by explicit debug mechanisms.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [Intel-gfx] [igt-dev] [PATCH] [CI] kernel: Downgrade warning for unsafe parameters
  2018-02-20 17:18 [igt-dev] [PATCH] [CI] kernel: Downgrade warning for unsafe parameters Chris Wilson
  2018-02-20 17:21 ` [Intel-gfx] " Chris Wilson
@ 2018-02-26 10:42 ` Jani Nikula
  2018-02-26 10:45   ` Chris Wilson
  1 sibling, 1 reply; 5+ messages in thread
From: Jani Nikula @ 2018-02-26 10:42 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: igt-dev

On Tue, 20 Feb 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> We make use of unsafe kernel parameters in igt, which generates a
> warning and taints the kernel. The warning is unhelpful as we then need
> to filter it out again, so kill it at source.

Is your goal to upstream this or what?

BR,
Jani.

>
> 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);
>  	}
>  }

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [igt-dev] [PATCH] [CI] kernel: Downgrade warning for unsafe parameters
  2018-02-26 10:42 ` [Intel-gfx] [igt-dev] " Jani Nikula
@ 2018-02-26 10:45   ` Chris Wilson
  2018-02-26 10:59     ` [Intel-gfx] " Jani Nikula
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2018-02-26 10:45 UTC (permalink / raw)
  To: Jani Nikula, intel-gfx; +Cc: igt-dev

Quoting Jani Nikula (2018-02-26 10:42:40)
> On Tue, 20 Feb 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > We make use of unsafe kernel parameters in igt, which generates a
> > warning and taints the kernel. The warning is unhelpful as we then need
> > to filter it out again, so kill it at source.
> 
> Is your goal to upstream this or what?

First asking if we see merit in this. If so, I can rewrite the commitmsg
to emphasise that this is a direct result of user behaviour and so
emitting a WARN is over the top. However, the counter argument is that
this sets a kernel taint, so shouldn't it warn as well?
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [Intel-gfx] [igt-dev] [PATCH] [CI] kernel: Downgrade warning for unsafe parameters
  2018-02-26 10:45   ` Chris Wilson
@ 2018-02-26 10:59     ` Jani Nikula
  0 siblings, 0 replies; 5+ messages in thread
From: Jani Nikula @ 2018-02-26 10:59 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: igt-dev

On Mon, 26 Feb 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Quoting Jani Nikula (2018-02-26 10:42:40)
>> On Tue, 20 Feb 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote:
>> > We make use of unsafe kernel parameters in igt, which generates a
>> > warning and taints the kernel. The warning is unhelpful as we then need
>> > to filter it out again, so kill it at source.
>> 
>> Is your goal to upstream this or what?
>
> First asking if we see merit in this. If so, I can rewrite the commitmsg
> to emphasise that this is a direct result of user behaviour and so
> emitting a WARN is over the top. However, the counter argument is that
> this sets a kernel taint, so shouldn't it warn as well?

I erred on the side of ensuring the reason for tainting doesn't go
unnoticed when I added that. But I don't think the logging level was
ever discussed, it's just what I thought best at the time. I don't think
I care as long as it stays below debug level.

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

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

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-20 17:18 [igt-dev] [PATCH] [CI] kernel: Downgrade warning for unsafe parameters Chris Wilson
2018-02-20 17:21 ` [Intel-gfx] " Chris Wilson
2018-02-26 10:42 ` [Intel-gfx] [igt-dev] " Jani Nikula
2018-02-26 10:45   ` Chris Wilson
2018-02-26 10:59     ` [Intel-gfx] " Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox