Re: Missing compat_43 stuff for netbsd32?

2018-09-12 Thread Anders Magnusson

Den 2018-09-12 kl. 01:57, skrev Warner Losh:



On Tue, Sep 11, 2018, 5:48 PM Brad Spencer > wrote:


Eduardo Horvath  writes:

> On Tue, 11 Sep 2018, Paul Goyette wrote:
>
>> While working on the compat code, I noticed that there are a
few old
>> syscalls which are defined in syc/compat/netbsd323/syscalls.master
>> with a type of COMPAT_43, yet there does not exist any
compat_netbsd32
>> implementation as far as I can see...
>>
>>      #64     ogetpagesize
>>      #84     owait
>>      #89     ogetdtablesize
>>      #108    osigvec
>>      #142    ogethostid (interestingly, there _is_ an
implementation
>>                      for osethostid!)
>>      #149    oquota
>>
>> Does any of this really matter?  Should we attempt to implement
them?
>
> I believe COMPAT_43 is not NetBSD 4.3 it's BSD 4.3. Anybody have
any old
> BSD 4.3 80386 binaries they still run?  Did BSD 4.3 run on an
80386?  Did
> the 80386 even exist when Berkeley published BSD 4.3?
>
> It's probably only useful for running ancient SunOS 4.x
binaries, maybe
> Ultrix, Irix or OSF-1 depending on how closely they followed BSD
4.3.
>
> Eduardo


It has been a very long time since I did this, and I may not remember
correctly, but I believe that COMPAT_43 is needed on NetBSD/i386
to run
BSDI binaries.  I remember using the BSDI Netscape 3.x binary back in
the day and I think it was required.


FreeBSD does too... net2 was closer to 4.3 system calls for many 
things than 4.4.
When I wrote the vax port I used 4.3BSD Reno environment and NetBSD 
kernels with COMPAT_43.


Trivia:  I had two 11/750, one for compiling and one for test-booting, 
and used a dual-ported RP06

to get a test kernel in there quickly :-)

-- Ragge


Re: Missing compat_43 stuff for netbsd32?

2018-09-12 Thread Warner Losh
On Tue, Sep 11, 2018, 5:48 PM Brad Spencer  wrote:

> Eduardo Horvath  writes:
>
> > On Tue, 11 Sep 2018, Paul Goyette wrote:
> >
> >> While working on the compat code, I noticed that there are a few old
> >> syscalls which are defined in syc/compat/netbsd323/syscalls.master
> >> with a type of COMPAT_43, yet there does not exist any compat_netbsd32
> >> implementation as far as I can see...
> >>
> >>  #64 ogetpagesize
> >>  #84 owait
> >>  #89 ogetdtablesize
> >>  #108osigvec
> >>  #142ogethostid (interestingly, there _is_ an implementation
> >>  for osethostid!)
> >>  #149oquota
> >>
> >> Does any of this really matter?  Should we attempt to implement them?
> >
> > I believe COMPAT_43 is not NetBSD 4.3 it's BSD 4.3.  Anybody have any
> old
> > BSD 4.3 80386 binaries they still run?  Did BSD 4.3 run on an 80386?
> Did
> > the 80386 even exist when Berkeley published BSD 4.3?
> >
> > It's probably only useful for running ancient SunOS 4.x binaries, maybe
> > Ultrix, Irix or OSF-1 depending on how closely they followed BSD 4.3.
> >
> > Eduardo
>
>
> It has been a very long time since I did this, and I may not remember
> correctly, but I believe that COMPAT_43 is needed on NetBSD/i386 to run
> BSDI binaries.  I remember using the BSDI Netscape 3.x binary back in
> the day and I think it was required.
>

FreeBSD does too... net2 was closer to 4.3 system calls for many things
than 4.4.

Warner

>


Re: Missing compat_43 stuff for netbsd32?

2018-09-12 Thread Warner Losh
On Tue, Sep 11, 2018, 4:38 PM Thor Lancelot Simon  wrote:

> There can be a lot of value to being able to run really old executables,
> but you need the right customer in the right state of utter desperation...
>

