Subject: Linux-Development Digest #832
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:     Wed, 15 Jun 94 11:13:14 EDT

Linux-Development Digest #832, Volume #1         Wed, 15 Jun 94 11:13:14 EDT

Contents:
  Re: assembly language & Linux (ATTN!) (Linus Torvalds)
  Re: beginners question to Xli (guy keren)
  Re: Why is Linux writing to Port 0x80? (Rob Janssen)
  Re: Mounting DOS in Linux (Rob Janssen)
  Re: PPP dial in problem (Rob Janssen)
  Re: IDE PERF. PATCH SECURITY HOLE (Frank Lofaro)
  Re: IDE PERF. PATCH SECURITY HOLE (Frank Lofaro)
  Re: problems with TCP connection - linux or solaris error? (Brandon S. Allbery)
  Graphics Format (Kevin Marcus)
  S3 and PEX (Howard P. Henson)
  Re: dosemu: pre51_26.tgz does not work with 1.1.19 (Michael Will)
  ethernet init (net_init.c) (Robert Story)
  Re: RARP Under Linux (Martin Spott)

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

From: torvalds@cc.Helsinki.FI (Linus Torvalds)
Subject: Re: assembly language & Linux (ATTN!)
Date: 15 Jun 1994 14:46:08 +0300

In article <2tk9ho$eio@bmerha64.bnr.ca>,
Hamish Macdonald <Hamish.Macdonald@bnr.ca> wrote:
>
>Alan> Its hard to avoid in many places. There isn't a c mapping for
>Alan> 'hardware task switch' nor a clean C output for other things
>Alan> like checksumming and a lot of the driver and fpu code which is
>Alan> also fundamentally non portable.
>
>There's a C mapping for 'hardware task switch'.  It's in the kernel
>and Linus has used it for a long time.  It's a macro called
>"switch_to".
>
>As for drivers and fpu code, I'm talking about the *portable* code in
>the kernel.  In any case (as I said before), when you *do* use
>assembler, abstract it out like Linus did with switch_to.

Any porters out there should feel happier knowing that DEC is shipping
me an AlphaPC that I intend to try getting linux running on: this will
definitely help flush out some of the most flagrant unportable stuff. 
The Alpha is much more different from the i386 than the 68k stuff is, so
it's likely to get most of the stuff fixed. 

I've generally tried to hide *most* of the assembly code in macros or
inline functions, but sometimes I'm lazy and then you end up with
explicit __asm__ stuff in the code (and sometimes I do count on
endianess, silly me). 

                Linus

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

From: choo@actcom.co.il (guy keren)
Subject: Re: beginners question to Xli
Date: Wed, 15 Jun 1994 00:03:43 GMT

Riku Saikkonen (riku.saikkonen@compart.fi) wrote:
: >gcc -ansi -O2 -m486 -o prog -lX11 main.c
: >/tmp/cca005581.o:  Undefined symbol _XOpenDisplay referenced from text segment

: Now, I'm not at all sure about this, but I remember I had the same
: problem with a small non-X program that needed libm. I fixed it by
: moving the -l to the end of the command line. I don't know why it should
: be there, but that seemed to fix it for me...

: So try:
: gcc -ansi -O2 -m486 -o prog main.c -lX11

: -=- Rjs -=- riku.saikkonen@compart.fi
: GCS/O -d+ p c++(+++) l++ u e m++@ s/- n+ h-- f+ !g w+ t(-) r !y(*)
: "Yet neither by wolf, nor by Balrog, nor by Dragon, would Morgoth
: have achieved his end, but for the treachery of Men." - J.R.R. Tolkien

Not that this is a Linux specific problem, but when you specify the -l flag,
you tell the compiler to "look for functions that were specified up to this
point on the command line", discarding any other functions of the library.
This means that if any source file name comes on the command line AFTER the
 -l flag, the compiler won't bother to look for the function in the previously
specified library.

guy keren 

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

From: rob@pe1chl.ampr.org (Rob Janssen)
Subject: Re: Why is Linux writing to Port 0x80?
Reply-To: pe1chl@rabo.nl
Date: Tue, 14 Jun 1994 22:16:31 GMT

