• valgrind (ioctl 0x5395 - CDROM_LAST_WRITTEN)

    From Tim Woodall@21:1/5 to All on Mon Mar 24 23:40:01 2025
    Bit of a wild guess/hope that someone might know what this is. I'm
    getting a strange error from valgrind about an ioctl that I'm definitely
    not calling directly and I've got no idea why it would be trying to do
    anything with a cdrom.

    https://github.com/torvalds/linux/blob/master/include/uapi/linux/cdrom.h

    (This logging about cannot open /etc/fstab is expected, it's running a
    test in a sandbox)

    DUMP: Can't open /etc/fstab for dump table information: No such file or directory
    DUMP: Date of this level 0 dump: Mon Mar 24 21:58:23 2025
    DUMP: Dumping /dev/loop1 (/tmp/tmp.CguPpyLyWD/tmp.MLZ9IgD8cb) to /tmp/tmp.CguPpyLyWD/tmp.1oLCTpg9jr
    ==4710== Warning: noted but unhandled ioctl 0x5395 with no size/direction hints.
    ==4710== This could cause spurious value errors to appear.
    ==4710== See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.

    The only ioctls I'm using are MTIOCPOS, MTIOCGET, BLKFLSBUF, MTIOCTOP

    Otherwise I guess I'm going to have to try to find it in the debugger
    (or just ignore it completely)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Schmitt@21:1/5 to Tim Woodall on Tue Mar 25 00:10:01 2025
    Hi,

    Tim Woodall wrote:
    https://github.com/torvalds/linux/blob/master/include/uapi/linux/cdrom.h [...]
    ==4710== Warning: noted but unhandled ioctl 0x5395 with no size/direction hints.

    ioctl CDROM_LAST_WRITTEN is something which software would call to
    determine the readable size of a storage device with the confirmatation
    that it is an optical drive with a loaded medium.
    (Everything else will probably yield errno 9 "Bad file descriptor".)

    blkid comes to my mind:
    https://codesearch.debian.net/search?q=package%3Autil-linux+CDROM_LAST_WRITTEN


    Have a nice day :)

    Thomas

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tim Woodall@21:1/5 to Thomas Schmitt on Tue Mar 25 08:50:01 2025
    On Tue, 25 Mar 2025, Thomas Schmitt wrote:

    Hi,

    Tim Woodall wrote:
    https://github.com/torvalds/linux/blob/master/include/uapi/linux/cdrom.h
    [...]
    ==4710== Warning: noted but unhandled ioctl 0x5395 with no size/direction
    hints.

    ioctl CDROM_LAST_WRITTEN is something which software would call to
    determine the readable size of a storage device with the confirmatation
    that it is an optical drive with a loaded medium.
    (Everything else will probably yield errno 9 "Bad file descriptor".)

    blkid comes to my mind:
    https://codesearch.debian.net/search?q=package%3Autil-linux+CDROM_LAST_WRITTEN


    That will be it. Thanks!

    Calling:
    blkid_get_devname
    blkid_get_tag_value

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)