I'm writing a COMPAT_V7 right now to celebrate Unix 50 next year. To be
difficult, this is really COMPAT_VENIX for an old 8088 v7 port that I have
some history with. There is a wait call there mentioned elsewhere in the
thread. I want it mostly so I can run the compiler on something fast...

Maybe not desperation, but at least a little crazy .. it's not clear even a
kernel module is the right path since qemu userland might be easier...

Warner

>


Re: Missing compat_43 stuff for netbsd32?

2018-09-11 Thread John Nemeth
On Sep 11,  6:38pm, Thor Lancelot Simon wrote:
} On Tue, Sep 11, 2018 at 03:35:24PM +, Eduardo Horvath wrote:
} > 
} > It's probably only useful for running ancient SunOS 4.x binaries, maybe 
} > Ultrix, Irix or OSF-1 depending on how closely they followed BSD 4.3.
} 
} Actually, I think amd64, sparc64, and mips64 are the only platforms where
} it could even be possible to encounter netbsd32 executables that required
} system calls that had the "o" names in 4.3BSD.
} 
} On amd64, because i386 architecture SunOS 4 executables exist and I am not
} sure the SunOS 4 kernel did actually pick up all the new syscalls from

 Yeah, but that would be the Roadrunner, which I believe was
pretty rare, and a bit of a quirky system (software and hardware
wise).  I did lay eyes on one once many years, but I don't believe
I touched that one.  I suspect that not very many people have even
seen one.

} 4.3BSD.  Whether such executables would run at all though, I'm not sure;

 Personally, I have my doubts.

} there is probably other COMPAT_SUNOS code needed that may not work on i386.
} 
}-- End of excerpt from Thor Lancelot Simon


Re: Missing compat_43 stuff for netbsd32?

2018-09-11 Thread Brad Spencer
Eduardo Horvath  writes:

> On Tue, 11 Sep 2018, Paul Goyette wrote:
>
>> While working on the compat code, I noticed that there are a few old
>> syscalls which are defined in syc/compat/netbsd323/syscalls.master
>> with a type of COMPAT_43, yet there does not exist any compat_netbsd32
>> implementation as far as I can see...
>> 
>>  #64 ogetpagesize
>>  #84 owait
>>  #89 ogetdtablesize
>>  #108osigvec
>>  #142ogethostid (interestingly, there _is_ an implementation
>>  for osethostid!)
>>  #149oquota
>> 
>> Does any of this really matter?  Should we attempt to implement them?
>
> I believe COMPAT_43 is not NetBSD 4.3 it's BSD 4.3.  Anybody have any old 
> BSD 4.3 80386 binaries they still run?  Did BSD 4.3 run on an 80386?  Did 
> the 80386 even exist when Berkeley published BSD 4.3?
>
> It's probably only useful for running ancient SunOS 4.x binaries, maybe 
> Ultrix, Irix or OSF-1 depending on how closely they followed BSD 4.3.
>
> Eduardo


It has been a very long time since I did this, and I may not remember
correctly, but I believe that COMPAT_43 is needed on NetBSD/i386 to run
BSDI binaries.  I remember using the BSDI Netscape 3.x binary back in
the day and I think it was required.



-- 
Brad Spencer - b...@anduin.eldar.org - KC8VKS - http://anduin.eldar.org


Re: Missing compat_43 stuff for netbsd32?

2018-09-11 Thread Thor Lancelot Simon
On Tue, Sep 11, 2018 at 03:35:24PM +, Eduardo Horvath wrote:
> 
> It's probably only useful for running ancient SunOS 4.x binaries, maybe 
> Ultrix, Irix or OSF-1 depending on how closely they followed BSD 4.3.

Actually, I think amd64, sparc64, and mips64 are the only platforms where
it could even be possible to encounter netbsd32 executables that required
system calls that had the "o" names in 4.3BSD.

On amd64, because i386 architecture SunOS 4 executables exist and I am not
sure the SunOS 4 kernel did actually pick up all the new syscalls from
4.3BSD.  Whether such executables would run at all though, I'm not sure;
there is probably other COMPAT_SUNOS code needed that may not work on i386.

