From owner-freebsd-stable@FreeBSD.ORG Wed Jun 23 19:01:47 2010 Return-Path: Delivered-To: freebsd-stable@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 7292B106566C; Wed, 23 Jun 2010 19:01:46 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-stable@FreeBSD.org, d@delphij.net Date: Wed, 23 Jun 2010 15:01:37 -0400 User-Agent: KMail/1.6.2 References: <20100623025855.82916.qmail@exxodus.fedaykin.here> <201006231437.38694.jkim@FreeBSD.org> <4C225572.8020602@delphij.net> In-Reply-To: <4C225572.8020602@delphij.net> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201006231501.38985.jkim@FreeBSD.org> Cc: Mario Sergio Fujikawa Ferreira Subject: Re: FreeBSD 8.1-PRERELEASE: WARNING ioctl sign-extension ioctl ffffffff8004667e X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jun 2010 19:01:47 -0000 On Wednesday 23 June 2010 02:41 pm, Xin LI wrote: > On 2010/06/23 11:37, Jung-uk Kim wrote: > > On Wednesday 23 June 2010 02:12 pm, Xin LI wrote: > >> Hi, > >> > >> On 2010/06/22 19:58, Mario Sergio Fujikawa Ferreira wrote: > >>> Hi, > >>> > >>> I am getting more than 4 thousand of the following messages a > >>> day: > >>> > >>> WARNING pid 24509 (python2.6): ioctl sign-extension ioctl > >>> ffffffff8004667e > >> > >> [...] > >> > >> I think we may need to check the code and patch it. Basically > >> this means that python (or some .so modules) passed an int or > >> unsigned int as parameter 'cmd', we need to change it to > >> unsigned long. > >> > >> The warning itself should be harmless to my best of knowledge, > >> one can probably remove the printf in kernel source code as a > >> workaround. > >> > >> By the way it seems to be a POSIX violation and we didn't seem > >> to really use so wide cmd, but I have not yet verified > >> everything myself. > > > > Long time ago, I had a similar problem with termios TIOCGWINSZ > > and we patched the port like this: > > > > http://www.freebsd.org/cgi/cvsweb.cgi/ports/lang/python/files/Att > >ic/patch-Modules%3A%3Afcntlmodule.c?rev=1.1;content-type=text%2Fpl > >ain > > > > I believe it was upstream patched at the time but I won't be > > surprised if something similar was reintroduced. It happens when > > a Python internal integer type is converted to a native unsigned > > long. > > Well, only *BSD have cmd a long value so it's likely that it would > be reintroduced. Yes, that's what I mean. > I have checked the 4.4BSD archive and understood that our ioctl's > cmd parameter was made long around 1991 or 1992s but didn't see > what it actually buy us... Like it or not, it is too late to revert. :-( Jung-uk Kim