Mike,

The algorithm is using mm->start_stack and mm->context.end_brk for the stack 
limits. These are saved in binfmt_flat.c.

I'm not sure where to put the proc code, otherwise.

-----Original Message-----
From: uclinux-dev-boun...@uclinux.org [mailto:uclinux-dev-boun...@uclinux.org] 
On Behalf Of Mike Frysinger
Sent: Monday, October 25, 2010 5:55 PM
To: uClinux development list
Subject: Re: [uClinux-dev] [RFC][PATCH] m68knommu stack checker

On Mon, Oct 25, 2010 at 5:27 PM, Jate Sujjavanich wrote:
> I implemented this in arch/m68k*. I patched fs/proc/base.c, and I'm not sure 
> entirely sure if it's the proper place.

this isnt really

> I believe a stack checker for threads would need to be implemented inside of 
> libpthreads.

it would.  we've done it on Blackfin systems.

> The kernel already memsets the bss, brk, and stack regions to zero. The 
> checker calculates the used stack space by searching for the first non-zero 
> value. The values returned are the total stack size and used size.

ugh, no.  you're using m68knommu which means you're using FLAT which
means you know the size of the stack when the program is first
executed.
fs/binfmt_flat.c:load_flat_file()
  stack_len = ntohl(hdr->stack_size);
-mike
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

 
 
************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer 
viruses.
************************************************************************************



_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to