Linux-Development-Sys Digest #748, Volume #7      Thu, 6 Apr 00 20:14:31 EDT

Contents:
  Re: PCI configuration space fun. (Grant Edwards)
  problem of error msg in linux / and sharing in samba . Urgent thx ! ("Bass���v")
  Re: PCI configuration space fun. (Bryan Hackney)
  Re: PCI configuration space fun. (Grant Edwards)
  Re: To core or not to core - Part 2 (Chris Wareham)
  glibc libraries (James Nugent)
  Re: glibc libraries (Kaz Kylheku)
  Re: glibc libraries (Paul Kimoto)
  Re: PCI configuration space fun. (Bryan Hackney)
  Re: porting WIN32 to UNIX (Linux) ([EMAIL PROTECTED])
  Root Passwords ("2 Bit Unix, Inc.")
  Re: porting WIN32 to UNIX (Linux) (Kaz Kylheku)
  Re: To core or not to core - Part 2 ("rob")
  Re: excepitons in signalhandler (Nix)
  kernel questions (Doug Schulz)
  keyboard internal state? ([EMAIL PROTECTED])
  Re: Overrunning the stack (Juergen Heinzl)
  Re: Overrunning the stack (Kaz Kylheku)
  Re: Overrunning the stack (Juergen Heinzl)
  changing procedure priority ("Andreas")
  Re: Overrunning the stack (David Wragg)
  Re: Overrunning the stack (Jon Becker)
  Re: Embedded Systems Development ("Daniel J. Feren")

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

From: grant@nowhere. (Grant Edwards)
Subject: Re: PCI configuration space fun.
Date: Thu, 06 Apr 2000 14:49:12 GMT

In article <[EMAIL PROTECTED]>, Bryan Hackney wrote:
>Grant Edwards wrote:
>> 
>[...]
>> Do you know if the PCI spec requires this, or is just common practice?
>>
>
>I don't know if this is a requirement of a PCI device implementation,
>but every device I've cared to talk to through a user level process
>has been this way. This includes i960RP, TSB12LV21APGF, and PLX PCI9052.

I just checked the specs for the last PCI board I wrote a
driver for.  My memory was correct.  That board does not map
it's configuration registers into PCI I/O or memory space. Base
address register 0 (for the board I'm looking at) defines a
block of I/O addresses used to access the peripheral device's
registers, not the PCI configuration registers.  For the board
in question, using the BIOS routines (or a similar mechanism)
is the only way to access the PCI configuration space.

Perhaps there are boards that map their configuration registers
in to memory or I/O space, but I don't think it's required by
the PCI spec, and you can't rely on that in the general case.

-- 
Grant Edwards                   grante             Yow!  Hey, I LIKE that
                                  at               POINT!!
                               visi.com            

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

From: "Bass���v" <[EMAIL PROTECTED]>
Subject: problem of error msg in linux / and sharing in samba . Urgent thx !
Date: Thu, 6 Apr 2000 23:40:01 +0800

I get the 2 error form my 2 Red Hat linux , do anyone know what are they
means ???

1)   svc:bad direction 65536 , dropping request
what's it means ? in prompt up when go to login screen and will prompt 2
times

2)   [2000/03/18  02:20:26 , 0 ] lib/debug.c : check_log_size(285)
       check_log_size : open of debug file /var/log/samba/log.nmb failed -
using console.
      [2000/03/18  02:20:26 , 0 ] nmbd/nmbd_become_lmb.c :
become_local_master_stage2(406)
      *******
      Samaber name server SERVER is now a loacl master brower for workgruop
COMPUTER on
      subnet 192.168.0.50
      ********

what's it means ? it appear suddenly after a serveal times ,esp I have type
anything for a long time (about 10 mins) , what is a local browser ??

=======================================
And I have a problem of samba sharing too , situtation is here :

