linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mei: remove dev_err message on an unsupported ioctl
@ 2018-02-27 16:21 Colin King
  2018-02-27 17:26 ` Winkler, Tomas
  0 siblings, 1 reply; 8+ messages in thread
From: Colin King @ 2018-02-27 16:21 UTC (permalink / raw)
  To: Tomas Winkler, Arnd Bergmann, Greg Kroah-Hartman
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Currently the driver spams the kernel log on unsupported ioctls which is
unnecessary as the ioctl returns -ENOIOCTLCMD to indicate this anyway.
I suspect this was originally for debugging purposes but it really is not
required so remove it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Cc: stable <stable@vger.kernel.org>
---
 drivers/misc/mei/main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c
index 758dc73602d5..7bb013644aeb 100644
--- a/drivers/misc/mei/main.c
+++ b/drivers/misc/mei/main.c
@@ -507,7 +507,6 @@ static long mei_ioctl(struct file *file, unsigned int cmd, unsigned long data)
 		break;
 
 	default:
-		dev_err(dev->dev, ": unsupported ioctl %d.\n", cmd);
 		rets = -ENOIOCTLCMD;
 	}
 
-- 
2.15.1

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

* RE: [PATCH] mei: remove dev_err message on an unsupported ioctl
  2018-02-27 16:21 [PATCH] mei: remove dev_err message on an unsupported ioctl Colin King
@ 2018-02-27 17:26 ` Winkler, Tomas
  2018-02-27 17:31   ` Colin Ian King
  2018-02-27 18:10   ` Greg Kroah-Hartman
  0 siblings, 2 replies; 8+ messages in thread
From: Winkler, Tomas @ 2018-02-27 17:26 UTC (permalink / raw)
  To: Colin King, Arnd Bergmann, Greg Kroah-Hartman
  Cc: kernel-janitors, linux-kernel

> 
> From: Colin Ian King <colin.king@canonical.com>
> 
> Currently the driver spams the kernel log on unsupported ioctls which is
> unnecessary as the ioctl returns -ENOIOCTLCMD to indicate this anyway.
> I suspect this was originally for debugging purposes but it really is not
> required so remove it.
>

This is rather strange as most of the legimit applications are using one IOCTL from kernel 3.0
Do you have any reference where this call is originated from, frankly this is the first time I got such complain.

In any case it would be maybe better to change it a warn once call.
 
Thanks
Tomas

> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/misc/mei/main.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index
> 758dc73602d5..7bb013644aeb 100644
> --- a/drivers/misc/mei/main.c
> +++ b/drivers/misc/mei/main.c
> @@ -507,7 +507,6 @@ static long mei_ioctl(struct file *file, unsigned int
> cmd, unsigned long data)
>  		break;
> 
>  	default:
> -		dev_err(dev->dev, ": unsupported ioctl %d.\n", cmd);
>  		rets = -ENOIOCTLCMD;
>  	}
> 
> --
> 2.15.1


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

* Re: [PATCH] mei: remove dev_err message on an unsupported ioctl
  2018-02-27 17:26 ` Winkler, Tomas
@ 2018-02-27 17:31   ` Colin Ian King
  2018-02-27 21:47     ` Winkler, Tomas
  2018-02-27 18:10   ` Greg Kroah-Hartman
  1 sibling, 1 reply; 8+ messages in thread
From: Colin Ian King @ 2018-02-27 17:31 UTC (permalink / raw)
  To: Winkler, Tomas, Arnd Bergmann, Greg Kroah-Hartman
  Cc: kernel-janitors, linux-kernel

On 27/02/18 17:26, Winkler, Tomas wrote:
>>
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> Currently the driver spams the kernel log on unsupported ioctls which is
>> unnecessary as the ioctl returns -ENOIOCTLCMD to indicate this anyway.
>> I suspect this was originally for debugging purposes but it really is not
>> required so remove it.
>>
> 
> This is rather strange as most of the legimit applications are using one IOCTL from kernel 3.0
> Do you have any reference where this call is originated from, frankly this is the first time I got such complain.

I hit this while stressing the kernel with my stress-ng kernel stressing
tool; this was not using the legitimate ioctls (to see if things
explode) and I got a rather full kernel log. So it was being abused
somewhat ;-)

> 
> In any case it would be maybe better to change it a warn once call.

Probably so, I can fix that up if that is preferred.

Colin

