Subject: Re: "real" OpenBSD compat - how hard would it be?
To: Urban Boquist <boquist@crt.se>
From: Jaromir Dolecek <jdolecek@netbsd.org>
List: port-i386
Date: 03/19/2003 17:04:16
Urban Boquist wrote:
> So, it seems that the days when you could just take any OpenBSD (i386)
> binary and run it on NetBSD (i386) and it would Just Work are
> definitely over.
> 
> Does anyone have any idea on how much work a real kernel level
> compat/openbsd would be?

Remapping of the syscalls is really easy.

Perhaps more important question is why would you want to run
OpenBSD binaries at all? AFAIK everything available for OpenBSD
is also available for NetBSD.
 
> #253 according to the OpenBSD numbering seems to be issetugid(2),
> which in NetBSD is at #305. According to the NetBSD manpage it was
> taken from OpenBSD via FreeBSD, but FreeBSD seems to use #253, so I
> have no idea why we chose another number (#253 is free in NetBSD as
> far as I can see)... Maybe it was intentional?

I don't think it was intentional, #304 was the last entry at the
time issetugid(2) was added. Meanwhile, #253 got used for kernel
semaphore syscalls.

> P.S. I understand that we may currently have problems identifying
> OpenBSD binaries during exec, to trigger the right emulation, but that
> is really a different problem. And there have been various suggestions
> on how that could be handled.

Do they have some kind of signature, as NetBSD binaries have? 

Jaromir
-- 
Jaromir Dolecek <jdolecek@NetBSD.org>            http://www.NetBSD.org/
-=- We should be mindful of the potential goal, but as the tantric    -=-
-=- Buddhist masters say, ``You may notice during meditation that you -=-
-=- sometimes levitate or glow.   Do not let this distract you.''     -=-