In <2tkqs0INN2hi@vision.uccs.edu> news@vision.uccs.edu writes:

>Hi,
>I have a POST-card (Power On Self Test) installed in my Linux-box;
>it decodes and displays data written to port 80H, and during boot
>all sorts of stuff is displayed.  Even after boot, some commands,
>like 'ls' spew data to the port.

>Currently, I'm running Linux 1.0.4; but this phenomena was present
>in 0.99 pl 10, too.

>Is this an undocumented feature for hardware debugging?  :-)

output to port 80H is used as a small delay in the kernel, when devices
cannot handle back-to-back accesses.  the value written is garbage.
(the comment says that port 80H does not exist, and indeed it doesn't
exist in the 'specs' of an ISA PC.  no card is supposed to use ports
below 100H, which are reserved for motherboard use)

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

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

From: rob@pe1chl.ampr.org (Rob Janssen)
Subject: Re: Mounting DOS in Linux
Reply-To: pe1chl@rabo.nl
Date: Tue, 14 Jun 1994 22:19:20 GMT

In <1994Jun14.094903.18839@pertron.central.de> karl@pertron.central.de (Karl Eichwalder) writes:

>Karl Eichwalder (karl@pertron.central.de) wrote:

>Sorry, I have forgotten to mention I'm running 1.1.18.

>> >    /dev/hda1       /dos    msdos   defaults

>> Any clue, why other options like 

>>         conv=auto,uid=405,gid=50,umask=027

>> want work anymore since 0.99.1[45] ?

>Please read: "... don't want to work anymore ..."