after I finish setup samba (a linux box which I choose install "everythings"
when installation )
and connect to some win98 boxes , win98 can't login linux box (network busy)
althought they can see linux in network neighbour.
Then I use another linux box (just install some serivce for excmple smb ,
httpd ....)
which I use for learning linux before , win98s can login linux !!!!
then I try to compare two linux's samba config . The same !!!!!!!
then I "TRY" to add win98s ip and Hosts / domain in "/etc/hosts/" in the
linux box which win98s
can't login .
after I do this , It works !!!!!!!!!  WHY !!!!??????????
why one need /etc/hosts one don't need???????????????
that means I need to add ALL WIN98S to my linux box in "hosts" ??????
how come ???


HELP !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!











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

From: Bryan Hackney <[EMAIL PROTECTED]>
Subject: Re: PCI configuration space fun.
Date: Thu, 06 Apr 2000 10:49:32 -0500

Adrian Cox wrote:
> 
[...]

Thanks for this info. I'm not sure about your "most", though. This arrangement
is something you should not assume or take for granted. It will be documented
behaviour of the device.

> 
> On your board, maybe. That is *not* generic advice. Most devices do not
> mirror the configuration registers in base address 0. Our own PLX
> 9080/9054 designs do not do this.

I can accept that. I don't recall seeing this as a device requirement.
It's not even that convenient in some cases. And of course, devices that
do not present I/O or memory (PCI bridge) cannot present their config space
in a memory map.

  Bus  0, device   1, function  0:
    PCI bridge: Acer Labs Unknown device (rev 4).
      Vendor id=10b9. Device id=5243.
      Slow devsel.  Master Capable.  Latency=32.  Min Gnt=14.
  Bus  0, device   7, function  0:
    ISA bridge: Acer Labs M1533 Aladdin IV (rev 195).
      Medium devsel.  Master Capable.  No bursts.

However, past the PCI config space header (64 bytes) is typically device
specific registers. On some devices with many registers, it is very
convenient to map those registers to a memory structure. The alternative,
of reading and writing the PCI controller at I/O 0xfc to address a device's
config space is tedious and inelegant, and possibly a performance bottleneck.

Now, given the elegance of memory mapping the device specific registers,
it's not a stretch to imagine that "many" PCI devices that have device
specific registers go ahead and map in the previous 64 bytes. In my experience,
this has been the case.

Nothing says that device specific registers have to be in the config space.
In the case of the TSB12LV21APGF firewire chip, the register mapping starts
at the beginning of the config space, and then proceeds to far exceed the end
of the config space, all in a nice, contiguous memory map.

> 
> The hardware implementation of configuration space is a completely
> different addressing mechanism to memory space or IO space. In
> particular, as nobody has yet mentioned, configuration space is
> geographical. A configuration address contains components for bus
> number, slot number, function number, and register offset.
> 
> If you could mmap configuration space, it would still be a really bad
> idea. Attempting to read an empty slot and getting an error is a well
> defined, and quite normal, occurence.  Handling it by catching a SIGBUS
> would be a lot more effort than checking a return value.
> 

The mmap can take place only after the config registers have been read
through the PCI config I/O mechanism. The process or device driver must
walk the PCI busses to identify the devices, of course, before it can
do anything.


[...]

-- 
                                 Bryan Hackney / BHC / [EMAIL PROTECTED]
                                        http://www.FreeClassAds.com/
                                        http://bhconsult.com/
                                        http://bhconsult.com/bh/pgp.key

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

From: grant@nowhere. (Grant Edwards)
Subject: Re: PCI configuration space fun.
Date: Thu, 06 Apr 2000 15:57:09 GMT

In article <[EMAIL PROTECTED]>, Bryan Hackney wrote:

>However, past the PCI config space header (64 bytes) is
>typically device specific registers. On some devices with many
>registers, it is very convenient to map those registers to a
>memory structure. The alternative, of reading and writing the
>PCI controller at I/O 0xfc to address a device's config space
>is tedious and inelegant, and possibly a performance
>bottleneck.
>
>Now, given the elegance of memory mapping the device specific
>registers, it's not a stretch to imagine that "many" PCI
>devices that have device specific registers go ahead and map in
>the previous 64 bytes. In my experience, this has been the
>case.

I think we've hammered this one into the ground. :)

The other question that arises is: is there a simple way to
mmap() a block of I/O space?  I've done if for PCI _memory_
blocks, but doing it for a block of I/O space always sounded
difficult.  (I think use of I/O space by PCI boards should be
deprecated anyway.  Just put it all into memory space, life's
easier for us software types.)

-- 
Grant Edwards                   grante             Yow!  All right, you
                                  at               degenerates! I want this
                               visi.com            place evacuated in 20
                                                   seconds!

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

From: Chris Wareham <[EMAIL PROTECTED]>
Crossposted-To: comp.lang.c,comp.unix.solaris,comp.unix.questions,comp.unix.programmer
Subject: Re: To core or not to core - Part 2
Date: Thu, 06 Apr 2000 17:23:43 +0100

Erik Max Francis wrote:
> 
> Perhaps the debugging flag guarantees that uninitialized memory will be
> initialized to zero.
>

I can relate to this suggestion, as the GNU C libraries that come with
recent Linux distributions are very forgiving in this regard. malloc()
appears to initialise small chunks of memory, while on OpenBSD it doesn't.
I've not looked into this deeply, but it certainly woke me from my early
morning, pre-coffee paralysis when a piece of code that worked fine on a
laptop running Linux blew up on a Sparc running OpenBSD ...

Chris

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

From: James Nugent <[EMAIL PROTECTED]>
Subject: glibc libraries
Date: Thu, 06 Apr 2000 11:24:47 -0500

        I working with some people to add a minor modification to the
glibc (2.1.2 or 2.1.3) libraries. It would be helpful if anyone knows a 
source of documentation (where the actual code for various routines is)
for these or where the actual routines are. I can find the header files,
but I can't find the actual code. The calls I'm interested in are
open, close, read, write and unlink. Open/close seem to be the hardest
to find. Thanks in advance.

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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: glibc libraries
Reply-To: [EMAIL PROTECTED]
Date: Thu, 06 Apr 2000 16:40:40 GMT

On Thu, 06 Apr 2000 11:24:47 -0500, James Nugent <[EMAIL PROTECTED]> wrote:
>       I working with some people to add a minor modification to the
>glibc (2.1.2 or 2.1.3) libraries. It would be helpful if anyone knows a 
>source of documentation (where the actual code for various routines is)
>for these or where the actual routines are. I can find the header files,
>but I can't find the actual code. The calls I'm interested in are
>open, close, read, write and unlink. Open/close seem to be the hardest
>to find. Thanks in advance.

There is no code; the basic system calls are automatically generated from
a table. Nobody is going to write a hundred identical functions when they
can create an obfuscated scripting system instead for generating them. ;)

Dig deeper and you shall find.

-- 
#exclude <windows.h>

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

From: [EMAIL PROTECTED] (Paul Kimoto)
Subject: Re: glibc libraries
Date: 6 Apr 2000 12:44:30 -0500
Reply-To: [EMAIL PROTECTED]

In article <[EMAIL PROTECTED]>, James Nugent wrote:
>   I can find the header files,
> but I can't find the actual code.

Do you have the source code from ftp.gnu.org/gnu/glibc?

-- 
Paul Kimoto             <[EMAIL PROTECTED]>

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

From: Bryan Hackney <[EMAIL PROTECTED]>
Subject: Re: PCI configuration space fun.
Date: Thu, 06 Apr 2000 11:50:02 -0500

Grant Edwards wrote:
> 
[...]
> 
> I think we've hammered this one into the ground. :)

Seconded.

> 
> The other question that arises is: is there a simple way to
> mmap() a block of I/O space?  I've done if for PCI _memory_
> blocks, but doing it for a block of I/O space always sounded
> difficult.  (I think use of I/O space by PCI boards should be
> deprecated anyway.  Just put it all into memory space, life's
> easier for us software types.)
> 
> --

I guess for the hardware types the concept of I/O is handy - no cache,
no burst, no DMA, increased address space, different wait states, etc.


[...]
-- 
                                 Bryan Hackney / BHC / [EMAIL PROTECTED]
                                        http://www.FreeClassAds.com/
                                        http://bhconsult.com/
                                        http://bhconsult.com/bh/pgp.key

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

From: [EMAIL PROTECTED]
Crossposted-To: 
comp.os.linux.development.apps,comp.os.linux.development,comp.os.ms-windows.programmer.win32
Subject: Re: porting WIN32 to UNIX (Linux)
Date: Thu, 06 Apr 2000 16:38:06 GMT

In article <[EMAIL PROTECTED]>,
  Johannes Hacker <[EMAIL PROTECTED]> wrote:
> Hello!
>
> I am currently working on a project where I have
to port a WinNT
> Application to Linux. I am mainly focused on
threads, processes,
> synchronization and messaging between processes.
I've heard about the
> POSIX-Standard, but I really don't know where to
begin.
> Are there any documents, links, ... available
about porting in general?
> This problem sounds not so unusual, I am sure
this has been done before!
>
> kind regards,            jo hacker.
>
>
I have the same query but slighlty more specific.
I have a WinNT threaded application that uses
mutexes and semaphores for synchronisation but
WinNT (not having POSIX compliant threads) has a
method WaitForMultipleObjects() which allows you
to wait for one of several objects
(mutex/semaphore) to become availble or else
timeout.  Are there any thread libraries for Linux
that mirror this fuctionality?  The method I've
been forced to employ is to create a thead for
each object to be waited on and a thread for the
timeout.  This is far from satisfactory since it
creates a huge overhead and means I have to send
pthread_kill(CANCEL) calls to the blocking thread
if the timeout occurs and visa-versa.  Any healp
would be appreciated.

Cheers
Al


Sent via Deja.com http://www.deja.com/
Before you buy.

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

From: "2 Bit Unix, Inc." <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development,comp.os.linux.development.apps
Subject: Root Passwords
Date: Thu, 6 Apr 2000 13:14:49 -0400

Please visit http://www.2bitunix.org for information on obtaining our root
passwords!

Brian D. McGrew, Sr. Security Engineer
2 Bit Unix, Inc. (Raleigh, North Carolina)






====== Posted via Newsfeeds.Com, Uncensored Usenet News ======
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
=======  Over 80,000 Newsgroups = 16 Different Servers! ======

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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Crossposted-To: 
comp.os.linux.development.apps,comp.os.linux.development,comp.os.ms-windows.programmer.win32
Subject: Re: porting WIN32 to UNIX (Linux)
Reply-To: [EMAIL PROTECTED]
Date: Thu, 06 Apr 2000 17:32:58 GMT

On Thu, 06 Apr 2000 16:38:06 GMT, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>In article <[EMAIL PROTECTED]>,
>  Johannes Hacker <[EMAIL PROTECTED]> wrote:
>> Hello!
>>
>> I am currently working on a project where I have
>to port a WinNT
>> Application to Linux. I am mainly focused on
>threads, processes,
>> synchronization and messaging between processes.
>I've heard about the
>> POSIX-Standard, but I really don't know where to
>begin.
>> Are there any documents, links, ... available
>about porting in general?
>> This problem sounds not so unusual, I am sure
>this has been done before!
>>
>> kind regards,            jo hacker.
>>
>>
>I have the same query but slighlty more specific.
>I have a WinNT threaded application that uses
>mutexes and semaphores for synchronisation but
>WinNT (not having POSIX compliant threads) has a
>method WaitForMultipleObjects() which allows you
>to wait for one of several objects
>(mutex/semaphore) to become availble or else
>timeout.  Are there any thread libraries for Linux
>that mirror this fuctionality?