>  
> Thanks
> Tomas
> 
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>> ---
>>  drivers/misc/mei/main.c | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index
>> 758dc73602d5..7bb013644aeb 100644
>> --- a/drivers/misc/mei/main.c
>> +++ b/drivers/misc/mei/main.c
>> @@ -507,7 +507,6 @@ static long mei_ioctl(struct file *file, unsigned int
>> cmd, unsigned long data)
>>  		break;
>>
>>  	default:
>> -		dev_err(dev->dev, ": unsupported ioctl %d.\n", cmd);
>>  		rets = -ENOIOCTLCMD;
>>  	}
>>
>> --
>> 2.15.1
> 

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

* Re: [PATCH] mei: remove dev_err message on an unsupported ioctl
  2018-02-27 17:26 ` Winkler, Tomas
  2018-02-27 17:31   ` Colin Ian King
@ 2018-02-27 18:10   ` Greg Kroah-Hartman
  2018-02-27 21:44     ` Winkler, Tomas
  1 sibling, 1 reply; 8+ messages in thread
From: Greg Kroah-Hartman @ 2018-02-27 18:10 UTC (permalink / raw)
  To: Winkler, Tomas; +Cc: Colin King, Arnd Bergmann, kernel-janitors, linux-kernel

On Tue, Feb 27, 2018 at 05:26:22PM +0000, Winkler, Tomas wrote:
> > 
> > From: Colin Ian King <colin.king@canonical.com>
> > 
> > Currently the driver spams the kernel log on unsupported ioctls which is
> > unnecessary as the ioctl returns -ENOIOCTLCMD to indicate this anyway.
> > I suspect this was originally for debugging purposes but it really is not
> > required so remove it.
> >
> 
> This is rather strange as most of the legimit applications are using one IOCTL from kernel 3.0
> Do you have any reference where this call is originated from, frankly this is the first time I got such complain.
> 
> In any case it would be maybe better to change it a warn once call.

Just drop the message, it should not be this easy for userspace to spam
the kernel log.  The patch looks fine to me.

thanks,

greg k-h

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

* RE: [PATCH] mei: remove dev_err message on an unsupported ioctl
  2018-02-27 18:10   ` Greg Kroah-Hartman
@ 2018-02-27 21:44     ` Winkler, Tomas
  2018-02-28  9:49       ` Greg Kroah-Hartman
  0 siblings, 1 reply; 8+ messages in thread
From: Winkler, Tomas @ 2018-02-27 21:44 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Colin King, Arnd Bergmann, kernel-janitors, linux-kernel

> 
> On Tue, Feb 27, 2018 at 05:26:22PM +0000, Winkler, Tomas wrote:
> > >
> > > From: Colin Ian King <colin.king@canonical.com>
> > >
> > > Currently the driver spams the kernel log on unsupported ioctls
> > > which is unnecessary as the ioctl returns -ENOIOCTLCMD to indicate this
> anyway.
> > > I suspect this was originally for debugging purposes but it really
> > > is not required so remove it.
> > >
> >
> > This is rather strange as most of the legimit applications are using
> > one IOCTL from kernel 3.0 Do you have any reference where this call is
> originated from, frankly this is the first time I got such complain.
> >
> > In any case it would be maybe better to change it a warn once call.
> 
> Just drop the message, it should not be this easy for userspace to spam the
> kernel log.  The patch looks fine to me.
> 
Fair enough, add my ack too.

Still I'm curious if this comes from the field.

Thanks
Tomas

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

* RE: [PATCH] mei: remove dev_err message on an unsupported ioctl
  2018-02-27 17:31   ` Colin Ian King
@ 2018-02-27 21:47     ` Winkler, Tomas
  0 siblings, 0 replies; 8+ messages in thread
From: Winkler, Tomas @ 2018-02-27 21:47 UTC (permalink / raw)
  To: Colin Ian King, Arnd Bergmann, Greg Kroah-Hartman
  Cc: kernel-janitors, linux-kernel


> On 27/02/18 17:26, Winkler, Tomas wrote:
> >>
> >> From: Colin Ian King <colin.king@canonical.com>
> >>
> >> Currently the driver spams the kernel log on unsupported ioctls which
> >> is unnecessary as the ioctl returns -ENOIOCTLCMD to indicate this
> anyway.
> >> I suspect this was originally for debugging purposes but it really is
> >> not required so remove it.
> >>
> >
> > This is rather strange as most of the legimit applications are using
> > one IOCTL from kernel 3.0 Do you have any reference where this call is
> originated from, frankly this is the first time I got such complain.
> 
> I hit this while stressing the kernel with my stress-ng kernel stressing tool;
> this was not using the legitimate ioctls (to see if things
> explode) and I got a rather full kernel log. So it was being abused somewhat
> ;-)

Okay, thanks for the info.


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

* Re: [PATCH] mei: remove dev_err message on an unsupported ioctl
  2018-02-27 21:44     ` Winkler, Tomas