On sparc64 because there were releases of SunOS 3 for 32-bit SPARC and
SunOS 3 *definitely* didn't have 4.3BSD's new system calls (thus didn't
have the old ones renamed to o*).

On mips64 *if* EXEC_AOUT or EXEC_PECOFF work, because:
* Ultrix basically was 4.2BSD.
* MIPS themselves ported 4.3BSD to the R3000

The first (amd64) and last (mips64) seem pretty much theoretical but it
does seem like there may be 32-bit sparc binaries out there which work
on 32-bit NetBSD but not 64-bit NetBSD.  Whether anyone cares, dunno.

There can be a lot of value to being able to run really old executables,
but you need the right customer in the right state of utter desperation...

Thor


Re: Missing compat_43 stuff for netbsd32?

2018-09-11 Thread Johnny Billquist

On 2018-09-12 00:06, Paul Goyette wrote:

On Wed, 12 Sep 2018, Johnny Billquist wrote:


On 2018-09-11 23:06, Paul Goyette wrote:

On Tue, 11 Sep 2018, Johnny Billquist wrote:




Well, how about running actual BSD 4.3 binaries? :-)
But this is obviously limited to VAX only.


We don't have a compat_netbsd32 for vax.  We have the module only for 
amd64, mips, and arm.


I guess that is correct, but this was about COMPAT_43, not 
something_32. Or did I miss something?


It was specifically about COMPAT_43 _under_ COMPAT_NETBSD  :)


D'oh! My fault then. Sorry.

  Johnny

--
Johnny Billquist  || "I'm on a bus
  ||  on a psychedelic trip
email: b...@softjar.se ||  Reading murder books
pdp is alive! ||  tryin' to stay hip" - B. Idol


Re: Missing compat_43 stuff for netbsd32?

2018-09-11 Thread Paul Goyette

On Wed, 12 Sep 2018, Johnny Billquist wrote:


On 2018-09-11 23:06, Paul Goyette wrote:

On Tue, 11 Sep 2018, Johnny Billquist wrote:




Well, how about running actual BSD 4.3 binaries? :-)
But this is obviously limited to VAX only.


We don't have a compat_netbsd32 for vax.?? We have the module only for 
amd64, mips, and arm.


I guess that is correct, but this was about COMPAT_43, not something_32. Or 
did I miss something?


It was specifically about COMPAT_43 _under_ COMPAT_NETBSD  :)

See src/sys/compat/compat_netbsd32/netbsd32_compat_43.c for the stuff 
that _is_ implemented (including osethostid()!)



+--+--++
| Paul Goyette | PGP Key fingerprint: | E-mail addresses:  |
| (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
+--+--++

Re: Missing compat_43 stuff for netbsd32?

2018-09-11 Thread Johnny Billquist

On 2018-09-11 23:06, Paul Goyette wrote:

On Tue, 11 Sep 2018, Johnny Billquist wrote:




Well, how about running actual BSD 4.3 binaries? :-)
But this is obviously limited to VAX only.


We don't have a compat_netbsd32 for vax.  We have the module only for 
amd64, mips, and arm.


I guess that is correct, but this was about COMPAT_43, not something_32. 
Or did I miss something?


  Johnny

--
Johnny Billquist  || "I'm on a bus
  ||  on a psychedelic trip
email: b...@softjar.se ||  Reading murder books
pdp is alive! ||  tryin' to stay hip" - B. Idol


Re: Missing compat_43 stuff for netbsd32?

2018-09-11 Thread Robert Elz
Date:Tue, 11 Sep 2018 12:53:20 -0700
From:Brian Buhrow 
Message-ID:  <201809111953.w8bjrkuz015...@lothlorien.nfbcal.org>

  | hello.  I think, but am not certain, that old NetBSD-0.8 binaries
  | might use some of those 4.3 syscalls.  I have a few binaries I'm still
  | using from  NetBSD-0.9A days which may use those syscalls as well.  I know
  | that I use COMPAT_43 in all of my kernel configs, and I have this vague
  | recollection that when I forgot to include that in one build, those
  | binaries broke.

