| Summary: | support on README_MISSING_SYSCALL_OR_IOCTL for an automatic method? | ||
|---|---|---|---|
| Product: | [Developer tools] valgrind | Reporter: | Fred M <dark_footix> |
| Component: | general | Assignee: | Julian Seward <jseward> |
| Status: | REPORTED --- | ||
| Severity: | normal | CC: | pjfloyd |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Other | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Fred M
2024-06-19 08:21:25 UTC
I wish that this could be automated! The first thing that you can do is use the lax ioctl simhint (--sim-hints=lax-ioctls). If you do that then Valgrind won't complain at all about unhandled ioctls. The second thing that you can do is to make sure that your ioctl has size and direction (or no direction and a size of 0). You can do that using the _IOR _IOW and _IORW macros in asm-generic/ioctl.h. That only covers the call to the ioctl. Then there is the state of the memory that the ioctl refers to. The ioctl encoding gives only a basic indication of what kinds of memory accesses to expect. Often there will be mutilple levels of indirection, numerous subcodes etc. Without all the details Memcheck won't know which memory ranges become initialized by ioctls that write to user memory. That could result in false positive "Conditional jump or move" errors. |