public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Query regarding current macro
@ 2004-12-01  5:33 Jagadeesh Bhaskar P
  2004-12-01  6:34 ` Oliver Neukum
  0 siblings, 1 reply; 3+ messages in thread
From: Jagadeesh Bhaskar P @ 2004-12-01  5:33 UTC (permalink / raw)
  To: LKML

Hi all,
	I was going through the explanation of the current macro, and found out
that it was got by masking 13-bits LSB the esp register. So is it that
always the process descriptor will start at a location with the last 13
bits are 0??

	I have read that both the kernel stack and process descriptor of a
process is stored in together in an 8KB page. Now the offsets in the
page should start from all bits 0, rite? So then why masking only the 13
bits LSB?? What is the significance of keeping that length at 13??

Please do help!!

TIA
-- 
With regards,

Jagadeesh Bhaskar P


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Query regarding current macro
  2004-12-01  5:33 Query regarding current macro Jagadeesh Bhaskar P
@ 2004-12-01  6:34 ` Oliver Neukum
  2004-12-01  6:43   ` Jagadeesh Bhaskar P
  0 siblings, 1 reply; 3+ messages in thread
From: Oliver Neukum @ 2004-12-01  6:34 UTC (permalink / raw)
  To: Jagadeesh Bhaskar P; +Cc: LKML



On Wed, 1 Dec 2004, Jagadeesh Bhaskar P wrote:
> 	I have read that both the kernel stack and process descriptor of a
> process is stored in together in an 8KB page. Now the offsets in the
> page should start from all bits 0, rite? So then why masking only the 13
> bits LSB?? What is the significance of keeping that length at 13??

The stack grows downwards on x86. Thus the lowermost stack entry has all
bits set. The length is 13 because 13 corresponds to 8K.

	HTH
		Oliver


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Query regarding current macro
  2004-12-01  6:34 ` Oliver Neukum
@ 2004-12-01  6:43   ` Jagadeesh Bhaskar P
  0 siblings, 0 replies; 3+ messages in thread
From: Jagadeesh Bhaskar P @ 2004-12-01  6:43 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: LKML

So the rest of the bits in esp means garbage values?

 On Wed, 1 Dec 2004, Jagadeesh Bhaskar P wrote:
> > I have read that both the kernel stack and process descriptor of a
> > process is stored in together in an 8KB page. Now the offsets in the
> > page should start from all bits 0, rite? So then why masking only the 13
> > bits LSB?? What is the significance of keeping that length at 13??
>
> The stack grows downwards on x86. Thus the lowermost stack entry has all
> bits set. The length is 13 because 13 corresponds to 8K.
>
> HTH
> Oliver

--
Regards,

Jagadeesh Bhaskar P


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-12-01  6:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-01  5:33 Query regarding current macro Jagadeesh Bhaskar P
2004-12-01  6:34 ` Oliver Neukum
2004-12-01  6:43   ` Jagadeesh Bhaskar P

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox