Re: kernel stack vs. user stack

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 10, 2005 at 15:04:51 +0200, Paul Duplys wrote:
> Hi Mulyadi,
> 
> this is a really good peace of information. I didn't understand everything
> you wrote yet, but I'm on it!
> 
> Could you explain me, what exactly a stack segment is? Is it a memory range,
> where the stack data (I mean, something, that I push on the stack) is saved?

Stack segment is the memory segment in which stack lives. As that it (it's
descriptor) is loaded in the SS register.

Not all architectures use segments and on those that do, segments only get in
linux's way -- in linux, all segment descriptors always start at address
0 and span whole 4 GB and page tables are used to implement the actual memory
protection.

Since you have mentioned you are trying to port linux to another CPU (if
I understood you correctly), you are really not that much interested in the
internals on i386 (which is a particularly weird cpu), but should rather
refer to documentation of your CPU. Linux requires paging (though there is
a port for mmu-less (and thus paging incapable) platforms), but it is
preferable that segmentation (which is superfluous with paging) is turned
off, or at least set up so that all segments have the same start and length
(as in i386 Linux).

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@xxxxxx>

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux