Subject: Linux-Development Digest #905
From: Digestifier <Linux-Development-Request@senator-bedfellow.MIT.EDU>
To: Linux-Development@senator-bedfellow.MIT.EDU
Reply-To: Linux-Development@senator-bedfellow.MIT.EDU
Date:     Mon, 11 Jul 94 06:13:08 EDT

Linux-Development Digest #905, Volume #1         Mon, 11 Jul 94 06:13:08 EDT

Contents:
  Programming in Linux (Jinwoo Shin)
  Re: BUG ? read/write on shared memory in 1.1.2x (Michael Lausch)
  How to know the patch lev (Riku Saikkonen)
  Re: Programming in Linux (Tim Bass (Network Systems Engineer))
  Re: How to know the patch level? (Lee J. Silverman)
  Re: List of programs which need shadow changes (Rob Janssen)
  Kernel patch contents? (Lee J. Silverman)
  Inetd and "max" checking (Jay Allen(Gratis Corvus))
  Re: ARNET SmartPort Plus drivers (Phil Hughes)
  Re: ping doesn't work with 1.1.26 (Michael Bongartz)
  Re: ?: free MOTIF clone ? (Tom Griffing)
  Re: Kernels and atdisk2 (David Monro)
  Re: Swapping problems with VL-300 (aha152x driver) VLB SCSI controller (was: Re: Dedicated SCSI swap drive?) (Craig Sanders)

----------------------------------------------------------------------------

From: jwshin@nitride.EECS.Berkeley.EDU (Jinwoo Shin)
Subject: Programming in Linux
Date: 10 Jul 94 21:09:37 GMT

I'm fairly new to Unix programming as wonder ... what exactly is Linux???
I'm studying with Richard Stevens' Advanced Programming in the UNIX Environment
and he is very careful about the differences between Sun, Svr4, Bsd 4.3+ ...
however, where does Linux fit in this? What kind of header files does linux
support ? Is it closest to Svr4 or Bsdish OSs ? He mentions a header file
called stropts.h .. but it doesn't exist on Linux. What to do?

-- 
Jinwoo Shin                             jwshin@eecs.berkeley.edu
System Administrator                    
Berkeley Sensor and Actuator Center

------------------------------

From: mla@loki.muc.de (Michael Lausch)
Subject: Re: BUG ? read/write on shared memory in 1.1.2x
Date: 10 Jul 1994 23:06:05 +0200

In article <1994Jul6.151903.13103@uk.ac.swan.pyr>,
Alan Cox <iiitac@uk.ac.swan.pyr> wrote:
>In article <2vdjb0$ju@loach.cichlid.com> aab@loach.cichlid.com (Andy Burgess) writes:
>>In <2uu3cb$adk@urmel.informatik.rwth-aachen.de> bart@rog.rwth-aachen.de (Michael Bartmann) writes:
>>Well I'm not on vacation and I'm having the same problem. I'm using the
>>buffer program (comp.sources.misc/volume38) which double buffers using 
>>shared memory (to keep your tape streaming). 
>>
>>Worked in 1.1.19, 1.1.24 gives:
>>
>>loach:aab % buffer
>>buffer: failed to read input: Bad address
>>buffer: failed to attach shared memory: Invalid argument
>
>1.1.20 + are buggy - they are ALPHA test kernels for a reason. I suspect once
>Linus is back this will get fixed.
>
>Alan
>
Okay here is a quick and dirty patch to repair this. I posted it to
the kernel channel, but my internet connection is currently rather
unreliable. IMHO the shared memory should be included in the
vm_area_struct list of a process. Why isn't it? Is there a reason i've
missed? 

--- memory.c.~1~        Sun Jul 10 23:02:30 1994
+++ memory.c    Tue Jul  5 23:54:44 1994
@@ -45,7 +45,9 @@
 #include <linux/types.h>
 #include <linux/ptrace.h>
 #include <linux/mman.h>
