Subject: Re: Support for linux syscall fcntl64
To: Rick Byers <rb-netbsd@BigScaryChildren.net>
From: Alistair Crooks <agc@pkgsrc.org>
List: current-users
Date: 12/04/2001 16:43:16
The problem isn't that fcntl64 is unimplemented - the problem is
that the version being returned by uname is interpreted as being
"too old".  This is probably code that is executed because the
fcntl64 call fails, yes, but it's not the real cause of the problem.

I had this problem on 1.5, and I know it was changed fairly early
on - if the uname syscall is running in emulation, it now returns
a more accurate Linux version number to reflect the kernel that's
being emulated, rather than the NetBSD version number (1.5?), which
the binary thinks is too old.

Regards,
Alistair

On Tue, Dec 04, 2001 at 10:05:07AM -0500, Rick Byers wrote:
> It's architecture depandant, but for i386 there are 34 "UNIMPL" entries
> in sys/compat/linux/arch/i386/syscalls.master, including fcntl64.  Some
> are probably harder than others to implement, but I have no idea about who
> might be planning on implementing what.
> 
> Rick
> 
> On Tue, 4 Dec 2001, Tero Kivinen wrote:
> 
> > I am trying to run vuescan 7.1 on netbsd machine, and I run into
> > problems. The vuescan binary seems to use linux fcntl64 system call
> > and exits immediately if it is not found. Is there any plans adding
> > support for that? Is there other linux system calls netbsd current is
> > missing?
> >
> > The ktrace of the vuescan_static is:
> > ----------------------------------------------------------------------
> >  17143 ktrace   EMUL  "netbsd"
> >  17143 ktrace   CALL  execve(0xbfbfd50b,0xbfbfd408,0xbfbfd410)
> >  17143 ktrace   NAMI  "./vuescan_static"
> >  17143 vuescan_static EMUL  "linux"
> >  17143 vuescan_static RET   execve -1 errno -2 No such file or directory
> >  17143 vuescan_static CALL  #221 (unimplemented fcntl64)
> >  17143 vuescan_static RET   #221 (unimplemented fcntl64) -1 errno -38 Too many processes
> >  17143 vuescan_static CALL  fcntl(0,0x1,0)
> >  17143 vuescan_static RET   fcntl 0
> >  17143 vuescan_static CALL  fcntl(0x1,0x1,0)
> >  17143 vuescan_static RET   fcntl 0
> >  17143 vuescan_static CALL  fcntl(0x2,0x1,0)
> >  17143 vuescan_static RET   fcntl 0
> >  17143 vuescan_static CALL  uname(0xbfbfd1b0)
> >  17143 vuescan_static RET   uname 0
> >  17143 vuescan_static CALL  write(0x2,0x844fbe9,0x16)
> >  17143 vuescan_static GIO   fd 2 wrote 22 bytes
> >        "FATAL: kernel too old
> >        "
> >  17143 vuescan_static RET   write 22/0x16
> >  17143 vuescan_static CALL  rt_sigprocmask(0x1,0xbfbfd070,0,0x8)
> >  17143 vuescan_static RET   rt_sigprocmask 0
> >  17143 vuescan_static CALL  kill(0,0x6)
> >  17143 vuescan_static PSIG  SIGABRT SIG_DFL
> >  17143 vuescan_static NAMI  "vuescan_static.core"
> > --
> > kivinen@ssh.fi
> > SSH Communications Security                  http://www.ssh.fi/
> > SSH IPSEC Toolkit                            http://www.ssh.fi/ipsec/
> >
>