- Clear the page's PG_WRITEABLE flag in the i386's pmap_changebit()
if we're removing write access from the page's PTEs. - Export pmap_remove_all() on alpha, i386, and ia64. (It's already exported on sparc64.)
This commit is contained in:
parent
cd5a1c3b76
commit
6372d61e3e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=106753
@ -330,7 +330,6 @@ static pv_entry_t get_pv_entry(void);
|
||||
static void alpha_protection_init(void);
|
||||
static void pmap_changebit(vm_page_t m, int bit, boolean_t setem);
|
||||
|
||||
static void pmap_remove_all(vm_page_t m);
|
||||
static vm_page_t pmap_enter_quick(pmap_t pmap, vm_offset_t va,
|
||||
vm_page_t m, vm_page_t mpte);
|
||||
static int pmap_remove_pte(pmap_t pmap, pt_entry_t* ptq, vm_offset_t sva);
|
||||
@ -1933,7 +1932,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva)
|
||||
* pmap_remove (slow...)
|
||||
*/
|
||||
|
||||
static void
|
||||
void
|
||||
pmap_remove_all(vm_page_t m)
|
||||
{
|
||||
register pv_entry_t pv;
|
||||
|
@ -203,7 +203,6 @@ static pv_entry_t get_pv_entry(void);
|
||||
static void i386_protection_init(void);
|
||||
static __inline void pmap_changebit(vm_page_t m, int bit, boolean_t setem);
|
||||
|
||||
static void pmap_remove_all(vm_page_t m);
|
||||
static vm_page_t pmap_enter_quick(pmap_t pmap, vm_offset_t va,
|
||||
vm_page_t m, vm_page_t mpte);
|
||||
static int pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, vm_offset_t sva);
|
||||
@ -1893,7 +1892,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva)
|
||||
* pmap_remove (slow...)
|
||||
*/
|
||||
|
||||
static void
|
||||
void
|
||||
pmap_remove_all(vm_page_t m)
|
||||
{
|
||||
register pv_entry_t pv;
|
||||
@ -3067,7 +3066,8 @@ pmap_changebit(vm_page_t m, int bit, boolean_t setem)
|
||||
register pt_entry_t *pte;
|
||||
int s;
|
||||
|
||||
if (!pmap_initialized || (m->flags & PG_FICTITIOUS))
|
||||
if (!pmap_initialized || (m->flags & PG_FICTITIOUS) ||
|
||||
(!setem && bit == PG_RW && (m->flags & PG_WRITEABLE) == 0))
|
||||
return;
|
||||
|
||||
s = splvm();
|
||||
@ -3112,6 +3112,8 @@ pmap_changebit(vm_page_t m, int bit, boolean_t setem)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!setem && bit == PG_RW)
|
||||
vm_page_flag_clear(m, PG_WRITEABLE);
|
||||
splx(s);
|
||||
}
|
||||
|
||||
|
@ -203,7 +203,6 @@ static pv_entry_t get_pv_entry(void);
|
||||
static void i386_protection_init(void);
|
||||
static __inline void pmap_changebit(vm_page_t m, int bit, boolean_t setem);
|
||||
|
||||
static void pmap_remove_all(vm_page_t m);
|
||||
static vm_page_t pmap_enter_quick(pmap_t pmap, vm_offset_t va,
|
||||
vm_page_t m, vm_page_t mpte);
|
||||
static int pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, vm_offset_t sva);
|
||||
@ -1893,7 +1892,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva)
|
||||
* pmap_remove (slow...)
|
||||
*/
|
||||
|
||||
static void
|
||||
void
|
||||
pmap_remove_all(vm_page_t m)
|
||||
{
|
||||
register pv_entry_t pv;
|
||||
@ -3067,7 +3066,8 @@ pmap_changebit(vm_page_t m, int bit, boolean_t setem)
|
||||
register pt_entry_t *pte;
|
||||
int s;
|
||||
|
||||
if (!pmap_initialized || (m->flags & PG_FICTITIOUS))
|
||||
if (!pmap_initialized || (m->flags & PG_FICTITIOUS) ||
|
||||
(!setem && bit == PG_RW && (m->flags & PG_WRITEABLE) == 0))
|
||||
return;
|
||||
|
||||
s = splvm();
|
||||
@ -3112,6 +3112,8 @@ pmap_changebit(vm_page_t m, int bit, boolean_t setem)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!setem && bit == PG_RW)
|
||||
vm_page_flag_clear(m, PG_WRITEABLE);
|
||||
splx(s);
|
||||
}
|
||||
|
||||
|
@ -257,7 +257,6 @@ static pv_entry_t get_pv_entry(void);
|
||||
static void ia64_protection_init(void);
|
||||
|
||||
static void pmap_invalidate_all(pmap_t pmap);
|
||||
static void pmap_remove_all(vm_page_t m);
|
||||
static void pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m);
|
||||
|
||||
vm_offset_t
|
||||
@ -1537,7 +1536,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva)
|
||||
* pmap_remove (slow...)
|
||||
*/
|
||||
|
||||
static void
|
||||
void
|
||||
pmap_remove_all(vm_page_t m)
|
||||
{
|
||||
pmap_t oldpmap;
|
||||
|
@ -92,8 +92,6 @@ int pmap_protect_tte(struct pmap *pm1, struct pmap *pm2, struct tte *tp,
|
||||
|
||||
void pmap_map_tsb(void);
|
||||
|
||||
void pmap_remove_all(vm_page_t m);
|
||||
|
||||
void pmap_clear_write(vm_page_t m);
|
||||
|
||||
#define vtophys(va) pmap_kextract(((vm_offset_t)(va)))
|
||||
|
@ -122,6 +122,7 @@ void pmap_qenter(vm_offset_t, vm_page_t *, int);
|
||||
void pmap_qremove(vm_offset_t, int);
|
||||
void pmap_release(pmap_t);
|
||||
void pmap_remove(pmap_t, vm_offset_t, vm_offset_t);
|
||||
void pmap_remove_all(vm_page_t m);
|
||||
void pmap_remove_pages(pmap_t, vm_offset_t, vm_offset_t);
|
||||
void pmap_zero_page(vm_page_t);
|
||||
void pmap_zero_page_area(vm_page_t, int off, int size);
|
||||
|
Loading…
Reference in New Issue
Block a user