Subject: Re: mmap bug (all archs) w/ fix

From: Gerhard Jaeger <[email-masked]>
Date: Wed, 31 Jan 2007 14:34:10 +0100

On Mittwoch, 31. Januar 2007, Michael Galassi wrote:
[SNIPSNAP]
> This clearly applies to all architectures and all versions (at least 2.4
> onward), could someone point me at some document which describes how to
> submit patches to "the right place" please?  I really do not want to
> support any fixes myself so getting fixes to obvious bugs merged into
> the mailine code would be a good thing (tm).
> 
IIRC, the problem is not the code that you try to fix, the problem is
the mmap call, which uses a signed 32 bit integer value for the offset
argument. And this one bites you when having addresses to map > 
0x80000000 (I assume that you try to mmap an area somewhere @
0xF8000000-0xFFFFFFFF).

Try to use mmap2 call which overcomes this problem by using the page
size as unit of the offset argument instead of bytes.

So no patch is needed and you should be able ti map the flash.

HTH
Gerhard

-- 
Gerhard Jaeger <[email-masked]>            
SYSGO AG                      Embedded and Real-Time Software
www.sysgo.com | www.elinos.com | www.pikeos.com | www.osek.de