Dear David,
The code failed at mm/nommu.c:1170:
if (new_len > kobjsize((void *) addr))
        return (unsigned long) -ENOMEM;
At this time, new_len = 65536, addr = 0x00750000, kobjsize((void*)addr)
returns 4096.
So, the code prompts "Unable to allocate RAM for process text/data, errno
-12"  
What's this problem?   
Thanks.

Darwin Chen.
-----邮件原件-----
发件人: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
org] 代表 David McCullough
发送时间: 2007年9月13日 7:02
收件人: uClinux development list
主题: Re: [uClinux-dev] Is this a kernel bug?


Jivin David Howells lays it down ...
> Darwin Chen <[EMAIL PROTECTED]> wrote:
> 
> > I found a surprised code after I hacking the kernel with several weeks:
> > In linux-2.6.x/fs/binfmt_flat.c: Line 603:  
> > textpos = do_mremap(textpos, len, reallen, 
> >             MREMAP_FIXED, textpos);
> > 
> > But, in linux-2.6.x/mm/nommu.c, the code didn't support MREMAP_FIXED
flag.
> > So, I always get this error.
> > 
> > Is this a kernel bug? Or how to fixed it?
> 
> You need an MMU if you want to implement that - at least for anything
other
> than new_address == old_address.  So just like for MAP_FIXED, MREMAP_FIXED
is
> not supported if CONFIG_MMU=n.

Ok,  but both the calls to do_mremap have newaddr and addr the same
(ie., textpos above).  And from mm/nommu.c:

        if (flags & MREMAP_FIXED && new_addr != addr)
                        return (unsigned long) -EINVAL;

So perhaps it is failing further down the do_mremap conditionals,

Cheers,
Davidm

-- 
David McCullough,  [EMAIL PROTECTED],   Ph:+61 734352815
Secure Computing - SnapGear  http://www.uCdot.org http://www.cyberguard.com
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


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

Reply via email to