-
+#include <linux/segment.h>
+#include <asm/segment.h>
+#include <linux/shm.h>
 /*
  * Define this if things work differently on a i386 and a i486:
  * it will (on a i486) warn about kernel memory accesses that are
@@ -677,6 +679,13 @@
 int verify_area(int type, const void * addr, unsigned long size)
 {
        struct vm_area_struct * vma;
+       struct shm_desc * shm;
+       /* If the current user space is mapped to kernel space (for the
+        * case where we use a fake user buffer with get_fs/set_fs()) we
+        * don't expect to find the address in the user vm map.
+        */
+       if (get_fs() == get_ds())
+               return 0;
 
        for (vma = current->mm->mmap ; ; vma = vma->vm_next) {
                if (!vma)
@@ -689,7 +698,7 @@
        if (!(vma->vm_flags & VM_GROWSDOWN))
                goto bad_area;
        if (vma->vm_end - (unsigned long) addr > current->rlim[RLIMIT_STACK].rlim_cur)
-               goto bad_area;
+               goto real_bad_area;
 good_area:
        while (vma->vm_end - (unsigned long) addr < size) {
                struct vm_area_struct * next = vma->vm_next;
@@ -699,10 +708,20 @@
                        goto bad_area;
                vma = next;
        }
+real_good_area:
        if (wp_works_ok || type == VERIFY_READ || !size)
                return 0;
        return __verify_write((unsigned long) addr,size);
 bad_area:
+       for (shm = current->shm; ; shm = shm->task_next) {
+           if (!shm)
+               goto real_bad_area;
+           if (shm->end > (unsigned long) addr)
+               break;
+       }
+       if (shm->start <= (unsigned long) addr)
+           goto real_good_area;
+real_bad_area:         
        return -EFAULT;
 }
 

===== END OF PATCH ====
-- 
---
Magic is real unless declared integer
Michael Lausch                  e-mail: mla@loki.muc.de
Office: +41 089 93001 427       Home: +41 089 361 00 926

------------------------------

Subject: How to know the patch lev
From: riku.saikkonen@compart.fi (Riku Saikkonen)
Date: Mon, 11 Jul 94 00:22:00 +0200

>I want to know what patch level of 1.0 I am running. I tried "uname"
>it only tels me it is "1.0".

It's 1.0.0 then...

-=- Rjs -=- riku.saikkonen@compart.fi - IRC: Rjs
GCS/O -d+ p c++(+++) l++ u e m++@ s/- n+ h-- f+ !g w+ t/Tolkien+++ r !y(*)
"Her voice such love and longing filled / he raised his eyes, his mourning
stilled, / and felt his heart new-turned to flame / for her that through
peril to him came." - J.R.R. Tolkien, _The Lays of Beleriand_


------------------------------

From: bass@cais.cais.com (Tim Bass (Network Systems Engineer))
Subject: Re: Programming in Linux
Date: 10 Jul 1994 22:33:23 GMT

Jinwoo Shin (jwshin@nitride.EECS.Berkeley.EDU) wrote:
: I'm fairly new to Unix programming as wonder ... what exactly is Linux???

Linux claims to be POSIX compliant.  The problem is that there are many POSIX
specs, POSIX.1, POSIX.2, POSIX.3 ...... POSIX.10.  Many of the standard C lib
stuff is included in the lower POSIX specs ( forget the exact one but it is
the new Oreilly book on POSIX).  The BSD networking functions like 'select()'
and 'socket()' and 'bind()' don't show up in the POSIX book and the book 
says the  BSD stuff is in committee.

: I'm studying with Richard Stevens' Advanced Programming in the UNIX Environment
: and he is very careful about the differences between Sun, Svr4, Bsd 4.3+ ...
: however, where does Linux fit in this? What kind of header files does linux

I have the exact same problem with Stevens code.  All of his books and code
are very difficult to compile because the lib and header file are simply not
there on my Linux box.  This is true for all Steven's book.  When I look
at the header files, they have entries like:

#ifdef notdef
blah, blah
#endif 

I mean really, what is the "notdef" variable supposed to mean???


: support ? Is it closest to Svr4 or Bsdish OSs ? He mentions a header file
: called stropts.h .. but it doesn't exist on Linux. What to do?