That would be true of the syscalls that actually are emulated in COMPAT_43
but the ones Paul asked about, I suspect, were ones obsoleted even earlier
than that.   That is, I believe they were not 4.3BSD sys calls which have
changed since (since there would be no reason at all to do that for wait())
but even older sys calls that were already oxxx() in 4.3 (and probably
even earlier.)

There really has not been an application built since the mid 80's (on a BSD
system, and well before there were non-vax BSD ports) that ever used the
wait()  sys call.   SunOS would have only used in in whatever they called
the thing that ran on Sun 1's - pre BSD SunOS.  wait(2) was really wait(3)
and was implemented using wait3(2) (if you can sort that out). You'd
need to have a binary from (almost) preceding job control (4.0BSD - or was
that in 3BSD) to have something actually using wait(2) as a syscall.   If I
remember correctly, there was a period when both wait() and wait3() were
sys calls, but it was a fairly short period.Of course back at the time old
binaries that did use wait(2) were common - so owait() was needed to handle
them, but I cannot imagine anyone finding such a binary now (and certainly
not for anything that is not a vax).

I also suspect that the oquota() referred to might have been the one I 
initially implemented, which was never released anywhere - the version
in 4.2BSD was different, and had a different quota struct (and so needed
a different sys call - but the old binaries were, again, still around, at that
time.)   Again, if this is what that was, nothing but a vax ever issued the
(old) quota() sys call.   After that I don't recall any changes to quota(2)
until quota2() was invented (much more recently).

kre



Re: Missing compat_43 stuff for netbsd32?

2018-09-11 Thread Paul Goyette

On Tue, 11 Sep 2018, Johnny Billquist wrote:




Well, how about running actual BSD 4.3 binaries? :-)
But this is obviously limited to VAX only.


We don't have a compat_netbsd32 for vax.  We have the module only for 
amd64, mips, and arm.


+--+--++
| Paul Goyette | PGP Key fingerprint: | E-mail addresses:  |
| (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
+--+--++


Re: Missing compat_43 stuff for netbsd32?

2018-09-11 Thread Brian Buhrow
hello.  I think, but am not certain, that old NetBSD-0.8 binaries
might use some of those 4.3 syscalls.  I have a few binaries I'm still
using from  NetBSD-0.9A days which may use those syscalls as well.  I know
that I use COMPAT_43 in all of my kernel configs, and I have this vague
recollection that when I forgot to include that in one build, those
binaries broke.
-thanks
-Brian

On Sep 11,  1:19pm, Mouse wrote:
} Subject: Re: Missing compat_43 stuff for netbsd32?
} > I believe COMPAT_43 is not NetBSD 4.3 it's BSD 4.3.
} 
} I think so too.  Did NetBSD 4.3 ever exist?  According to
} /ftp/pub/NetBSD-archive on ftp.n.o, 4.0 and 4.0.1 were the only 4.x
} versions.  (Anonymous FTPing to ftp.n.o, I see /NetBSD-archive, but
} it's empty - apparently the archive is in /pub/NetBSD-archive.  I have
} no idea why /NetBSD-archive is there.)
} 
} > Did the 80386 even exist when Berkeley published BSD 4.3?
} 
} According to Wikipedia, the 80386 was introduced in 1985 and 4.3
} was released in June 1986, so, yes, it did.  But between .5 and 1.5
} years is not really long enough for it to be plausible that 4.3 ran on
} the '386.  I don't _think_ BSD ran on the '386 until the Jolitzes, but
} I wasn't close to that effort, so I don't really know.
} 
} > It's probably only useful for running ancient SunOS 4.x binaries,
} > maybe Ultrix, Irix or OSF-1 depending on how closely they followed
} > BSD 4.3.
} 
} That's pretty much my own perspective on COMPAT_43.  Probably should
} have been called COMPAT_BSD43 or some such
} 
} /~\ The ASCII   Mouse
} \ / Ribbon Campaign
}  X  Against HTML  mo...@rodents-montreal.org
} / \ Email! 7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B
>-- End of excerpt from Mouse




