Linux-Development-Sys Digest #25, Volume #7 Fri, 6 Aug 99 01:13:56 EDT
Contents:
Re: Linux API, Libraries (Tristan Wibberley)
Re: Rewriting Linux ..... (Erik de Castro Lopo)
shared libraries & segmentation faults ("ajb")
Re: Rewriting Linux ..... (Torbjorn Tallroth)
GDK (Adam Meyerowitz)
Re: user process space (M van Oosterhout)
Re: Rewriting Linux ..... (M van Oosterhout)
Re: unique machine ID for Linux on ix86 platform? (Andreas Dilger)
Re: bzip2 compressed kernel (H. Peter Anvin)
Re: unique machine ID for Linux on ix86 platform? (Christopher B. Browne)
Re: miximal mount count (Christopher Browne)
Re: java compiler (Timothy Murphy)
Re: HP CD-RW Supported by RH 6.0? (Keith Wright)
Re: unique machine ID for Linux on ix86 platform? (Keith Wright)
Re: Linux API, Libraries (Frank Sweetser)
Re: unique machine ID for Linux on ix86 platform? (Frank Sweetser)
Re: does egcs 1.1.2 produce stable kernels? (Paul Kimoto)
----------------------------------------------------------------------------
From: Tristan Wibberley <[EMAIL PROTECTED]>
Subject: Re: Linux API, Libraries
Date: Wed, 04 Aug 1999 22:58:33 +0100
Reply-To: [EMAIL PROTECTED]
Tristan Wibberley wrote:
> A book on UNIX programming would be a good place to start. There are
> minor differences. When you have a specific task that needs solving (and
> you don't know what to do) ask for advice on comp.os.development.system,
^^^^^^^^^^^^^^^^^^
Sorry, typo. Should be: comp.os.linux.development.apps
> also browse freshmeat.net for libraries which might help.
--
Tristan Wibberley
------------------------------
From: Erik de Castro Lopo <[EMAIL PROTECTED]>
Subject: Re: Rewriting Linux .....
Date: Fri, 06 Aug 1999 10:25:02 +1000
Indigo news wrote:
>
> hi,
> I was just wondering if anyone here was interested in trying to port linux
> from a monolithic kernel to a micro kernel. This sounds like a really big
> thing, but hopefully, with a bit of work, it should be possible to allow the
> execution of programs that were designed for the monolithic approach.
Before you embark on this project I suggest you do a bit of research.
Firstly read the full discussion Linus had with Andrew Tannenbaum (sp?)
about the pros and cons of monolithic vs micro-kernels :
http://www.dina.kvl.dk/%7Eabraham/Linus_vs_Tanenbaum.html
This argument took place some time ago and Linux has since added
loadable
kernel modules which is bascially what micro-kernels are all about.
Then look into the GNU Hurd project, a micro-kernel OS being put
together
by the FSF :
http://www.gnu.org/software/hurd/hurd.html
You may want to join that project instead of starting a new one.
Erik
--
+-------------------------------------------------+
Erik de Castro Lopo [EMAIL PROTECTED]
+-------------------------------------------------+
"Windows was created to keep stupid people away from UNIX."
-- Tom Christiansen
------------------------------
From: "ajb" <[EMAIL PROTECTED]>
Subject: shared libraries & segmentation faults
Date: Thu, 5 Aug 1999 16:06:51 -0600
Hi all,
I've been stuck on a problem for a while, and thought I'd throw this out to
see if anyone can see anything that they recognize. Hopefully this will
look familiar to someone. I'd appreciate any help you could give me. I can
give more details, if necessary.
ajb
=======
I wrote a test shared library which implements (among other things)
CreateThread and portions of WaitForSingleObject.
I wrote another program which essentially does this:
main()
{
hThread = CreateThread(..., myThreadFunc, ...);
WaitForSingleObject(hThread); // <- segmentation fault happens within this
function
}
So I have two files, libtest.so and testapp, which uses the library.
My implementation of CreateThread calls pthread_create() and my
implementation of WaitForSingleObject (WFSO) calls pthread_join(). However,
it gives me a Segmentation fault when I call pthread_join. I have verified
that CreateThread() and pthread_create() _do_ work and my thread _does_ get
created.
Strange thing is, when I call CreateThread from testapp and then comment out
WFSO and call pthread_join from testapp instead of from my shared library,
everything works fine. So I'm guessing that something isn't linked
correctly into my shared library. Only problem with that theory is that
pthread_create works from within the shared library and pthread_join
doesn't. Also, pthread_cond_wait causes a segmentation fault very similar
to the pthread_join.
Here's what my stack dump looks like after the segmentation fault:
#0 strcmp (p1=0x4001951d "libpthread.so.0", p2=0x0) at
../sysdeps/generic/strcmp.c:39
#1 0x40007a15 in _dl_lookup_versioned_symbol (undef_name=0x4001967a
"pthread_join", ref=0xbffffbd0, symbol_scope=0x40013894,
reference_name=0x40013678 "/usr/lib/libtest.so.0", version=0x4014c5a0,
reloc_type=7) at ../elf/ldsodfs.h:91
#2 0x40009cfa in fixup (l=0x40013690, reloc_offset=0) at dl-runtime.c:75
#3 0x40009e70 in _dl_runtime_resolve () at dl-runtime.c:170
#4 0x4001a012 in WaitForSingleObject (hHandle=0x8049870, dwMilliseconds=0)
at libtest.c:222
------------------------------
Date: Fri, 6 Aug 1999 02:06:05 +0200
From: Torbjorn Tallroth <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Re: Rewriting Linux .....
On Fri, 6 Aug 1999, Indigo news wrote:
> I was just wondering if anyone here was interested in trying to port linux
> from a monolithic kernel to a micro kernel. This sounds like a really big
> thing, but hopefully, with a bit of work, it should be possible to allow the
> execution of programs that were designed for the monolithic approach.
I've been thinking about it for one reason: To save some recompilations.
But thinking is one thing and doing is another...
--
tth
------------------------------
From: Adam Meyerowitz <[EMAIL PROTECTED]>
Subject: GDK
Date: Fri, 06 Aug 1999 01:22:14 GMT
Maybe someone could clear this up. I've been taking a look at GDK but
read conflicting things. How is GDK related to IMLIB. I've seen
GDK, GDK-Imlib, GDK+. Whats the story. Is there any docs available
for GDK.
Thanks
Adam
------------------------------
Date: Fri, 06 Aug 1999 11:03:11 +1000
From: M van Oosterhout <[EMAIL PROTECTED]>
Subject: Re: user process space
Ann Chen wrote:
>
> We are trying to develop driver that enables direct DMA from and to
> user space. In order to do so, I think we need the physical address of
> the entire user process space. Does anybody know a way to get the
> physical address of the end of kernel memory, the start of the user
> memory, and the end of the user memory?? It would be very helpful for us
> to ensure that our DMA engine doesn't write over the linux operating
> system. Thanks in advance for you help.
There is no 'end of kernel memory'. The kernel is loaded into the first
2Mb or so and any dynamic memory is allocated after that. User space
memory is also allocated from that pool.
If you want to DMA to user space, allocate some memory is the kernel
and allow user programs to mmap() it. That way you are DMAing to kernel
space and you don't have to worry about the memory being swapped out,
the
process dying on you, or any other the other things that could go wrong.
This is a FAQ by the way.
Martijn van Oosterhout
Australia
------------------------------
Date: Fri, 06 Aug 1999 10:58:00 +1000
From: M van Oosterhout <[EMAIL PROTECTED]>
Subject: Re: Rewriting Linux .....
Indigo news wrote:
>
> hi,
> I was just wondering if anyone here was interested in trying to port linux
> from a monolithic kernel to a micro kernel. This sounds like a really big
> thing, but hopefully, with a bit of work, it should be possible to allow the
> execution of programs that were designed for the monolithic approach.
There was a famous discussion between Tanenbaum and Linus a few
years back, with Tanenbaum arguing the merits of micro-kernels.
Basically, WHY do you want a microkernel?
Microkernels are not intrinsically any better than monolithic kernels.
Anything can be done in either.
Also, programs do not care whether the kernel is micro or monolithic.
It's called an implementation specific detail.
Martijn van Oosterhout
Australia
------------------------------
From: [EMAIL PROTECTED] (Andreas Dilger)
Subject: Re: unique machine ID for Linux on ix86 platform?
Date: 6 Aug 1999 00:53:19 GMT
In article <[EMAIL PROTECTED]>,
Eric Hegstrom <[EMAIL PROTECTED]> wrote:
>Well, how about having a license server on some sort of "secure"
>(meaning trusted and controlled access) machine on the internal company
>network. This license server could then validate requests from machines
>running this software. Are there any free license server packages out
>there?
>
>Wouldn't this be considered a technical solution?
It would be a technical solution that wouldn't prevent someone from
abusing the software.
With Linux, you have to trust the users, as it's almost impossible to
have a "node locked license", because you can ALWAYS change the kernel
to return a different MAC address, or "fake" a call to a remote system
for authentication. The only real secure way would be to have important
parts of the application NOT RUN ON THE LOCAL SYSTEM. This would be a
kind of "client-server security", which could be done with Sun RPC, or
even better, DCE, which was designed for this type of application.
In the end, it is better just to give the code to people you trust, or
have them sign an NDA, or bank on good human nature. Most applications
these days don't have such hassles because it costs more to handle the
administrative problems that it does to lose some sales to "pirates".
Cheers, Andreas
--
Andreas Dilger University of Calgary \"If a man ate a pound of pasta and
Micronet Research Group \ a pound of antipasto, would they
Dept of Electrical & Computer Engineering \ cancel out, leaving him still
http://www-mddsp.enel.ucalgary.ca/People/adilger/ hungry?" -- Dogbert
------------------------------
From: [EMAIL PROTECTED] (H. Peter Anvin)
Subject: Re: bzip2 compressed kernel
Date: 6 Aug 1999 01:50:37 GMT
Reply-To: [EMAIL PROTECTED] (H. Peter Anvin)
Followup to: <7obnmg$912$[EMAIL PROTECTED]>
By author: [EMAIL PROTECTED] (Martin Boening)
In newsgroup: comp.os.linux.development.system
>
> Hi there,
>
> [EMAIL PROTECTED] (Horst von Brand) writes:
>
> >On 4 Aug 1999 19:01:54 GMT, Matthias Kilian <[EMAIL PROTECTED]> wrote:
> >>Is there anyone who has the time to patch the kernel to use bzip2 instead of
> >>gzip compression algorithms? This would be a nice feature for building
> >>one-floppy rescue systems.
>
> >Noone. bzip2 needs _at least_ 900Kb to uncompress, and when booting you've
> >got the fabled 640Kb to work with, minus whatever BIOS uses, and the memory
> >for the bootloader, etc.
>
> >I believe somebody did the exercise and it turned out that what you win by
> >compressing the kernel you loose by larger uncompressing code :-)
>
> Huh? Just recently I upgraded the kernel on my K6-III based system to
> 2.2.10. The system is based on Slackware 4.0.0. Weirdly enough, it barfed
> at 'make zlilo' with 'kernel too large - try make bzlilo to use bzip' or
> something similar... even though most everything is modularized. Oh, well,
> so i did a make bzlilo - and what do you know: the kernel is now compressed
> using bzip or at least the bzip algorithm and it boots just fine.
>
> So, unless its all a forgery, Patrick Volkerdinck HAS created bzip-
> compressed kernel images.
>
bzImage has nothing to do with bzip. b = big.
-hpa
--
<[EMAIL PROTECTED]> at work, <[EMAIL PROTECTED]> in private!
------------------------------
From: [EMAIL PROTECTED] (Christopher B. Browne)
Subject: Re: unique machine ID for Linux on ix86 platform?
Reply-To: [EMAIL PROTECTED]
Date: Fri, 06 Aug 1999 02:44:43 GMT
On Thu, 05 Aug 1999 14:10:03 GMT, Stuart R. Fuller
<[EMAIL PROTECTED]> posted:
>Remco van den Berg ([EMAIL PROTECTED]) wrote:
>: Are there any solutions known for getting an unique system ID from Linux
>: machine on an ix86 architecture?
>:
>: I want to distribute some software with some security such that the software
>: can only run on a certain machine.
>
>You license the software to run on a specific machine, and have a team of
>lawyers to back it up.
Better: License the customer to use the *CLIENT,* and have them do a
network connection, perhaps using some secure protocol such as SSL, to
the server sitting in your machine room.
The server software resides on your premises, and the customer never
has access to any of the server software so as to be able to make
copies, reverse engineer, or otherwise "attack."
If you can't trust the customers without having a pack of lawyers,
then providing them with CORBA IDL to allow them to build clients to
connect to the servers that sit well protected behind your firewall is
The Right Answer.
But it's disappointing to have customers that are such a pack of
cheating dishonest thieves that they won't act honestly...
--
"The wrath of Holloway is nothing compared to the wrath of Moon."
-- Fred Drenckhahn
[EMAIL PROTECTED] <http://www.hex.net/~cbbrowne/lsf.html>
------------------------------
From: [EMAIL PROTECTED] (Christopher Browne)
Subject: Re: miximal mount count
Reply-To: [EMAIL PROTECTED]
Date: Fri, 06 Aug 1999 02:31:26 GMT
On 5 Aug 1999 21:28:29 GMT, Yung-Hsiang Lu
<[EMAIL PROTECTED]> wrote:
>What does "/dev/hda1 has reached maximal mount count check forced"
>mean at machine booting?
What this means is that every tenth time (configurable) that you boot
Linux, it will run the "e2fsck" utility that corresponds somewhat to
the Windows "scandisk." It checks to make sure your filesystems are
in good order. It's good; it's safe; be happy...
>It seems that this is related the following message "...%
>non-contiguous". How does this happen? Is this bad? How to prevent
>it from happening?
This happens when you've written out enough files and gotten the
filesystem full enough that some files are not laid out in a
contiguous manner.
If there were a *LOT* of these (e.g. - the percentage is very high),
this would indicate that the filesystem was getting fragmented, which
might reduce performance somewhat.
ext2 copes with fragmentation pretty well; it is not DOS FAT, which
suffers *BADLY* when a filesystem gets fragmented.
It's more likely that the percentage is pretty small, maybe a few
percent, or perhaps even a fraction of a percent. There will always
be a value; it would only be worthy of concern if it becomes a fairly
large figure, say, on the order of 20%. If the value isn't high,
don't worry about it.
--
It is interesting to note that before the advent of Microsoft Windows,
`GPF' was better known for its usage in plumbing: "Gallons Per Flush"
-- [EMAIL PROTECTED] (Dean Edmonds)
[EMAIL PROTECTED] <http://www.ntlug.org/~cbbrowne/lsf.html>
------------------------------
From: [EMAIL PROTECTED] (Timothy Murphy)
Subject: Re: java compiler
Date: 5 Aug 1999 00:46:38 +0100
Jonathan Geach <[EMAIL PROTECTED]> writes:
>RH6 actually comes with kaffe, I don't really like it though, but it is already
>on the cd if you want it. If you are serious though, use IBM's JDK.
>http://alphaworks.ibm.com
This is slightly misleading.
For the standard Linux Java compiler, see http://www.blackdown.org/ .
--
Timothy Murphy
e-mail: [EMAIL PROTECTED]
tel: +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
------------------------------
From: Keith Wright <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.misc
Subject: Re: HP CD-RW Supported by RH 6.0?
Date: 05 Aug 1999 23:35:39 -0400
Richard Scobie <[EMAIL PROTECTED]> writes:
> [EMAIL PROTECTED] wrote:
> >
> > Yes, but HOW, do you pass the "hdx=ide-scsi" to Lilo?
> > I put the line in the lilo.conf, but whenever I try to run lilo
> > I get a Syntax error near line 12 in file /etc/lilo.conf
>
> Hi Mark,
>
> Possibly the line;
>
> appenrd = "hdc=ide-scsi"
>
> in your lilo.conf, may help.
But it might be even better to spell "append" correctly.
The real solution to this and similar problems is 'man lilo.conf'.
--
-- Keith Wright <[EMAIL PROTECTED]>
Programmer in Chief, Free Computer Shop <http://www.free-comp-shop.com>
--- Food, Shelter, Source code. ---
------------------------------
From: Keith Wright <[EMAIL PROTECTED]>
Subject: Re: unique machine ID for Linux on ix86 platform?
Date: 05 Aug 1999 23:48:26 -0400
[EMAIL PROTECTED] (Stew Benedict) writes:
> Isn't this what the hostid command gives you? I know I just beta'd some
> software that used this.
But root can change hostid. If the users don't have root access then
the problem is trivial, just don't give them permission to read the
program.
--
-- Keith Wright <[EMAIL PROTECTED]>
Programmer in Chief, Free Computer Shop <http://www.free-comp-shop.com>
--- Food, Shelter, Source code. ---
------------------------------
From: Frank Sweetser <[EMAIL PROTECTED]>
Subject: Re: Linux API, Libraries
Date: 06 Aug 1999 00:18:07 -0400
mtrausch@debian. (Michael B. Trausch) writes:
> Hi,
>
> I am a technican and I work with installing and supporting
> Linux. I'm looking to learn to program, other than writing
> QuickBASIC code and shell scripts. I would like to learn
> C/C++, and in addition to that, the Linux API, and libraries
> that are popularly used.
http://www.ora.com is your friend.
i've had good experiences with the Learning Linux book and Unix System
Administrator's Guide for the admin side, and the Practical C and Practical
C++ books for the programming side. i also highly reccomend learning perl
- the Programming Perl, and later Advanced Perl programming and the Perl
Cookbook are all excellent. also good is just about anything authored by
W. Richard Stephens [sp?], and (IIR the title correctly) Linux Applications
Programming, authored by a couple of people from RedHat.
--
Frank Sweetser rasmusin at wpi.edu fsweetser at blee.net | PGP key available
paramount.ind.wpi.edu RedHat 5.2 kernel 2.2.5 i586 | at public servers
It's a brave man who, when things are at their darkest, can kick back and
party!
-- Dennis Quaid, "Inner Space"
------------------------------
From: Frank Sweetser <[EMAIL PROTECTED]>
Subject: Re: unique machine ID for Linux on ix86 platform?
Date: 06 Aug 1999 00:20:18 -0400
[EMAIL PROTECTED] (Jens Kristian S�gaard) writes:
> [EMAIL PROTECTED] (Remco van den Berg) writes:
>
> > > - tying software to an Ethernet address fails when the Ethernet
> > > address changes (newer faster card, broken card, etc).
>
> > I think the Ethernet MAC address could be an option, but isn't it possible
> > to change that too?
>
> He already mentioned MAC-addresses. And yes, on some (more expensive)
> NIC's, you can alter the MAC-adress from software.
not true. i'm fairly certain that any NIC out there can be told what MAC
address to put on the wire. and regardless, the software doesn't talk to
the NIC to get it's address, it asks the kernel nicely what the address
is.
and don't forget - what about machines w/out a NIC, ie, PPP only? or ones
with multiple NIC's?
--
Frank Sweetser rasmusin at wpi.edu fsweetser at blee.net | PGP key available
paramount.ind.wpi.edu RedHat 5.2 kernel 2.2.5 i586 | at public servers
It's a brave man who, when things are at their darkest, can kick back and
party!
-- Dennis Quaid, "Inner Space"
------------------------------
From: [EMAIL PROTECTED] (Paul Kimoto)
Subject: Re: does egcs 1.1.2 produce stable kernels?
Date: 5 Aug 1999 23:37:30 -0500
Reply-To: [EMAIL PROTECTED]
In article <[EMAIL PROTECTED]>, Klamer Schutte wrote:
> Erik de Castro Lopo wrote:
>> The problems
>> with using EGCS were specific to earlier kernels.
> Is this also true for newer egcs (like gcc 2.95?) I found the wordings
> in the announcement (and the FAQ) quite scary -- esp. the aliasing part.
If you are talking about the "-fno-strict-aliasing" part,
the most recent kernel Makefiles will detect whether your
version of gcc knows about that flag, and add it
automagically. (You can check to see whether it is there
during the compilation.)
--
Paul Kimoto <[EMAIL PROTECTED]>
------------------------------
** 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: [EMAIL PROTECTED]
You can send mail to the entire list (and comp.os.linux.development.system) via:
Internet: [EMAIL PROTECTED]
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Development-System Digest
******************************