Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Mar 2010 01:41:21 +0200
From:      Andriy Gapon <avg@icyb.net.ua>
To:        freebsd-emulation@freebsd.org, vbox@freebsd.org, freebsd-hackers@freebsd.org
Subject:   WARNING pid ... (VBoxSVC): ioctl sign-extension ioctl ffffffffc4a81502
Message-ID:  <4BABF4A1.6050205@icyb.net.ua>

next in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BABF4A1.6050205>