unexpectedly in the <code>write()</code> system call, you
may find the <code>--trace-syscalls=yes
--trace-sched=yes</code> flags useful.
+ <p>
+ <li><code>lax-ioctls</code> Reduce accuracy of ioctl checking.
+ Doesn't require the full buffer to be initialized when
+ writing. Without this, using some device drivers with a
+ large number of strange ioctl commands becomes very
+ tiresome. You can use this as a quick hack to workaround
+ unimplemented ioctls. A better long-term solution is to
+ write a proper wrapper for the ioctl. This is quite easy
+ - for details read
+ <code>README_MISSING_SYSCALL_OR_IOCTL</code> in the
+ source distribution.
</ul>
-
</li><p>
</ul>
echo " --D1=<size>,<assoc>,<line_size> set D1 cache manually"
echo " --L2=<size>,<assoc>,<line_size> set L2 cache manually"
echo " --weird-hacks=hack1,hack2,... [no hacks selected]"
- echo " recognised hacks are: ioctl-VTIME truncate-writes"
+ echo " recognised hacks are: ioctl-VTIME truncate-writes lax-ioctls"
echo ""
echo
echo " options for debugging Valgrind itself are:"
default: {
UInt dir = _IOC_DIR(arg2);
UInt size = _IOC_SIZE(arg2);
- if (/* size == 0 || */ dir == _IOC_NONE) {
+ if (VG_(strstr)(VG_(clo_weird_hacks), "lax-ioctls") != NULL) {
+ /*
+ * Be very lax about ioctl handling; the only
+ * assumption is that the size is correct. Doesn't
+ * require the full buffer to be initialized when
+ * writing. Without this, using some device
+ * drivers with a large number of strange ioctl
+ * commands becomes very tiresome.
+ */
+ }
+ else if (/* size == 0 || */ dir == _IOC_NONE) {
VG_(message)(Vg_UserMsg,
"Warning: noted but unhandled ioctl 0x%x"
" with no size/direction hints",
VG_(message)(Vg_UserMsg,
" See README_MISSING_SYSCALL_OR_IOCTL for guidance on"
" writing a proper wrapper." );
+ VG_(message)(Vg_UserMsg,
+ " Alternatively, suppress using flag: "
+ "--weird-hacks=lax-ioctls");
} else {
if ((dir & _IOC_WRITE) && size > 0)
must_be_readable(tst, "ioctl(generic)", arg3, size);