Ultimately a thread can only sleep in one place at one time, but merely wake up
for more than one reason. Waiting on multiple objects can be done by a
mechanism similar to how poll() and select() are implemented in the Linux
kernel. Basically you need some data structure which maps an object to a list
of all the threads that are waiting on it. When that object is signaled, all
those threads are woken up (or maybe just one of them, depending on the nature
of the object).  Each thread also needs a structure which maps all the objects
that it is waiting on so that it can check their status upon waking up, and
return from the wait if one of the objects---or all, as the case may be---is
signaled.  The actual waiting is done on a condition variable that each thread
carries with it; sort of like a slumber party where everyone brings their
own sleeping bag. ;)

My take on WaitForMultipleObjects is that it is severely brain-damaged. 
It's use is sometimes symptomatic of poor design. 

Answer this question: does the software use operating system sync objects in
order to communicate among its objects? If the answer is yes, perhaps you might
want to change the design so that the communication among objects is done using
the facilities of the programming language: e.g. method calls in C++.

Operating-system specific synchronization should be buried in the
implementation of something; it should not be exploited in order to make
objects communicate. E.g. it's undesirable for a class to export an internal
event handle through which it will notify another object; it's better to
register one object with another so that the notification can come in the form
of a method call. That method can then implement whatever is needed to wake up
the target object's internal thread---such as signalling a single internal
condition variable or semaphore or what have you.  Otherwise you end up with a
situation where you need notification from two or more objecs that all export
event handles. So what do you do? WaitForMultipleObjects. Oops!

-- 
#exclude <windows.h>

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

From: "rob" <[EMAIL PROTECTED]>
Crossposted-To: comp.lang.c,comp.unix.solaris,comp.unix.questions,comp.unix.programmer
Subject: Re: To core or not to core - Part 2
Date: Thu, 6 Apr 2000 11:38:31 -0600


I'm surprised nobody has mentioned assert().  If you assert an
expression with a side-effect, the non-debug build will run differently.


Harish K Chandraia wrote in message <8cfm88$jrp$[EMAIL PROTECTED]>...
>Hi All,
>
> While we are at it.....I wanted to mention another thing which
>is beyond me....hope somebody can shed some light on it.
>
> Have any of you experienced this.....you have a program which
>core dumps....and you put in additional printf's and compile with
>DEBUG defined in your Makefile and all of a sudden it stops core
>dumping on you. What could be the reason for something like this to
>happen.
<snip>



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