Re: Missing compat_43 stuff for netbsd32?

2018-09-11 Thread Johnny Billquist

On 2018-09-11 17:35, Eduardo Horvath wrote:

On Tue, 11 Sep 2018, Paul Goyette wrote:


While working on the compat code, I noticed that there are a few old
syscalls which are defined in syc/compat/netbsd323/syscalls.master
with a type of COMPAT_43, yet there does not exist any compat_netbsd32
implementation as far as I can see...

#64 ogetpagesize
#84 owait
#89 ogetdtablesize
#108osigvec
#142ogethostid (interestingly, there _is_ an implementation
for osethostid!)
#149oquota

Does any of this really matter?  Should we attempt to implement them?


I believe COMPAT_43 is not NetBSD 4.3 it's BSD 4.3.  Anybody have any old
BSD 4.3 80386 binaries they still run?  Did BSD 4.3 run on an 80386?  Did
the 80386 even exist when Berkeley published BSD 4.3?


I would say it'd most definitely BSD 4.3. And no, it did not run on 386. 
The first BSD version to run on anything besides VAX was 4.3 Tahoe, 
unless I remember wrong, if we talk about actual BSD. There were forks, 
though. Such as SunOS. Which were done even earlier than 4.3.



It's probably only useful for running ancient SunOS 4.x binaries, maybe
Ultrix, Irix or OSF-1 depending on how closely they followed BSD 4.3.


Well, how about running actual BSD 4.3 binaries? :-)
But this is obviously limited to VAX only.

  Johnny

--
Johnny Billquist  || "I'm on a bus
  ||  on a psychedelic trip
email: b...@softjar.se ||  Reading murder books
pdp is alive! ||  tryin' to stay hip" - B. Idol


Re: Missing compat_43 stuff for netbsd32?

2018-09-11 Thread Maxime Villard

Le 11/09/2018 à 10:07, Paul Goyette a écrit :

On Tue, 11 Sep 2018, Maxime Villard wrote:

Le 11/09/2018 à 09:46, Paul Goyette a écrit :

While working on the compat code, I noticed that there are a few old
syscalls which are defined in syc/compat/netbsd323/syscalls.master
with a type of COMPAT_43, yet there does not exist any compat_netbsd32
implementation as far as I can see...

 #64ogetpagesize
 #84owait
 #89ogetdtablesize
 #108osigvec
 #142ogethostid (interestingly, there _is_ an implementation
 for osethostid!)
 #149oquota

Does any of this really matter?  Should we attempt to implement them?


This would be silly. If no one noticed they weren't there, then it likely
means no one has ever used them; and if so, then we shouldn't add them - ie
we shouldn't introduce new entry points in the kernel. I mean we are in
2018.


Sounds good to me.

Is there any problem/issue with leaving the type field set to COMPAT_43
rather than UNIMPL or OBSOL ?


I don't have any particular opinion on that


Re: Missing compat_43 stuff for netbsd32?

2018-09-11 Thread Mouse
> I believe COMPAT_43 is not NetBSD 4.3 it's BSD 4.3.

I think so too.  Did NetBSD 4.3 ever exist?  According to
/ftp/pub/NetBSD-archive on ftp.n.o, 4.0 and 4.0.1 were the only 4.x
versions.  (Anonymous FTPing to ftp.n.o, I see /NetBSD-archive, but
it's empty - apparently the archive is in /pub/NetBSD-archive.  I have
no idea why /NetBSD-archive is there.)

> Did the 80386 even exist when Berkeley published BSD 4.3?

According to Wikipedia, the 80386 was introduced in 1985 and 4.3
was released in June 1986, so, yes, it did.  But between .5 and 1.5
years is not really long enough for it to be plausible that 4.3 ran on
the '386.  I don't _think_ BSD ran on the '386 until the Jolitzes, but
I wasn't close to that effort, so I don't really know.