@ 2018-02-28  9:49       ` Greg Kroah-Hartman
  2018-02-28  9:52         ` Winkler, Tomas
  0 siblings, 1 reply; 8+ messages in thread
From: Greg Kroah-Hartman @ 2018-02-28  9:49 UTC (permalink / raw)
  To: Winkler, Tomas; +Cc: Colin King, Arnd Bergmann, kernel-janitors, linux-kernel

On Tue, Feb 27, 2018 at 09:44:41PM +0000, Winkler, Tomas wrote:
> > 
> > On Tue, Feb 27, 2018 at 05:26:22PM +0000, Winkler, Tomas wrote:
> > > >
> > > > From: Colin Ian King <colin.king@canonical.com>
> > > >
> > > > Currently the driver spams the kernel log on unsupported ioctls
> > > > which is unnecessary as the ioctl returns -ENOIOCTLCMD to indicate this
> > anyway.
> > > > I suspect this was originally for debugging purposes but it really
> > > > is not required so remove it.
> > > >
> > >
> > > This is rather strange as most of the legimit applications are using
> > > one IOCTL from kernel 3.0 Do you have any reference where this call is
> > originated from, frankly this is the first time I got such complain.
> > >
> > > In any case it would be maybe better to change it a warn once call.
> > 
> > Just drop the message, it should not be this easy for userspace to spam the
> > kernel log.  The patch looks fine to me.
> > 
> Fair enough, add my ack too.
> 
> Still I'm curious if this comes from the field.

fuzzers are "in the field" :)

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

* RE: [PATCH] mei: remove dev_err message on an unsupported ioctl
  2018-02-28  9:49       ` Greg Kroah-Hartman
@ 2018-02-28  9:52         ` Winkler, Tomas
  0 siblings, 0 replies; 8+ messages in thread
From: Winkler, Tomas @ 2018-02-28  9:52 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Colin King, Arnd Bergmann, kernel-janitors, linux-kernel

> 
> On Tue, Feb 27, 2018 at 09:44:41PM +0000, Winkler, Tomas wrote:
> > >
> > > On Tue, Feb 27, 2018 at 05:26:22PM +0000, Winkler, Tomas wrote:
> > > > >
> > > > > From: Colin Ian King <colin.king@canonical.com>
> > > > >
> > > > > Currently the driver spams the kernel log on unsupported ioctls
> > > > > which is unnecessary as the ioctl returns -ENOIOCTLCMD to
> > > > > indicate this
> > > anyway.
> > > > > I suspect this was originally for debugging purposes but it
> > > > > really is not required so remove it.
> > > > >
> > > >
> > > > This is rather strange as most of the legimit applications are
> > > > using one IOCTL from kernel 3.0 Do you have any reference where
> > > > this call is
> > > originated from, frankly this is the first time I got such complain.
> > > >
> > > > In any case it would be maybe better to change it a warn once call.
> > >
> > > Just drop the message, it should not be this easy for userspace to
> > > spam the kernel log.  The patch looks fine to me.
> > >
> > Fair enough, add my ack too.
> >
> > Still I'm curious if this comes from the field.
> 
> fuzzers are "in the field" :)

It's definitely fuzzers season.

Tomas

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

end of thread, other threads:[~2018-02-28  9:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-27 16:21 [PATCH] mei: remove dev_err message on an unsupported ioctl Colin King
2018-02-27 17:26 ` Winkler, Tomas
2018-02-27 17:31   ` Colin Ian King
2018-02-27 21:47     ` Winkler, Tomas
2018-02-27 18:10   ` Greg Kroah-Hartman
2018-02-27 21:44     ` Winkler, Tomas
2018-02-28  9:49       ` Greg Kroah-Hartman
2018-02-28  9:52         ` Winkler, Tomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).