public inbox for kernel-janitors@vger.kernel.org
 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>
---
 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@vger.kernel.org, linux-kernel@vger.kernel.org

PiANCj4gRnJvbTogQ29saW4gSWFuIEtpbmcgPGNvbGluLmtpbmdAY2Fub25pY2FsLmNvbT4NCj4g
DQo+IEN1cnJlbnRseSB0aGUgZHJp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NjQ0
YWViIDEwMDY0NA0KPiAtLS0gYS9kcml2ZXJzL21pc2MvbWVpL21haW4uYw0KPiArKysgYi9kcml2
ZXJzL21pc2MvbWVpL21haW4uYw0KPiBAQCAtNTA3LDcgKzUwNyw2IEBAIHN0YXRpYyBsb25nIG1l
aV9pb2N0bChzdHJ1Y3QgZmlsZSAqZmlsZSwgdW5zaWduZWQgaW50DQo+IGNtZCwgdW5zaWduZWQg
bG9uZyBkYXRhKQ0KPiAgCQlicmVhazsNCj4gDQo+ICAJZGVmYXVsdDoNCj4gLQkJZGV2X2Vycihk
ZXYtPmRldiwgIjogdW5zdXBwb3J0ZWQgaW9jdGwgJWQuXG4iLCBjbWQpOw0KPiAgCQlyZXRzID0g
LUVOT0lPQ1RMQ01EOw0KPiAgCX0NCj4gDQo+IC0tDQo+IDIuMTUuMQ0KDQo

^ 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@vger.kernel.org, linux-kernel@vger.kernel.org

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@vger.kernel.org,
	linux-kernel@vger.kernel.org

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@vger.kernel.org,
	linux-kernel@vger.kernel.org

> 
> 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@vger.kernel.org, linux-kernel@vger.kernel.org

DQo+IE9uIDI3LzAyLzE4IDE3OjI2LCBXaW5rbGVyLCBUb21hcyB3cm90ZToNCj4gPj4NCj4gPj4g
RnJvbTogQ29saW4gSWFuIEtpbmcgPGNvbGluLmtpbmdAY2Fub25pY2FsLmNvbT4NCj4gPj4NCj4g
Pj4gQ3VycmVudGx5IH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

* 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@vger.kernel.org,
	linux-kernel@vger.kernel.org

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@vger.kernel.org,
	linux-kernel@vger.kernel.org

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