cvs commit: src/sys/amd64/amd64 pmap.c

Alan Cox alc at FreeBSD.org
Fri Aug 26 05:18:47 GMT 2005


alc         2005-08-26 05:18:46 UTC

  FreeBSD src repository

  Modified files:
    sys/amd64/amd64      pmap.c 
  Log:
  Remedy the following three problems:
  
  1. The amd64 pmap, unlike the i386 pmap, maintains a reference count
     for each page directory (PD) page.  However, in the transformation
     of the i386 pmap into the amd64 pmap, operations, such as
     pmap_copy() and pmap_object_init_pt(), that create 2MB "superpage"
     mappings by setting the PG_PS bit in a PD entry were not modified
     to adjust the underlying PD page's reference count.  Consequently,
     superpage mappings could disappear prematurely.
  
  2. pmap_object_init_pt() could crash or corrupt memory if either the
     virtual address range being mapped crosses a 1GB boundary in the
     virtual address space or nothing is mapped in the 1GB area.
  
  3. When pmap_allocpte() destroys a 2MB "superpage" mapping it does not
     reduce the pmap's resident count accordingly.  It should.  (This
     bug is inherited from i386.)
  
  Discussed with: peter
  Reviewed by:    tegge
  
  Revision  Changes    Path
  1.526     +72 -18    src/sys/amd64/amd64/pmap.c


More information about the cvs-all mailing list