This questions asked on this newgroup my me a few weeks ago and I got some nice
responses, but none answered this question on porting Steven's BSD code.  Then
I read the Oreilly book on POSIX and there was nothing on BSD networking system
calls.  Maybe all the linux developers that read this list have not had the
chance to port the BSD networking code of R. Steven's to linux.  

If I wasn't so busy trying to manage to contracts, one with the USAF and one with the NSF and trying to buy a new condo I'd port it myself as a gift to the      
world.  Maybe later... 
: -- 
: Jinwoo Shin                           jwshin@eecs.berkeley.edu
: System Administrator                  
: Berkeley Sensor and Actuator Center

------------------------------

From: lee@netspace.students.brown.edu (Lee J. Silverman)
Subject: Re: How to know the patch level?
Date: 10 Jul 1994 22:42:22 GMT


        First, make sure you're using uname --all, instead of just
plain "uname".  Second, you could try to cal /proc/version


--
Lee Silverman, Brown class of '94, Brown GeoPhysics ScM '95
Email to: Lee_Silverman@brown.edu
Phish-Net Archivist: phish-archives@phish.net
"Nonsense - you only say it's impossible because nobody's ever done it."

------------------------------

From: rob@pe1chl.ampr.org (Rob Janssen)
Subject: Re: List of programs which need shadow changes
Reply-To: pe1chl@rabo.nl
Date: Sun, 10 Jul 1994 21:37:00 GMT

In <DHOLLAND.94Jul10133815@husc7.harvard.edu> dholland@husc7.harvard.edu (David Holland) writes:


>rob@pe1chl.ampr.org's message of Sat, 9 Jul 1994 08:44:22 GMT said:

> > >Why not come up with a standardized library interface, fix these
> > >programs once and for all, and use replacement dynamic libraries to
> > >get shadow passwords, Kerberos, s/key, and/or whatever other schemes
> > >come down the pipe?
> > 
> > Hmmm...  that was tried some time ago.  It was promised it would
> > not break anything, but there were severe performance problems and
> > it also caused other nasty problems.  (e.g. it left a file open
> > which could cause problems in programs that expected to be able to
> > open new stdin/stdout/stderr files)

>That's because it wasn't done right. You can't try to cram it into
>getpwent() and its related functions. You need a separate set of
>functions for retrieving the password(s). Whatever it is has to be
>sufficiently general to allow for multiple challenge/response pairs...
>or conceivably none, in some cases.

>Then, that list of programs would have to be converted to use the
>library, but only once; that's much better than having to rework all
>of them every time somebody dreams up a new authentication scheme.

>If none of the commercial unix vendors have come up with an interface
>of this sort, I propose we design our own and get it adopted.

But those are already there...  see the functions defined in shadow.h

The problem is/was that existing code does not call these, and integrating
them into getpwent() was supposed to fix that.  But the attempt failed
miserably.  Maybe with some more work it could have worked out better...
(getting the shadow entry for each and every line read from the passwd
file, even if it was going to be immediately discarded because the
caller was looking for a specific user-id, was the main problem)

Rob
-- 
=========================================================================
| Rob Janssen                | AMPRnet:   rob@pe1chl.ampr.org           |
| e-mail: pe1chl@rabo.nl     | AX.25 BBS: PE1CHL@PI8UTR.#UTR.NLD.EU     |
=========================================================================

------------------------------

From: lee@netspace.students.brown.edu (Lee J. Silverman)
Subject: Kernel patch contents?
Date: 10 Jul 1994 22:55:30 GMT


        A while ago someone was posting the changes in the Kernel from
version to version, for the benefit of us folks who don't have the
time to read the entire developer's mailing list just to see what's in
the updates.  Is anyone interested in restarting this service, I know
the reaction to it was very positive for the few updates that I saw.

        For example, I'm running kernel version 1.1.19 and I've found
it to be pretty stable, but I have no idea if one of the newer kernels
might be more useful for me.

Thanks for the help, whoever decides to take this on!

--
Lee Silverman, Brown class of '94, Brown GeoPhysics ScM '95
Email to: Lee_Silverman@brown.edu
Phish-Net Archivist: phish-archives@phish.net
"Nonsense - you only say it's impossible because nobody's ever done it."

