Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Mar 2010 09:59:34 +0100
From:      Bernhard Froehlich <decke@bluelife.at>
To:        Andriy Gapon <avg@icyb.net.ua>
Cc:        freebsd-hackers@freebsd.org, freebsd-emulation@freebsd.org, vbox@freebsd.org
Subject:   Re: WARNING pid ... (VBoxSVC): ioctl sign-extension ioctl ffffffffc4a81502
Message-ID:  <0195a63b519a4457e2a77db8bf0669a1@bluelife.at>
In-Reply-To: <4BABF4A1.6050205@icyb.net.ua>
References:  <4BABF4A1.6050205@icyb.net.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 26 Mar 2010 01:41:21 +0200, Andriy Gapon <avg@icyb.net.ua> wrote:
> 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.

I've had a talk to Alexander Eichner and they have already fixed that 2
months ago in r25953 on trunk. So VirtualBox 3.2.x will include this fix. 

http://www.virtualbox.org/changeset/25953

-- 
Bernhard Fröhlich
http://www.bluelife.at/



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