https://bugs.kde.org/show_bug.cgi?id=449309
Bug ID: 449309 Summary: Missing loopback device ioctl(s) Product: valgrind Version: 3.19 GIT Platform: Ubuntu Packages OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: memcheck Assignee: jsew...@acm.org Reporter: faheem.she...@bmw.de Target Milestone: --- Created attachment 146027 --> https://bugs.kde.org/attachment.cgi?id=146027&action=edit Patch to add missing loop ioctls SUMMARY A Linux program using loopback device interface, when instrumented with valgrind, reports missing IOCTLS and routes the user to https://valgrind.org/docs/manual/dist.readme-missing.html. This bug-report is meant to bring the missing functionality into valgrind developers knowledge and to supply a supporting patch. STEPS TO REPRODUCE 1. Sample C program with steps to build and run is available at: https://gist.github.com/fsheikh/cd184450338f750af9e1a79f40b78419 2. Build above program with a C compiler e.g. "clang-10 -Wall -Werror loop_ioctls.c -o loop_ioctl" 3. Running the program with valgrind " valgrind ./loop_ioctl" OBSERVED RESULT ==28554== Memcheck, a memory error detector ==28554== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==28554== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info ==28554== Command: ./loop_ioctl ==28554== Valgrind loopback test starting... ==28554== Warning: noted but unhandled ioctl 0x4c82 with no size/direction hints. ==28554== This could cause spurious value errors to appear. ==28554== See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper. Free loopback device /dev/loop32 found ==28554== Warning: noted but unhandled ioctl 0x4c01 with no size/direction hints. ==28554== This could cause spurious value errors to appear. ==28554== See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper. ==28554== Warning: noted but unhandled ioctl 0x4c09 with no size/direction hints. ==28554== This could cause spurious value errors to appear. ==28554== See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper. ==28554== Warning: noted but unhandled ioctl 0x4c05 with no size/direction hints. ==28554== This could cause spurious value errors to appear. ==28554== See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper. Valgrind loopback test done! ==28554== ==28554== HEAP SUMMARY: ==28554== in use at exit: 0 bytes in 0 blocks ==28554== total heap usage: 1 allocs, 1 frees, 1,024 bytes allocated ==28554== ==28554== All heap blocks were freed -- no leaks are possible ==28554== ==28554== For counts of detected and suppressed errors, rerun with: -v ==28554== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) EXPECTED RESULT valgrind does not generates warnings and memcheck tools is able to process a program containing loopback IOCTL(s) SOFTWARE/OS VERSIONS Ubuntu Linux (5.4.0-96-generic) ADDITIONAL INFORMATION Please see attachment for a proposed fix. Please do let me know if the patch needs to be sent to a mailing-list for review/approval or if it should be pushed to a public repository. Thanks! -- You are receiving this mail because: You are watching all bug changes.