------------------------------

From: jay@caeser.geog.pdx.edu (Jay Allen(Gratis Corvus))
Subject: Inetd and "max" checking
Date: 10 Jul 1994 22:41:50 GMT

According to the man pages I shoulb be able to set the maximum number of 
connections on a inetd spawned service by adding a ".MAX", after the 
[wait|nowait] entry in inetd.conf.  BUT INETD DOES NOT HONOR IT?!

I looked around, and not many OS, have this feature, but It would be nice 
linux did.

So which is it?  Change the inetd manpages (to drop the "MAX" stuff), or 
fix inetd, to meet the manpages?  :)

Thanks in advance!
--
========================================================================
* Jay D. Allen       Portland State University, Portland Oregon, U.S.A.*   
*                    The METNET project, Geography Department, and     *
*                    The Center For Science Education.. et al          *
* jay@caeser.geog.pdx.edu        (503)725-3953                         *
========================================================================

------------------------------

From: fyl@eskimo.com (Phil Hughes)
Subject: Re: ARNET SmartPort Plus drivers
Date: Mon, 11 Jul 1994 03:12:36 GMT

Greg Miller (gmiller@metronet.com) wrote:

: I have been talking with the engineering group at ARNET about drivers for
: Linux. They indicated they have been contacted by someone (gee they never
: remeber who though) about writing drivers for Linux.

: I am seeking any version of these drivers in order to install one of these
: boards into my Linux system. If you have, have seen (and remember where),
: or know who to see about these drivers, I would be very greatful to share
: this information.


That could have been me.  I have talked to a lot of comm board
manufacturers about Linux drivers.  Most seem scared that if they release
info on their board that someone in the "cheap labor" part of the world
will clone their board and they will be out of business.  Cyclades is the
one company, so far, that has decided to support development of a driver
for their hardware.

I think it is real important that this work happens and have been willing
to put my position as publisher of Linux Journal into the middle of these
efforts.  So, if you know of a board manufacturer who is interested in
getting someone to write a driver or you are interested in writing a
driver if you could, for example, get a free board for your trouble,
please contact me.
--
Phil Hughes, Publisher, Linux Journal (206) 524-8338
usually phil@fylz.com, sometimes fyl@eskimo.com

------------------------------

From: micha@mubo.saar.de (Michael Bongartz)
Subject: Re: ping doesn't work with 1.1.26
Date: Sun, 10 Jul 1994 17:51:04 GMT

On 9 Jul 1994 23:08:55 GMT in comp.os.linux.development, Robert G. Smith (rob@bip.anatomy.upenn.edu) wrote:
:   I had Slackware 2.0 with its tcpip.tgz distribution installed
: on several machines, using 1.1.24.  Very nice. Net stuff runs
: superbly (thanks to y'all who've worked hard on this!).  

:   When I updated to 1.1.26, the network stuff like ftp, rlogin, 
: telnet, rsh all work fine but ping returns with "0 packets received"
: when I ping any of the systems the system booted with 1.1.26.  

Get pl27.

Micha

-- 
            Life would be much easier, if we had its source code!

EMail:  micha@mubo.saar.de     /\/\     University:      bongartz@cs.uni-sb.de
Voice:  0681/556-54           /    \    Fax + Modem (ZyX 19k2): +49 681 556-34
SnailMail: Michael Bongartz,    Hohe Wacht 18,     66119 Saarbruecken, Germany

------------------------------

Crossposted-To: comp.os.linux.misc,comp.os.linux.help
From: tom@metronet.com (Tom Griffing)
Subject: Re: ?: free MOTIF clone ?
Date: Mon, 11 Jul 1994 05:12:11 GMT

In article <1994Jul10.092826.182@tora.robin.de>,
Steffen W. Schilke <sws@tora.RoBIN.de> wrote:
>Hi,
>
>I onces heard something about a free (share/PD/free-ware) MOTIF or a
>project which is working on something like that.
>
>Is there something like that (or at least planned) ?

I saw some clamor in news about it a while back ...
a project called "Notif" (as in NO MOTIF).  It was
to be a drop-in replacement for Motif at the API
level.

