map bss to addr zero

Mulyadi Santosa mulyadi.santosa at gmail.com
Sun Sep 2 01:46:29 EDT 2012


Hi... :)

On Sun, Sep 2, 2012 at 2:23 AM, Ritesh Harjani <ritesh.harjani at gmail.com> wrote:
> Mulyadi,
>
> Why it will generate a page fault later when process will tries to reference
> it, while it already has mapped with the zero page?
>
>

Hopefully I interpret it correctly that this question is for me :)

Sorry, maybe I am not clear, by reference, I meant "updating " or
"writing" new value.

Since this zero page is mapped as read only, when writing to this zero
page, page fault is triggered. Then page fault handler conclude that
this is actually a write toward zero page from valid address, so it
will allocate page(s).


-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com



More information about the Kernelnewbies mailing list