Re: [PATCH] proc: remove /proc/*/status "Stack usage:"

From: Stefani Seibold
Date: Mon Nov 02 2009 - 05:13:28 EST

> Poor embedded people!

That's why embedded peoble don't like to contribute their work.

> There is even Documentation/vm/page-types.c which is trivially adapted
> to show stack pages state.
> > Like Dr Frank. N. Furter in the "Rocky Horror Picture Show" says: remove
> > the cause but NOT the symptoms!
> The root of the problem is that you're measuring badly defined value.
> Kernel doesn't know SP register of a running task until it stops it.
> Even if task is stopped or inside kernel, kernel doesn't know where
> userpace stack starts, because, in theory, application can move it's
> stack to anywhere.

It works fine for 99% percent of the use cases. Nothing is perfect,
especially in theory.

> > And the cause is the miss implemented KSTK_ESP in a x86_64. I also
> > checked all other architekture depended KSTK_ESP definitions and this
> > definitions looks okay for me.

BTW: I had fixed the x86_65 KSTP_ESP implementation. I tested it with 32
bit and 64 bit user space application. I will send soon a patch. Thanks
for figure out the problem.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at