All of lore.kernel.org
 help / color / mirror / Atom feed
* the magic in do_page_fault() ???
@ 2005-07-04  5:23 liyu@LAN
  0 siblings, 0 replies; 3+ messages in thread
From: liyu@LAN @ 2005-07-04  5:23 UTC (permalink / raw)
  To: LKML

Hi LKML:
   
    I am reading code of memory management. this process is so challengable.

    I have one quetion too.
   
    in do_page_fault() (kernel 2.6.11.11) include one piece of code as 
follow:

  
        if (!down_read_trylock(&mm->mmap_sem)) {
        if ((error_code & 4) == 0 &&
            !search_exception_tables(regs->eip))
            goto bad_area_nosemaphore;
        down_read(&mm->mmap_sem);
    }


    I think I can understand these operations on mm->mmap_sem and 
"error_code&4".
but how "search_exception_tables(regs->eip)" work here?

    In "Understanding Linux kernel 2ed" book,  the author say , kernel 
must difference two case:
   
      1. kernel memory access problem.
      2. Arguments of system call include address of memeory unit is 
unmapped.

    Well, That is OK. but I want to know what 's mechanism in it ?
   
    3ks. (in Chinese , number 3 read as 'th' :)


                                                             liyu
                                                                Mon Jul  
4 13:23:24 CST 2005     
   





^ permalink raw reply	[flat|nested] 3+ messages in thread
* the magic in do_page_fault() ???
@ 2005-07-04  5:23 liyu@WAN
  2005-07-04  7:24 ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: liyu@WAN @ 2005-07-04  5:23 UTC (permalink / raw)
  To: LKML

Hi LKML:

    I am reading code of memory management. this process is so challengable.

    I have one quetion too.

    in do_page_fault() (kernel 2.6.11.11) include one piece of code as
follow:


        if (!down_read_trylock(&mm->mmap_sem)) {
        if ((error_code & 4) == 0 &&
            !search_exception_tables(regs->eip))
            goto bad_area_nosemaphore;
        down_read(&mm->mmap_sem);
    }


    I think I can understand these operations on mm->mmap_sem and
"error_code&4".
but how "search_exception_tables(regs->eip)" work here?

    In "Understanding Linux kernel 2ed" book,  the author say , kernel
must difference two case:

      1. kernel memory access problem.
      2. Arguments of system call include address of memeory unit is
unmapped.

    Well, That is OK. but I want to know what 's mechanism in it ?

    3ks. (in Chinese , number 3 read as 'th' :)


                                                             liyu
                                                                Mon Jul
4 13:23:24 CST 2005







^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-07-04  7:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-04  5:23 the magic in do_page_fault() ??? liyu@LAN
  -- strict thread matches above, loose matches on Subject: below --
2005-07-04  5:23 liyu@WAN
2005-07-04  7:24 ` Steven Rostedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.