WARNING pid ... (VBoxSVC): ioctl sign-extension ioctl ffffffffc4a81502

Andriy Gapon avg at icyb.net.ua
Thu Mar 25 23:41:26 UTC 2010


On VirtualBox startup the following messages are produced in system log:
WARNING pid ... (VBoxSVC): ioctl sign-extension ioctl ffffffffc4a81502

This happens on amd64 platform.

I think the reason for this is in RTFileIoCtl() helper function (in
VBox/Runtime/r3/posix/fileio-posix.cpp).
This function takes iRequest argument as 'int' and then passes it as the second
parameter to ioctl(2).  But on FreeBSD that parameter, request, is expected to
be of type unsigned long.
Thus, a sufficiently large value of a request gets represented as a negative
value in iRequest, which then leads to the warning.

On the other hand, looking at how ioctl(2) is declared in other operating
systems, I am not sure who is right and who is wrong here.
Maybe we should a cast to unsigned int in RTFileIoCtl() for __FreeBSD__ case.
Maybe FreeBSD should just suck it up and remove the noisy warning.

I know too little to suggest a resolution.

P.S. it seems that Mac OS X is in the same boat as FreeBSD, perhaps other BSDs too.

-- 
Andriy Gapon


More information about the freebsd-emulation mailing list