Bug 352767 - Wine/valgrind: Warning: noted but unhandled ioctl 0x5307 with no size/direction hints. (CDROMSTOP)
Summary: Wine/valgrind: Warning: noted but unhandled ioctl 0x5307 with no size/directi...
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.10 SVN
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-15 19:50 UTC by Austin English
Modified: 2016-11-23 13:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
patch1 (4.36 KB, patch)
2016-11-01 05:57 UTC, Austin English
Details
patch2 (1.73 KB, patch)
2016-11-01 05:57 UTC, Austin English
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Austin English 2015-09-15 19:50:50 UTC
Noticed while running dlls/winmm/tests/mcicda.c:

Note this also exposes a valgrind bug:
==21071== Warning: noted but unhandled ioctl 0x5307 with no size/direction hints.
==21071==    This could cause spurious value errors to appear.
==21071==    See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.

defined as CDROMSTOP in /usrsrc/linux-headers-3.2.0-4-common/include/linux/cdrom.h
#define CDROMSTOP		0x5307 /* Stop the cdrom drive */

Since this is the second CD/DVD ioctl bug (see bug 348616), I'm going to go ahead and paste the other IOCTLs from that file, for reference:
austin@debian-laptop:/usr$ grep define src/linux-headers-3.2.0-4-common/include/linux/cdrom.h | grep 0x5
#define CDROMPAUSE		0x5301 /* Pause Audio Operation */ 
#define CDROMRESUME		0x5302 /* Resume paused Audio Operation */
#define CDROMPLAYMSF		0x5303 /* Play Audio MSF (struct cdrom_msf) */
#define CDROMPLAYTRKIND		0x5304 /* Play Audio Track/index 
#define CDROMREADTOCHDR		0x5305 /* Read TOC header 
#define CDROMREADTOCENTRY	0x5306 /* Read TOC entry 
#define CDROMSTOP		0x5307 /* Stop the cdrom drive */
#define CDROMSTART		0x5308 /* Start the cdrom drive */
#define CDROMEJECT		0x5309 /* Ejects the cdrom media */
#define CDROMVOLCTRL		0x530a /* Control output volume 
#define CDROMSUBCHNL		0x530b /* Read subchannel data 
#define CDROMREADMODE2		0x530c /* Read CDROM mode 2 data (2336 Bytes) 
#define CDROMREADMODE1		0x530d /* Read CDROM mode 1 data (2048 Bytes)
#define CDROMREADAUDIO		0x530e /* (struct cdrom_read_audio) */
#define CDROMEJECT_SW		0x530f /* enable(1)/disable(0) auto-ejecting */
#define CDROMMULTISESSION	0x5310 /* Obtain the start-of-last-session 
#define CDROM_GET_MCN		0x5311 /* Obtain the "Universal Product Code" 
#define CDROMRESET		0x5312 /* hard-reset the drive */
#define CDROMVOLREAD		0x5313 /* Get the drive's volume setting 
#define CDROMREADRAW		0x5314	/* read data in raw mode (2352 Bytes)
#define CDROMREADCOOKED		0x5315	/* read data in cooked mode */
#define CDROMSEEK		0x5316  /* seek msf address */
#define CDROMPLAYBLK		0x5317	/* (struct cdrom_blk) */
#define CDROMREADALL		0x5318	/* read all 2646 bytes */
#define CDROMGETSPINDOWN        0x531d
#define CDROMSETSPINDOWN        0x531e
#define CDROMCLOSETRAY		0x5319	/* pendant of CDROMEJECT */
#define CDROM_SET_OPTIONS	0x5320  /* Set behavior options */
#define CDROM_CLEAR_OPTIONS	0x5321  /* Clear behavior options */
#define CDROM_SELECT_SPEED	0x5322  /* Set the CD-ROM speed */
#define CDROM_SELECT_DISC	0x5323  /* Select disc (for juke-boxes) */
#define CDROM_MEDIA_CHANGED	0x5325  /* Check is media changed  */
#define CDROM_DRIVE_STATUS	0x5326  /* Get tray position, etc. */
#define CDROM_DISC_STATUS	0x5327  /* Get disc type, etc. */
#define CDROM_CHANGER_NSLOTS    0x5328  /* Get number of slots */
#define CDROM_LOCKDOOR		0x5329  /* lock or unlock door */
#define CDROM_DEBUG		0x5330	/* Turn debug messages on/off */
#define CDROM_GET_CAPABILITY	0x5331	/* get capabilities */
#define CDROMAUDIOBUFSIZ        0x5382	/* set the audio buffer size */
#define DVD_READ_STRUCT		0x5390  /* Read structure */
#define DVD_WRITE_STRUCT	0x5391  /* Write structure */
#define DVD_AUTH		0x5392  /* Authentication */
#define CDROM_SEND_PACKET	0x5393	/* send a packet to the drive */
#define CDROM_NEXT_WRITABLE	0x5394	/* get next writable block */
#define CDROM_LAST_WRITTEN	0x5395	/* get last block written on disc */

Reproducible: Always
Comment 1 Julian Seward 2016-09-13 16:32:56 UTC
Austin, do you have a patch for this?  Or for bug 348616 ?
Comment 2 Austin English 2016-09-14 06:06:33 UTC
(In reply to Julian Seward from comment #1)
> Austin, do you have a patch for this?  Or for bug 348616 ?

Not currently, but I took a quick look. There are several more syscalls that wine uses in the source that are bsd/osx specific, but I can't easily test. Should I stub those / put fixme's, or just fix linux/generic? Or only fix the two that currently have bugs?
Comment 3 Julian Seward 2016-10-19 11:43:04 UTC
(In reply to austinenglish@gmail.com from comment #2)
> Not currently, but I took a quick look. There are several more syscalls that
> wine uses in the source that are bsd/osx specific, but I can't easily test.
> Should I stub those / put fixme's, or just fix linux/generic? Or only fix
> the two that currently have bugs?

Sorry for slow response.  I'd suggest you only fix the cases you can
actually test, since I prefer not to have unverified code in the tree.
Comment 4 Austin English 2016-11-01 05:57:03 UTC
Created attachment 101937 [details]
patch1

This adds missing ioctl defines to cdrom ioctls
Comment 5 Austin English 2016-11-01 05:57:42 UTC
Created attachment 101938 [details]
patch2
Comment 6 Julian Seward 2016-11-23 13:17:18 UTC
(In reply to Austin English from comment #5)
> Created attachment 101938 [details]
> patch2

Committed, r16152.  Thanks for the patch.