Subject: Re: MAP_AUTOGROW

From: Ralf Baechle <[email-masked]>
Date: Fri, 20 Jun 1997 20:42:52 +0200 (MET DST)

> Thus spake Ralf Baechle:
> > > "Your" mkdep.c uses MAP_AUTOGROW, which doesn't appear in my Intel
> > > kernel sources.
> > > 
> > > This makes it kinda hard to xcompile. =)
> > > 
> > > I'm going to try just removing the reference, and see if it breaks anything.
> > 
> > Uhh...  That's an ugly hack which I added to make the things run on
> > IRIX and Solaris.  I knew that it has some problems ...
> 
> If I add something like:
> #ifndef MAP_AUTOGROW
> #define MAP_AUTOGROW 0
> #endif
> 
> to the file and commit it, will that work OK?

No, that's also an incorrect solution.  Let me explain the bug in mkdep.
When mkdep processes a file it does not read it into memory but it uses
open(2) and mmap(2) and then parses the file using a highly optimized
state machine.  When mkdep reaches the end of the file the state machine
may access some bytes beyond the mapped file.  Under normal circumstances
this makes no problems.  If however the excess bytes are on the next page
the mkdep will be sent a SIGBUS.

This only happens on systems where the mmap does strictly conform to
standards like IRIX or Solaris.  For Linux mkdep uses a little trick,
it tries to make more of the file than the file is long and Linux honors
that trick by not sending the signal for an attempted access to the
trailing bytes.  By my (very strict) interpretation of POSIX / XPG4 Linux
does the wrong thing and mkdep is based on this special Linux behaviour.

The way I glue this by using MAP_AUTOGROW is also broken ...

  Ralf

---

From: Alex deVries <[email-masked]>
Date: Tue, 24 Jun 1997 12:38:39 -0400 (EDT)

I have some ultra simple hardware questions that I couldn't find answers
to.  Excuse the noviceness of it all, I haven't touched SGI hardware in
quite some time.

1. Do Indy's come equipped with floppy drives?  What are they?  Is it
possible to boot from them?

2. I know O2's have PCI busses with a custom controller.  Do Indy's have
this too? What is the name of this controller? It would seem reasonably
easy to slap a PCI VGA card in there and port XFree86 to run on it.

3. Do Indy's ship with CDROMs?

As an aside, I asked Erik Troan for the source for the RedHat Install
program, and he seems quite interested in SGI-Linux.

- Alex

      Alex deVries           "Alex can cut a mean rug."
  System Administrator       - M. Dittberner <[email-masked]>
   The EngSoc Project

---

From: "David S. Miller" <[email-masked]>
Date: Tue, 24 Jun 1997 12:44:33 -0400

Date: Tue, 24 Jun 1997 12:38:39 -0400 (EDT)
   From: Alex deVries <[email-masked]>

Yes, they are SCSI floppy drives.

No, but I believe some models were produced with EISA slots on the
motherboard.

Can't answer this one personally.

---

From: Bob Mende Pie <[email-masked]>
Date: Tue, 24 Jun 1997 09:48:06 -0700 (PDT)

> possible to boot from them?

There is an option on indy's that allow for a SCSI iomega floptical (21MB)
drive.  These drives are treated as a removable SCSI disk.  You should be
able to boot from them but I have never tried.
 
> easy to slap a PCI VGA card in there and port XFree86 to run on it.

The indy does not have PCI.   They use a gio bus.
 
> 3. Do Indy's ship with CDROMs?

As an option there is an external CDROM.   I believe that (nowadays) you
have to really try to get a system without a cdrom.

                              /Bob...                    mailto:[email-masked]
                        http://reality.sgi.com/mende/          KF6EID

---

From: Martin Knoblauch <[email-masked]>
Date: Tue, 24 Jun 1997 18:48:12 +0200

Alex deVries wrote:
> 
> I have some ultra simple hardware questions that I couldn't
> find answers to.  Excuse the noviceness of it all, I haven't
> touched SGI hardware in quite some time.
> 
> 1. Do Indy's come equipped with floppy drives?  What are they?
>    Is it possible to boot from them?
>

 Oh no :-) No, Indys don't come usually with floppys. We
offer a 20MB Floptical option (internal), or a normal floppy
option (external). Both are not really popular with our customers.

 You might be able to boot from them, but this was probably never
tested...
 
> 2. I know O2's have PCI busses with a custom controller.
>    Do Indy's have this too? What is the name of this controller?
>    It would seem reasonably easy to slap a PCI VGA card in there
>    and port XFree86 to run on it.
>

 No, Indy comes with our proprietary GIO bus. The GFX cards (8/24)
plug on that.
 
> 3. Do Indy's ship with CDROMs?

 More often than with floppies, but it is an option. Not standard.
 
Martin
-- 
+---------------------------------+-----------------------------------+
|Martin Knoblauch                 | Silicon Graphics GmbH             |
|Manager Technical Marketing      | Am Hochacker 3 - Technopark       |
|Silicon Graphics Computer Systems| D-85630 Grasbrunn-Neukeferloh, FRG|
|---------------------------------| Phone: (+int) 89 46108-179 or -0  |
|http://reality.sgi.com/knobi     | Fax:   (+int) 89 46107-179        |
+---------------------------------+-----------------------------------+
|e-mail: <[email-masked]>   | VM: 6-333-8197 | M/S: IDE-3150    |
+---------------------------------------------------------------------+

---

From: Bob Mende Pie <[email-masked]>
Date: Tue, 24 Jun 1997 09:48:53 -0700 (PDT)

> No, but I believe some models were produced with EISA slots on the

I think that was the indigo2.

---

From: Martin Knoblauch <[email-masked]>
Date: Tue, 24 Jun 1997 18:54:05 +0200

> Yes, they are SCSI floppy drives.

 As I said: optional. No boot guarantee.
 
>       Do Indy's have  this too? What is the name of this
>       controller? It would seem reasonably easy to slap a
>       PCI VGA card in there and port XFree86 to run on it.
> 
> No, but I believe some models were produced with EISA slots
> on the motherboard.
> 

  That is the Indigo2/Challenge-M series. Our first attempt
on open expansion busses.

Martin

---

From: "William J. Earl" <[email-masked]>
Date: Tue, 24 Jun 1997 10:03:24 -0700

> possible to boot from them?

     An Indy does not come with a floppy drive standard, but it does support
both a floppy and a floptical drive.  Both are SCSI drives, and you should 
be able to boot from them, since the boot software does not distinguish
among drive types.

 > easy to slap a PCI VGA card in there and port XFree86 to run on it.

     No, the Indy has the SGI-specific GIO bus.

 > 3. Do Indy's ship with CDROMs?

     An Indy does not come with a CDROM by default, but most SCSI CDROM
drives should work.  (There is a supported SGI CDROM drive.)

---

From: Miguel de Icaza <[email-masked]>
Date: Tue, 24 Jun 1997 17:29:38 -0500

> program, and he seems quite interested in SGI-Linux.

it is distributed as part of redhat 4.2 on ftp siets.

Miguel.

---

From: Miguel de Icaza <[email-masked]>
Date: Tue, 24 Jun 1997 18:02:38 -0500

> I assume you're talking about the little endian binaries which they're
> mirroring from kernel panic.  As I said, they're little endian ...

Well, I was thinking in Red Hat's source code for their install
program.

Miguel.

---

From: Ralf Baechle <[email-masked]>
Date: Wed, 25 Jun 1997 01:05:24 +0200 (MET DST)

Hi,

  Ralf