> It's probably only useful for running ancient SunOS 4.x binaries,
> maybe Ultrix, Irix or OSF-1 depending on how closely they followed
> BSD 4.3.

That's pretty much my own perspective on COMPAT_43.  Probably should
have been called COMPAT_BSD43 or some such

/~\ The ASCII Mouse
\ / Ribbon Campaign
 X  Against HTMLmo...@rodents-montreal.org
/ \ Email!   7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Re: Missing compat_43 stuff for netbsd32?

2018-09-11 Thread Eduardo Horvath
On Tue, 11 Sep 2018, Paul Goyette wrote:

> While working on the compat code, I noticed that there are a few old
> syscalls which are defined in syc/compat/netbsd323/syscalls.master
> with a type of COMPAT_43, yet there does not exist any compat_netbsd32
> implementation as far as I can see...
> 
>   #64 ogetpagesize
>   #84 owait
>   #89 ogetdtablesize
>   #108osigvec
>   #142ogethostid (interestingly, there _is_ an implementation
>   for osethostid!)
>   #149oquota
> 
> Does any of this really matter?  Should we attempt to implement them?

I believe COMPAT_43 is not NetBSD 4.3 it's BSD 4.3.  Anybody have any old 
BSD 4.3 80386 binaries they still run?  Did BSD 4.3 run on an 80386?  Did 
the 80386 even exist when Berkeley published BSD 4.3?

It's probably only useful for running ancient SunOS 4.x binaries, maybe 
Ultrix, Irix or OSF-1 depending on how closely they followed BSD 4.3.

Eduardo


Re: Missing compat_43 stuff for netbsd32?

2018-09-11 Thread Robert Elz
If I had to guess, I'd tend to think that those were old syscalls that became 
oxxx in 4.3 (or before), rather than from 4.3

In particular, the wait() syscall was made obsolete (replaced by a libc
function which used wait3()) in about 4.1c or 4.2 BSD days (perhaps
earlier - could have even been 4.0)  - back then the old sys call would
have been needed for the normal reason, but now they'd only be useful
if you could find some really old (and obviously only vax) binaries to
use them.

kre



Re: Missing compat_43 stuff for netbsd32?

2018-09-11 Thread Paul Goyette

On Tue, 11 Sep 2018, Maxime Villard wrote:


Le 11/09/2018 à 09:46, Paul Goyette a écrit :

While working on the compat code, I noticed that there are a few old
syscalls which are defined in syc/compat/netbsd323/syscalls.master
with a type of COMPAT_43, yet there does not exist any compat_netbsd32
implementation as far as I can see...

 #64ogetpagesize
 #84owait
 #89ogetdtablesize
 #108osigvec
 #142ogethostid (interestingly, there _is_ an implementation
 for osethostid!)
 #149oquota

Does any of this really matter?  Should we attempt to implement them?


This would be silly. If no one noticed they weren't there, then it likely
means no one has ever used them; and if so, then we shouldn't add them - ie
we shouldn't introduce new entry points in the kernel. I mean we are in
2018.


Sounds good to me.

Is there any problem/issue with leaving the type field set to COMPAT_43
rather than UNIMPL or OBSOL ?


+--+--++
| Paul Goyette | PGP Key fingerprint: | E-mail addresses:  |
| (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
+--+--++

Re: Missing compat_43 stuff for netbsd32?

2018-09-11 Thread Maxime Villard

Le 11/09/2018 à 09:46, Paul Goyette a écrit :

While working on the compat code, I noticed that there are a few old
syscalls which are defined in syc/compat/netbsd323/syscalls.master
with a type of COMPAT_43, yet there does not exist any compat_netbsd32
implementation as far as I can see...

 #64ogetpagesize
 #84owait
 #89ogetdtablesize
 #108osigvec
 #142ogethostid (interestingly, there _is_ an implementation
 for osethostid!)
 #149oquota

Does any of this really matter?  Should we attempt to implement them?


This would be silly. If no one noticed they weren't there, then it likely
means no one has ever used them; and if so, then we shouldn't add them - ie
we shouldn't introduce new entry points in the kernel. I mean we are in
2018.