Some articles suggested that the amount of work was
grossly underestimated, and then I didn't see any
more articles.  Sounds like it fizzled out.

If anyone else knows differently, I would be interested
in knowing.


--
 _____________________________________________________
| Thomas L. Griffing       |                          |
| tom@metronet.com         |  (214) 352-3441          |
|__________________________|__________________________|

------------------------------

From: davidm@syd.dms.CSIRO.AU (David Monro)
Subject: Re: Kernels and atdisk2
Reply-To: davidm@syd.dms.CSIRO.AU (David Monro)
Date: Mon, 11 Jul 1994 01:38:34 GMT


In article <1994Jul8.120731.429@clio.demon.co.uk>, g@clio.demon.co.uk (Gareth Webber) writes:
|> Jason Zarin (jzarin@nyx10.cs.du.edu) wrote:
|> [stuff deleted]
|> 
|> : The fact that linux doesn't natively support more than one controller
|> : has always struck me as an oversight.
|> [sig removed]
|> 
|> Here here. Linus any chance of adding it in and while you're at it the
|> ide performance pathes (not with the funny interrupt thingy though).
|>
I recently posted to this group, and uploaded to sunsite and tsx-11, a combined
version of atdisk2 and IDE performance patches. Note that both the multimode
and funny interrupt are by default disabled, and can be enabled at run time
with a small utility provided with the patch, or some constants at the top
of hd.c and hd1.c can be changed. I think including them in the kernel would
be a great idea, since atdisk2 has been around since I can't remeber when, and
the performance patches make a big difference on my system at anyrate. I also
haven't had any trouble with them at all.

Big thanks to Mark Lord and Delman Lee for the patches!

By the way, what's wrong with the 'funny interrupt thingy' ? It has never
caused any problems for me, only improvements in performance.

David

|> gary...
|> 
|> -- 
|> Gareth Webber,                                          g@clio.demon.co.uk
|> Trinity Hall,                                                gpw1000@cus.cam.ac.uk
|> Cambridge.                                           gary@royle.org
|> 
|>                         "Ne te confudant illegitimi"

------------------------------

From: cas@muffin.apana.org.au (Craig Sanders)
Subject: Re: Swapping problems with VL-300 (aha152x driver) VLB SCSI controller (was: Re: Dedicated SCSI swap drive?)
Date: Sun, 10 Jul 1994 23:27:34 GMT

cas@muffin.apana.org.au (Craig Sanders) writes:

Something I forgot to mention...

> The MATSHITA CD-ROM is a Panasonic 501B single speed drive.  I also
> have some problems with this - listing the contents of many .tar.gz
> files on my Feb Infomagic Linux CD (especially tar files over 300K)
> often dies halfway through - tar reports that the archive is corrupted
> or that it has ended unexpectedly.  If i copy the file to, say, /tmp
> first and then examine it it still occurs.  This implies that either
> a) the files are corrupted in the first place (i don't think so
> because it is not 100% consistent as to which files have the errors)
> or b) there is a serious cd-rom read problem with either my 501B CD
> drive, or the vl-300 controller card, or the aha152x driver.

Sometimes I can get the bad tar file to list or extract properly just
by trying repeatedly.  First I have to clear the tar file out of the
buffer, though (e.g. by doing "du -s /usr/spool" or some other disk
operation which reads more data than the buffer size).  This is very
tedious and usually I don't bother.  Anyone know of any utility way to
quickly clear the buffer?

-- 
cas@muffin.apana.org.au

        "I am not now, nor have I ever been an American"
                                            --  kfelsche@metz.une.edu.au

------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: Linux-Development-Request@NEWS-DIGESTS.MIT.EDU

You can send mail to the entire list (and comp.os.linux.development) via:

    Internet: Linux-Development@NEWS-DIGESTS.MIT.EDU

Linux may be obtained via one of these FTP sites:
    nic.funet.fi				pub/OS/Linux
    tsx-11.mit.edu				pub/linux
    sunsite.unc.edu				pub/Linux

End of Linux-Development Digest
******************************