From: Nix <$}xinix{[email protected]>
Subject: Re: excepitons in signalhandler
Date: 06 Apr 2000 18:52:26 +0100

Alan Donovan <[EMAIL PROTECTED]> writes:

> For this reason many experienced programmers advise that the only thing
> you do in a signal handler is to set an integer variable of type
> sig_atomic_t and then return.

`volatile sig_atomic_t'.

-- 
`ndbm on Linux is an emulation, not the original. It comes in several
 flavours; `slightly broken', `moderately broken', and `totally and
 utterly broken'.' --- Nick Kew

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

Crossposted-To: comp.os.linux.development.apps,comp.os.linux,comp.os.linux.misc
Date: Thu, 6 Apr 2000 11:17:47 -0700 
From: Doug Schulz <[EMAIL PROTECTED]>
Subject: kernel questions

In the kernel source, the "thread_struct" reflects has values that
reflect the computers registers.  One of these values is "eip", which is
the value for the instruction pointer.  Does anyone one know what level
of the page tables (x86 architecture) this value refers to (pte, pmd,
pgd)?  Also, a way that I can resolve this value to find what
"vm_area_struct" references this portion of memory for the specific
process?

Thank you so much,

Doug


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

From: [EMAIL PROTECTED]
Subject: keyboard internal state?
Date: Thu, 06 Apr 2000 19:10:06 GMT

I was wondering if anyone knew if the keyboard driver kept some sort of
internal state information for the keyboard.  The reason I ask is I'm
writing an application which performs some read/writes to the keyboard
ports and upon returning to linux the keyboard occasionally doesn't
respond.  However if I telnet in, the keyboard still responds when I
write directly to the port and will sometimes start responding again
upon exiting.  Does anybody have any clue what I could be doing wrong?
Thanks


Sent via Deja.com http://www.deja.com/
Before you buy.

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

From: [EMAIL PROTECTED] (Juergen Heinzl)
Subject: Re: Overrunning the stack
Date: Thu, 06 Apr 2000 21:13:24 GMT

In article <8cgf6s$d70$[EMAIL PROTECTED]>, Jon Becker wrote:
>
>Apologies if this is a FAQ.
>
>Does the kernel do anything to prevent a process's stack from
>overrunning other mapped memory?  If the region of memory just below
>the stack is mapped read/write, can't the stack just grow into it and
>silently blow away whatever's there?
>
>Obviously I can just avoid explicitly mmap'ing the region just below
>the stack; however it looks like even if I let the kernel choose an
>address for me when I call mmap, then the call to get_unmapped_area
>can give me just such a region (if there's nothing available lower in
>memory).
>
>So is this true?  Is there really no protection?  It doesn't seem that
>difficult to maintain a one-page hole below the stack which will make
>sure that the kernel gets involved every time the stack overflows its
>region.  Then I could get a SEGV right away instead of having my data
>get corrupted.
>
>If such a thing actually does exist in Linux, can you point out where
>in the kernel code this is maintained?  I have been unable to find
>anything like that.  I confess I haven't actually tried just testing
>this myself (I don't have access to a Linux system at the moment), but
>I was suprised to find that there was no such protection on Solaris
>2.5.1.
[...]

As there is no answer yet I hope this rings a bell, IIRC there was
a discussion regarding that issue quite some time ago on ...
http://kt.linuxcare.com/
... and, again IIRC, the proposed solution was to use a read-only
memory page to guard against that problem.

You may ask on the kernel list though too, as I could not find
a reference yet 8-|

Cheers,
Juergen

-- 
\ Real name     : J�rgen Heinzl                 \       no flames      /
 \ EMail Private : [EMAIL PROTECTED] \ send money instead /

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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: Overrunning the stack
Reply-To: [EMAIL PROTECTED]
Date: Thu, 06 Apr 2000 21:23:38 GMT

On Thu, 06 Apr 2000 21:13:24 GMT, Juergen Heinzl
<[EMAIL PROTECTED]> wrote:
>In article <8cgf6s$d70$[EMAIL PROTECTED]>, Jon Becker wrote:
>As there is no answer yet I hope this rings a bell, IIRC there was
>a discussion regarding that issue quite some time ago on ...
>http://kt.linuxcare.com/
>... and, again IIRC, the proposed solution was to use a read-only
>memory page to guard against that problem.

Note that this is not a concern if you are using LinuxThreads (at least for
threads other than the main one). LinuxThreads does leave an unmapped area at
the top limit of each stack.

If you are managing your own stacks, you can just mmap the region you need and
then use mprotect to poke a hole in it somewhere.

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

From: [EMAIL PROTECTED] (Juergen Heinzl)
Subject: Re: Overrunning the stack
Date: Thu, 06 Apr 2000 22:23:35 GMT

In article <[EMAIL PROTECTED]>, Kaz Kylheku wrote:
>On Thu, 06 Apr 2000 21:13:24 GMT, Juergen Heinzl
><[EMAIL PROTECTED]> wrote:
>>In article <8cgf6s$d70$[EMAIL PROTECTED]>, Jon Becker wrote:
>>As there is no answer yet I hope this rings a bell, IIRC there was
>>a discussion regarding that issue quite some time ago on ...
>>http://kt.linuxcare.com/
>>... and, again IIRC, the proposed solution was to use a read-only
>>memory page to guard against that problem.
>
>Note that this is not a concern if you are using LinuxThreads (at least for
>threads other than the main one). LinuxThreads does leave an unmapped area at
>the top limit of each stack.
[...]
Although I was not the one thanks a lot for this piece of insider
information ...

>If you are managing your own stacks, you can just mmap the region you need and
>then use mprotect to poke a hole in it somewhere.
[...]
... as this is a nice idea. Cool s***, one more to file 8-)

Thanks,
Juergen

-- 
\ Real name     : J�rgen Heinzl                 \       no flames      /
 \ EMail Private : [EMAIL PROTECTED] \ send money instead /

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

From: "Andreas" <[EMAIL PROTECTED]>
Subject: changing procedure priority
Date: Fri, 7 Apr 2000 00:56:30 +0200

Does anyone know how to change the algoritm for whitch procedure to run
next. I have a work were I am supposed to change to lottery sceeduling



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

From: David Wragg <[EMAIL PROTECTED]>
Subject: Re: Overrunning the stack
Date: 06 Apr 2000 18:27:33 +0000

[EMAIL PROTECTED] (Jon Becker) writes:
> Is there really no protection?

There is if you want it. You can set the maximum stack size; see the
setrlimit man page for information of the relevant system call, and
the man page for your shell for the command to set resource limits
(ulimit under bash).


David Wragg

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

From: [EMAIL PROTECTED] (Jon Becker)
Subject: Re: Overrunning the stack
Date: 6 Apr 2000 23:43:11 GMT

In article <[EMAIL PROTECTED]>,
David Wragg  <[EMAIL PROTECTED]> wrote:
>[EMAIL PROTECTED] (Jon Becker) writes:
>> Is there really no protection?
>
>There is if you want it. You can set the maximum stack size; see the
>setrlimit man page for information of the relevant system call, and
>the man page for your shell for the command to set resource limits
>(ulimit under bash).
>
>
>David Wragg

But this may not help at all.  If something gets mmap'd right below
the stack at the very beginning of the program, then the stack might
be quite small, but as soon as it tries to grow there will be a
problem.  Plus, this would require artificially limiting the stack
size when that might not be necessary.

Basically, what I would like is for the stack to grow as big as it
wants until it hits the resource limit as long as there's no other
mapped memory that it would crash into.  But if there is other
mapped memory, I would want an immediate seg-fault.  Imposing an
additional limit on the stack size doesn't give me what I want in
case #2 and it takes away what I want in case #1.

-Jon


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

From: "Daniel J. Feren" <[EMAIL PROTECTED]>
Subject: Re: Embedded Systems Development
Date: Thu, 06 Apr 2000 19:51:33 -0400

Maybe uCLinux would be good for your project.

The link is www.uclinux.org

Spehro Pefhany wrote:

> The renowned Accutrol <[EMAIL PROTECTED]> wrote:
>
> > the subject at hand.  Does anyone know of a site that maintains links to
> > information that might help me make an informed decision?  BTW, I'm not
> > exactly on the fence;  I'm leaning toward Linux.  I just need a little
> > encouragement.
>
> Hi, Hamilton-
> I'm accumulating some links to such things on my site at:
>
> http://www.BlueCollarLinux.com
>
> You'd probably be particularly interested in the Puffin and EMC links.
> Best regards,
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Spehro Pefhany --"it's the network..."            "The Journey is the reward"
> [EMAIL PROTECTED]             Info for manufacturers: http://www.trexon.com
> Embedded software/hardware/analog  Info for designers:  http://www.speff.com
> Contributions invited->The AVR-gcc FAQ is at: http://www.BlueCollarLinux.com
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
Daniel James Feren
[EMAIL PROTECTED]
Georgia Institute of Technology, Computer Engineering



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


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

Reply via email to