Bootfs got overwritten

Mai, Haohui haohui.mai at
Fri Apr 20 00:58:27 CEST 2012

It turns out that bootstrap overwrites the memory during relocation.
Here are the logs:

  moving module 11 { 29d000-29d3b7 } -> { 126b000-126b3b7 }
  moving module 07 { 1259000-135b7b8 } -> { 2227000-23297b8 }

Module 07 is the rtc module, which is the module has been overwritten.
As you can see that module 11 overwrite the page 0x126b000 before
moving module 07, which causes the corruption.

The detection in bootstrap doesn't seem to be sufficient since it only
detects whether the new region is overlapped to roottask and sigma0.

What would be the best way of fixing it?


On Thu, Apr 19, 2012 at 1:46 PM, Haohui Mai <haohui.mai at> wrote:
> What is more interesting is that only that page is overwritten: The page before and after it stays the same.
> ~Haohui
> On Apr 19, 2012, at 1:40 PM, Haohui Mai wrote:
>> Hi,
>> I'm encountering a problem where the memory region of BOOTFS of L4Re got overwritten. Interestingly, the page is overwritten by things in the bootfs.
>> Here are the physical memory mapping set up by BOOTFS:
>> ...
>>  BOOTFS: [2227000-23297b8] [C:506000] rtc
>>  BOOTFS: [232a000-26d5411] [C:507000] mag
>>  BOOTFS: [26d6000-2848a94] [C:508000] fb-drv
>>  BOOTFS: [129d000-129daa4] [C:509000] vandroid-x86.cfg
>>  BOOTFS: [126b000-126b3b7] [C:50a000] x86-legacy.devs
>> The page 0x2239000 (which belongs to rtc) is magically overwritten by the first page of x86-legacy.devs. I confirmed it with both JDB and QEMU monitor.
>> I'm running the newest snapshot of L4Re / L4Android on top of the UP version L4.Fiasco kernel.
>> What would be the best approach to debug the problem? is it there a way to mark the whole BOOTFS as read-only so that I can figure out what's going on?
>> Thanks!
>> ~Haohui

More information about the l4-hackers mailing list