* ioctl32: Unknown cmd
@ 2007-10-16 14:45 Geert Uytterhoeven
2007-10-16 16:58 ` Jens Axboe
2007-10-16 19:50 ` Arnd Bergmann
0 siblings, 2 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2007-10-16 14:45 UTC (permalink / raw)
To: Arnd Bergmann, Jens Axboe; +Cc: Linux/PPC Development, Linux Kernel Development
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1182 bytes --]
Hi Arnd, Jens,
The recent (post 2.6.23) changes to compat_ioctl made the reporting of
unsupported ioctls more verbose. E.g. on the PS3 I get:
| ioctl32(cdrom_id:608): Unknown cmd fd(3) cmd(00005331){t:'S';sz:0} arg(00000000) on /dev/.tmp-11-0
| ioctl32(hdparm:1427): Unknown cmd fd(3) cmd(0000031f){t:03;sz:0} arg(00000000) on /dev/ps3da
| ioctl32(hdparm:1427): Unknown cmd fd(3) cmd(0000031f){t:03;sz:0} arg(00000000) on /dev/ps3da
The first one is triggered by the detection of the CD/DVD/BD-ROM driver,
The others are triggered by me running hdparm.
Was this intentional?
With kind regards,
Geert Uytterhoeven
Software Architect
Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/
Sony Network and Software Technology Center Europe
A division of Sony Service Centre (Europe) N.V.
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium
VAT BE 0413.825.160 · RPR Brussels
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ioctl32: Unknown cmd
2007-10-16 14:45 ioctl32: Unknown cmd Geert Uytterhoeven
@ 2007-10-16 16:58 ` Jens Axboe
2007-10-16 19:50 ` Arnd Bergmann
1 sibling, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2007-10-16 16:58 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Linux/PPC Development, Linux Kernel Development, Arnd Bergmann
On Tue, Oct 16 2007, Geert Uytterhoeven wrote:
> Hi Arnd, Jens,
>
> The recent (post 2.6.23) changes to compat_ioctl made the reporting of
> unsupported ioctls more verbose. E.g. on the PS3 I get:
>
> | ioctl32(cdrom_id:608): Unknown cmd fd(3) cmd(00005331){t:'S';sz:0} arg(00000000) on /dev/.tmp-11-0
> | ioctl32(hdparm:1427): Unknown cmd fd(3) cmd(0000031f){t:03;sz:0} arg(00000000) on /dev/ps3da
> | ioctl32(hdparm:1427): Unknown cmd fd(3) cmd(0000031f){t:03;sz:0} arg(00000000) on /dev/ps3da
>
> The first one is triggered by the detection of the CD/DVD/BD-ROM driver,
> The others are triggered by me running hdparm.
>
> Was this intentional?
Nope, not intential to me at least. I'll check up on it.
--
Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ioctl32: Unknown cmd
2007-10-16 14:45 ioctl32: Unknown cmd Geert Uytterhoeven
2007-10-16 16:58 ` Jens Axboe
@ 2007-10-16 19:50 ` Arnd Bergmann
2007-10-16 22:24 ` David Miller
2007-10-17 6:38 ` Geert Uytterhoeven
1 sibling, 2 replies; 6+ messages in thread
From: Arnd Bergmann @ 2007-10-16 19:50 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Linux/PPC Development, Linux Kernel Development, Jens Axboe
On Tuesday 16 October 2007, Geert Uytterhoeven wrote:
> The recent (post 2.6.23) changes to compat_ioctl made the reporting of
> unsupported ioctls more verbose. E.g. on the PS3 I get:
>
> | ioctl32(cdrom_id:608): Unknown cmd fd(3) cmd(00005331){t:'S';sz:0} arg(00000000) on /dev/.tmp-11-0
> | ioctl32(hdparm:1427): Unknown cmd fd(3) cmd(0000031f){t:03;sz:0} arg(00000000) on /dev/ps3da
> | ioctl32(hdparm:1427): Unknown cmd fd(3) cmd(0000031f){t:03;sz:0} arg(00000000) on /dev/ps3da
>
> The first one is triggered by the detection of the CD/DVD/BD-ROM driver,
> The others are triggered by me running hdparm.
>
> Was this intentional?
>
No, it was certainly not intentional, and I can't figure out why it happens.
The ioctl numbers from your example are HDIO_DRIVE_CMD and CDROM_GET_CAPABILITY,
both of which should be handled through compat_blkdev_driver_ioctl by calling
the native ioctl method of the driver, and return -ENOTTY otherwise.
The one point where it is expected to have changed now is when you try
to do these ioctls on something that is not a block device. Are you sure that
the files you tried them on were created correctly?
Arnd <><
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ioctl32: Unknown cmd
2007-10-16 19:50 ` Arnd Bergmann
@ 2007-10-16 22:24 ` David Miller
2007-10-17 0:25 ` Andi Kleen
2007-10-17 6:38 ` Geert Uytterhoeven
1 sibling, 1 reply; 6+ messages in thread
From: David Miller @ 2007-10-16 22:24 UTC (permalink / raw)
To: arnd; +Cc: Geert.Uytterhoeven, linuxppc-dev, linux-kernel, jens.axboe
From: Arnd Bergmann <arnd@arndb.de>
Date: Tue, 16 Oct 2007 21:50:35 +0200
> The one point where it is expected to have changed now is when you
> try to do these ioctls on something that is not a block device. Are
> you sure that the files you tried them on were created correctly?
Many many many programs do this exact sort of thing.
It is one of the bad aspects of moving the compat handling
down into the file ops for a specific device.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ioctl32: Unknown cmd
2007-10-16 22:24 ` David Miller
@ 2007-10-17 0:25 ` Andi Kleen
0 siblings, 0 replies; 6+ messages in thread
From: Andi Kleen @ 2007-10-17 0:25 UTC (permalink / raw)
To: David Miller
Cc: Geert.Uytterhoeven, linuxppc-dev, linux-kernel, arnd, jens.axboe
David Miller <davem@davemloft.net> writes:
> From: Arnd Bergmann <arnd@arndb.de>
> Date: Tue, 16 Oct 2007 21:50:35 +0200
>
> > The one point where it is expected to have changed now is when you
> > try to do these ioctls on something that is not a block device. Are
> > you sure that the files you tried them on were created correctly?
>
> Many many many programs do this exact sort of thing.
>
> It is one of the bad aspects of moving the compat handling
> down into the file ops for a specific device.
When this happens one should add respective IGNORE_IOCTL()s to
compat_ioctl.c
-Andi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ioctl32: Unknown cmd
2007-10-16 19:50 ` Arnd Bergmann
2007-10-16 22:24 ` David Miller
@ 2007-10-17 6:38 ` Geert Uytterhoeven
1 sibling, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2007-10-17 6:38 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Linux/PPC Development, Linux Kernel Development, Jens Axboe
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1875 bytes --]
On Tue, 16 Oct 2007, Arnd Bergmann wrote:
> On Tuesday 16 October 2007, Geert Uytterhoeven wrote:
> > The recent (post 2.6.23) changes to compat_ioctl made the reporting of
> > unsupported ioctls more verbose. E.g. on the PS3 I get:
> >
> > | ioctl32(cdrom_id:608): Unknown cmd fd(3) cmd(00005331){t:'S';sz:0} arg(00000000) on /dev/.tmp-11-0
> > | ioctl32(hdparm:1427): Unknown cmd fd(3) cmd(0000031f){t:03;sz:0} arg(00000000) on /dev/ps3da
> > | ioctl32(hdparm:1427): Unknown cmd fd(3) cmd(0000031f){t:03;sz:0} arg(00000000) on /dev/ps3da
> >
> > The first one is triggered by the detection of the CD/DVD/BD-ROM driver,
> > The others are triggered by me running hdparm.
> >
> > Was this intentional?
>
> No, it was certainly not intentional, and I can't figure out why it happens.
> The ioctl numbers from your example are HDIO_DRIVE_CMD and CDROM_GET_CAPABILITY,
> both of which should be handled through compat_blkdev_driver_ioctl by calling
> the native ioctl method of the driver, and return -ENOTTY otherwise.
>
> The one point where it is expected to have changed now is when you try
> to do these ioctls on something that is not a block device. Are you sure that
> the files you tried them on were created correctly?
/dev/ps3da is definitely a block device.
With kind regards,
Geert Uytterhoeven
Software Architect
Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/
Sony Network and Software Technology Center Europe
A division of Sony Service Centre (Europe) N.V.
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium
VAT BE 0413.825.160 · RPR Brussels
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-10-17 6:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-16 14:45 ioctl32: Unknown cmd Geert Uytterhoeven
2007-10-16 16:58 ` Jens Axboe
2007-10-16 19:50 ` Arnd Bergmann
2007-10-16 22:24 ` David Miller
2007-10-17 0:25 ` Andi Kleen
2007-10-17 6:38 ` Geert Uytterhoeven
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).