From owner-freebsd-emulation Sat Dec 7 5:18:26 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 86BBB37B401; Sat, 7 Dec 2002 05:18:25 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A71643E9C; Sat, 7 Dec 2002 05:18:24 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id AAA30044; Sun, 8 Dec 2002 00:18:16 +1100 Date: Sun, 8 Dec 2002 00:18:30 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Ian Dowse Cc: emulation@FreeBSD.ORG, , Subject: Re: linux_fcntl64() implementation In-Reply-To: <200212070438.aa65335@salmon.maths.tcd.ie> Message-ID: <20021208000831.R12964-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Sat, 7 Dec 2002, Ian Dowse wrote: > It seems that we do not implement fcntl64() correctly in the Linux > emulation code. I noticed that some programs were complaining about > F_SETLK failing, so I compared what we do with what appears in > bits/fcntl.h and some version of the Linux fcntl() from the web. > Currently we assume that all F_*ETLK* operations in fcntl64() use > the 64-bit arguments, but it appears that in fact only the versions > with the `64' suffix actually do. > > The patch below seems to fix the problem I was seeing - does anybody > know the precise details of the fcntl() vs. fcntl64() ABI? This bug > probably is the cause of PR kern/37656. Not me, but I think LFS requires the "old" (non-64) versions of the functions are supposed to have perfectly broken support for 64-bit args (since the original versions couldn't have had any support). I think even open() is supposed to fail for files whose size is too large for a 32-bit off_t, so failure of the other functions may be moot. But ones that want to copy in and out off_t's (like fcntl()) need to know the difference. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message