[uClinux-dev] [PATCH] : Avoid filename < TASK_SIZE test in do_getname() when no MMU

Mike Frysinger vapier at gentoo.org
Tue May 25 14:34:33 EDT 2010


On Tuesday 25 May 2010 04:40:01 Philippe De Muyter wrote:
> On Tue, May 25, 2010 at 11:19:43AM +1000, Greg Ungerer wrote:
> > Philippe De Muyter wrote:
> >> On Mon, May 24, 2010 at 11:29:50AM +1000, Greg Ungerer wrote:
> >> [...]
> >> 
> >>> +#else
> >>> +#define TASK_SIZE	(0xFFFFFFFFUL)
> >>> +#endif
> >> 
> >> Because of do_getname() :
> >> 	len = TASK_SIZE - (unsigned long) filename;
> >> 
> >> we should rather have
> >> 
> >> 	#define TASK_SIZE (0x100000000ull)
> > 
> > I see what you mean. But in practice here I don't think it matters.
> 
> Can no process have its stack allocated in the last block, and hence have
> some argv[i] put in the last addresses, with the terminating '\0' at
> 0xffffffff ?

that depends on the processor.  on Blackfin systems, the last 4 megs are aways 
reserved in hardware, so no, this couldnt happen there.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://mailman.uclinux.org/pipermail/uclinux-dev/attachments/20100525/d1e990c1/attachment.sig>


More information about the uClinux-dev mailing list