I use "uid=103,gid=101,umask=022,quiet" and it works ok.
(I think conv=auto isn't a good idea, maybe it has been dropped?)

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

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

From: rob@pe1chl.ampr.org (Rob Janssen)
Subject: Re: PPP dial in problem
Reply-To: pe1chl@rabo.nl
Date: Tue, 14 Jun 1994 22:25:39 GMT

In <CrDxD3.IH3@news.tudelft.nl> nash@dutllu4.gmd.de (Naresh Sharma) writes:

>Hi,
>My dial-in connection is composed of two steps.

>1. I dial the host, and authenticate myself, then the host disconnects.
>2. The host dials me back, I reauthenticate myself, and login in. At this stage
>   I can start a ppp, slip or a single tty session.

>I can successfully start the pppd daemon, after loging  myself in by any comm
>program. If I use chat or dip, the script flakes out on the connection as soon
>as the connection is broken. I dont know enough about expect or chat to correct
>this. I'd like to log-into my host without using umpteen different comm 
>programs.

I once fixed DIP so it could handle this situation.  I submitted the
patches to Uri, but I don't know if the version he currently distributes
has them included.  Try DIP-3.3.7-Uri

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

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

From: ftlofaro@unlv.edu (Frank Lofaro)
Subject: Re: IDE PERF. PATCH SECURITY HOLE
Date: Tue, 14 Jun 94 17:44:53 GMT

In article <2tiaaf$e61@bmerha64.bnr.ca> mlord@bnr.ca (Mark Lord) writes:
>In article <1994Jun12.203822.15133@unlv.edu> ftlofaro@unlv.edu writes:
>>The IDE performance patch has a serious security hole!  ANY USER can
>>set the multiple mode and irq unmasking if they have access to the
>>drive. Even if it is ONLY READ-ONLY access to one partition.
>
>Huh?  To do this your /dev/hd* devices would have to already be readable
>to everyone.. that in itself is a huge security hole.  Fix it, and nobody
>(other than root) will be able to use hdparm either.
>

If I give a user read-only access to ANY partition on the drive (lets
say I let them look at a partition with no secure data on it so they
can learn about FS structure or to write and test an e2fs version of
dump, for example), they can set stuff without root. If I let them
look at /dev/hda2, they can mess the settings for /dev/hda (and thus
cause /dev/hda to get blown away if anything is writing there)

>>I have a Seagate 1239A (a total piece of crap), and a Samsung drive.
>>The Samsung works fine with the IDE patch, but the Seagate trashes
>>file systems badly if ANY IDE performance features are enabled. Now if
>>a user has even read-only access to any partition on /dev/hda (the
>>Seagate), they can trash all the filesystems there. NOT GOOD.
>
>Eh?  This is something I'd like to know more about.  If the filesystems
>on the device are mounted read-only, then there's no way for hdparm to 
>trash them.  Even enabling the various performance enhancements should not
>be capable of trashing anything on the drive when mounted read-only.
>

No, the corruption occurs only on writing. But if a user with
read-only access to, for example, /dev/hda2, uses that to turn on
multiple mode and/or irq unmasking on my crappy Seagate, the
filesystems (which are mounted read-write) can blown up.

BTW, the auto-recovery logic DOES NOT WORK on the Seagate 1239A. If I
turn on any features, and write to the drive, the FS is trashed, even
if I turn off all the features then sync and reboot.

NO ONE BUY A SEAGATE 1239A. ITS CRAP! (it even got bad sectors, yeah,
on an IDE drive (!), after only one year!)

>Linux may *think* the filesystem is trash, but rebooting with the perf features
>off will cure the temporary insanity.
>-- 
>mlord@bnr.ca   Mark Lord       BNR Ottawa,Canada       613-763-7482


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

From: ftlofaro@unlv.edu (Frank Lofaro)
Subject: Re: IDE PERF. PATCH SECURITY HOLE
Date: Tue, 14 Jun 94 17:53:59 GMT

In article <2tj4r0$mqv@crcnis1.unl.edu> jepler@herbie.unl.edu (Jeff Epler) writes:
>lilo@slip-9-8.ots.utexas.edu (Dances With Geeks) writes:
>
>>On 13 Jun 1994 18:59:27 GMT, Mark Lord (mlord@bnr.ca) wrote:
>
>>> >file systems badly if ANY IDE performance features are enabled. Now if
>>> >a user has even read-only access to any partition on /dev/hda (the
>>> >Seagate), they can trash all the filesystems there. NOT GOOD.
>
>>> Eh?  This is something I'd like to know more about.  If the filesystems
>>> on the device are mounted read-only, then there's no way for hdparm to 
>>> trash them.  Even enabling the various performance enhancements should not
>>> be capable of trashing anything on the drive when mounted read-only.
>
>>He doesn't seem to be talking about having the partition MOUNTED read-only,
>>he seems to be talking about the user having access to the DEVICE entry
>>read-only, which would not be the same thing, of course....
>
>Having hard-drive partitions (or the whole device) world (or group)
>readable might still be a bad idea.
>
>Now, I can read /etc/shadow, /usr/spool/mail/luser, or whatever, or
>even
>strings < /dev/hda |less
>if I just want to browse random stuff.
>
>Is there a good reason to have the hard drive readable by those you
>can't trust to not screw you with hdparm?
>
>Jeff

What if the person you don't trust is yourself? :)
Seriously, I have my user account having read-access, but only want my
root account to do anything dangerous. Keeps me from screwing up my 
system any more than I have already. :)

Also look at my other post where I suggest a reason for giving a user read 
only access to just ONE partition. hdparm /dev/hda2 will work if you 
have read-only access to /dev/hda2. It affects the whole drive, of course.



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

From: bsa@kf8nh.wariat.org (Brandon S. Allbery)
Subject: Re: problems with TCP connection - linux or solaris error?
Date: Wed, 15 Jun 1994 00:06:58 GMT

In article <Jun.14.18.38.32.1994.10340@geneva.rutgers.edu>, hedrick@geneva.rutgers.edu (Charles Hedrick) says:
+---------------
| In the example that fails, data is sent with the SYN.  In the example
| that works it is not.  I conjecture that Linux does not properly
| process a segment that has both a SYN and data.  It's uncommon to
| combine these.  (Solaris is the only system I've seen that does.)
+------------->8

I think you've got it exactly backwards.  Solaris, like all STREAMS-based
TCP/IP implementations, does not support SYN+data piggybacking:  until the
connection parameters have been negotiated, the TLI state machine doesn't know
how large a buffer to use on receive or how much data it can safely send.
BSD-derived TCP/IP implementations, on the other hand, routinely use SYN+data
piggybacking on the assumption that the receive buffer on the other side will
have some "reasonable" minimum size.

Linux's TCP/IP is not BSD-derived, but supports SYN+data piggybacking.
STREAMS-based TCP/IP stacks will reject piggybacked SYN packets because the
window size for the data portion isn't known until the SYN has been processed
--- but the SYN is never seen, as the packet is rejected before the flags are
processed.

| It's dangerous because at the time you sent the SYN you have no way of
| knowing what the window or segment size is at the other end, so you
+------------->8

This is why STREAMS TCP/IP (and a few other implementations I know of, notably
the amateur radio MSYS TCP/IP stack) don't accept piggybacking.  The amateur
radio NOS software has an option to enable or disable piggybacking, intended
for use with MSYS but also useful with Solaris 2.x.

Your post implies that Solaris 2 *sends* piggybacked data.  Since it doesn't
accept it, I find that a bit strange; but, as much as I like System V, it
sometimes does get a bit strange around the edges... and more so when Sun's
gotten its hands on it.  :-)

++Brandon
-- 
Brandon S. Allbery         kf8nh@kf8nh.ampr.org          bsa@kf8nh.wariat.org
The FUDs at Microsoft are shouting "Kill The Wabi!"

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

From: datadec@ucrengr.ucr.edu (Kevin Marcus)
Subject: Graphics Format
Date: 15 Jun 1994 06:47:08 GMT

Well, I tried on comp.graphics and didn't get anything too promising.
Since there is a thread going on linux game development, I figured I might
as well try here:

Does anyone know how the .PIX format goes?  Like any headers for it and
the data representation?  Archie doesn't pull up anything useful, and I
gophered around a bit without finding much of value, either.

If there a simple format and/or editor that has already been developed to
allow someone to draw images and then grab them, save them, and read them
in later?

I know about the svgalib routines to grab images and whatnot, but then I
would have to write my own editor, which I don't particularily want to do.

Any suggestions?

I'm talkin more of an icon editor, I guess.



-- 
  --=> Kevin Marcus:   datadec@ucrengr.ucr.edu,  tck@bend.ucsd.edu
  "ciafn  syoo,u  yroeua da rteh icso?o l ." <- Email for solution. 
  Computer  Science  Dept.,  University of California,  Riverside.
  .oOo.oOo.           T H I E V E S     S U C K          .oOo.oOo.

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

From: hhenson@inyanga.cs.wits.ac.za (Howard P. Henson)
Subject: S3 and PEX
Date: 15 Jun 1994 15:29:45 GMT

Hi

I have the Slackware 1.2.0 distribution of Linux and wanted to rebuild 
the server to include the PEX extentions, I completely installed the XD 
disk sets which is supposed to allow me to rebuild my server.

No such luck, it says I am missing all kinds of things.
Has anyone rebuild thier servers to include the PEX extentions? And more 
importantly how do I do it, what more do I need?

Thanks
Howard

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~                   Rotating the object by                                 ~
~          Howard Henson <hhenson@inyanga.cs.wits.ac.za>                   ~
~           mans quest for object orientaion ends here!                    ~
~                                                                          ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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

From: zxmgv07@studserv.zdv.uni-tuebingen.de (Michael Will)
Subject: Re: dosemu: pre51_26.tgz does not work with 1.1.19
Date: 15 Jun 94 06:24:27 GMT

In <CrE01J.C4M@world.std.com> tgc@world.std.com (Terry Carlin) writes:
>: ERROR: par dead: cannot open configuration files!
>: leavedos(0) called - shutting down
>: ERROR: signal 11 received in leavedos()
>---DUMP Deleted -------
Which is a pity because after a few lines I say that I noticed that
I had to copy the config-file to /etc/dosemu.conf, and provided another
one where it says it loads it all right with 0 parsing errors, but
dies soon after, and there I have no clue, despite my stracing the thing.

>This is not in the README.  I found it in the source code.  Just
>grep'd for "cannot open configuration files" and found it.
There is a notice in the QuickStart-file that /etc/dosemu/config has
been moved to /etc/dosemu.conf, but I was reading to fast over the
file since I read it already so often in the other packages :-)

Here again some commented [in brackets] strace-output:

stat("/tmp/dosem03606aaa", 0xbffffbe8) = -1 (No such file or directory)
[here it seems to simply try if the tmpfile already exists, but now: ?]

brk(113518) = 0x113518
brk(114000) = 0x114000
brk(115000) = 0x115000
scno out of range: 126
indir(Bogus syscall: 1134592
) = 0
[what is this bogus-syscall, a problem?]

sync() = 0
brk(116000) = 0x116000
[I got no /etc/locale or /usr/lib/locale]

stat("/etc/locale/C/libc.cat", 0xbffff7ec) = -1 (No such file or directory)
stat("/usr/lib/locale/C/libc.cat", 0xbffff7ec) = -1 (No such file or directory)
stat("/usr/lib/locale/libc/C", 0xbffff7ec) = -1 (No such file or directory)
open("/root/.dosrc", RDONLY, 666) = 3
fstat(3, [dev 8 2 ino 37147 nlnks 1 ...]) = 0
brk(117000) = 0x117000
read(3, "# Linux dosemu 0.51 configuratio".., 1024) = 1024

[now it reaeds the configuration and seems to be satisfied...]

after making the tmp-directory, soon there come more of the bogus syscalls 
brk(129000) = 0x129000
scno out of range: 117
indir(Bogus syscall: 1216512
) = 512
scno out of range: 117
indir(Bogus syscall: 1216512
) = 513

thereafter it opens /dev/fd0 and gets into trouble:
open("/dev/fd0", RDWR|RDWR, 0) = 6
ioctl(6, 0x3, 0xbffffc48) = 0
ioctl(6, 0x5, 0) = 0
socket(PF_INET, DGRAM, IPPROTO_IP) = 7
ioctl(7, 0x8927, 0xbffffc24) = -1 (No such device)
close(7) = 0
socket(PF_INET, DGRAM, IPPROTO_IP) = 7
ioctl(7, 0x8921, 0xbffffc20) = -1 (No such device)
close(7) = 0
lseek(6, 0, SET) = 0
read(6, "\eb<\90MSDOS5.0\0\2\1\1\0\2\e0\0@\b\f0\t\0\12\0\2\0\0\0\0\0".., 512) = 
512
close(6) = 0
setitimer(ITIMER_REAL, {{0,9157},{0,9157}}, (struct itimerval *)0) = 0
write(2, "SERIAL $Header: /home/src/dosemu".., 92SERIAL $Header: /home/src/dosem
u0.52/RCS/serial.c,v 2.1 1994/06/12 23:15:37 root Exp root $
) = 92
vm86(0x200af000 - [SIGSEGV]
write(2, "general protection cd\n", 22general protection cd
) = 22

...and it dumps to the screen. (no core-dump, though).

Now, any ideas?

Cheers, Michael Will

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

From: rstory@crl.com (Robert Story)
Subject: ethernet init (net_init.c)
Date: Tue, 14 Jun 1994 21:44:14 -0500

Kernel = 1.1.18

I'm having problems getting ethernet to work.  There are not messages at
startup about a search for ethernet cards.  I started checking around in
the source, and was looking through linux/drivers/net/net_init.c.  It
apparently has two options in net_dev_init : CONFIG_LANCE and CONFIG_PI. 
If neither of these are defined, it doesn't do anything.  CONFIG_LANCE is
an option give in make config, but a grep for CONFIG_PI doesn't find it
anywhere...  Should I configure CONFIG_LANCE, even though I don't want
"AT1500 and NE2100 (LANCE and PCnet-ISA) support"?  I have CONFIG_NE2000
set...  any help greatly appreciated..

-- 
|   Robert Story    |  Atlanta, Georgia  |#include <std/disclaimer.h>|
|  rstory@crl.com   |     Go Braves!     |    War Damn Eagle! '90    |

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

From: sk001sp@unidui.uni-duisburg.de (Martin Spott)
Subject: Re: RARP Under Linux
Date: 15 Jun 1994 07:23:52 GMT

: I am wondering if anyone can give me concise information on how to use
: RARP under Linux.   The questions i need answered are :

:         Which Kernel do I need ? ( >1.1.13 I assume)
:         How do I get a machines IP at boot time ?

: Replies Via EMAIL ONLY please.

I think this is of general interest, so please dont't EMail only !

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


** 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
******************************
