[Barrelfish-users] Maybe a Bug of modify_flags

jhshi at cs.hku.hk jhshi at cs.hku.hk
Sun May 20 16:00:06 CEST 2012


Here is my previous email, FYI.

https://lists.inf.ethz.ch/pipermail/barrelfish-users/2012-May/000593.html

Quoting jhshi at cs.hku.hk:

>
> Hi,
>
> For some reason, I need to work on x86_32 instead of x86_64. And I   
> found that x86_32's pmap->f.modify_flags is NYI. So I ported it from  
>  x86_64, as described by my previous email (link). But then I found   
> that the port won't work properly. Personally, I don't think the   
> problem lies in the porting but in the modify_flags itself.
>
> Here is my test case workflow:
>
> First allocate two pages using frame_alloc and map them at some  
> "safe"  virtual address as read-only using pmap->f.map. Then fill  
> the two  pages with different content. Since they are read-only,  
> page faults  will occur when filling. I catch them and map the fault  
> page as  read-write using pmap->f.modify_flags in the fault handler.  
> But then I  found that the two page's content are identical, which  
> is not supposed  to be.
>
> Then I found that if I allocate one frame for each page, instead of   
> one monolithic frame, everything is fine.
>
> I've summarized my test in the attached C file, which should be   
> compiled and run under x86_32. Apology for not being able to test it  
>  under X86_64 since I encounter some weird errors when compiling  
> arch  x86_64. But if you substitute all the X86_32 to X86_64 in the  
> test  file, it should work under x86_64 as well.
>
> However, if the test goes all fine under x86_64, then please give  
> some  hint about why its x86_32's port would fail.
>
> Thanks in advance!
>
> Regards,
> Jinghao
>




More information about the Barrelfish-users mailing list