From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 26 09:18:59 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49BD41065670 for ; Fri, 26 Mar 2010 09:18:59 +0000 (UTC) (envelope-from decke@bluelife.at) Received: from mail.itac.at (mail.itac.at [91.205.172.9]) by mx1.freebsd.org (Postfix) with ESMTP id E04FC8FC21 for ; Fri, 26 Mar 2010 09:18:58 +0000 (UTC) Received: from [91.205.172.21] (helo=webmail.bluelife.at) by mail.itac.at with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Nv5O9-0004ws-FP; Fri, 26 Mar 2010 09:59:33 +0100 MIME-Version: 1.0 Date: Fri, 26 Mar 2010 09:59:34 +0100 From: Bernhard Froehlich To: Andriy Gapon In-Reply-To: <4BABF4A1.6050205@icyb.net.ua> References: <4BABF4A1.6050205@icyb.net.ua> Message-ID: <0195a63b519a4457e2a77db8bf0669a1@bluelife.at> X-Sender: decke@bluelife.at User-Agent: RoundCube Webmail/0.3.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 2.3 (++) X-Spam-Report: Spam detection software, running on the system "mail.itac.at", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Fri, 26 Mar 2010 01:41:21 +0200, Andriy Gapon 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. [...] Content analysis details: (2.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.4 ALL_TRUSTED Passed through trusted hosts only via SMTP 3.4 FH_DATE_PAST_20XX The date is grossly in the future. 2.4 DNS_FROM_OPENWHOIS RBL: Envelope sender listed in bl.open-whois.org. -2.0 AWL AWL: From: address is in the auto white-list Cc: freebsd-hackers@freebsd.org, freebsd-emulation@freebsd.org, vbox@freebsd.org Subject: Re: WARNING pid ... (VBoxSVC): ioctl sign-extension ioctl ffffffffc4a81502 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Mar 2010 09:18:59 -0000 On Fri, 26 Mar 2010 01:41:21 +0200, Andriy Gapon 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/