diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2006-05-10 13:45:38 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2006-05-10 13:45:38 +0000 |
commit | 2b4d630a5b6bfef1d3e52b0dd3aff219e38c5b70 (patch) | |
tree | 5dc073fe780832bdffe4adf9c58a7e5012aff580 /sys/arch | |
parent | 049cb68fc4fd376fbd04e502f689c346caa7e68a (diff) |
in db_write_bytes correctly restore pte prot after write; this is not a big deal as kernel .text is not writable anyway; found by aaron
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/i386/i386/db_memrw.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/i386/i386/db_memrw.c b/sys/arch/i386/i386/db_memrw.c index a282d61c9a7..e4bf0447b5a 100644 --- a/sys/arch/i386/i386/db_memrw.c +++ b/sys/arch/i386/i386/db_memrw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_memrw.c,v 1.9 2006/04/27 15:37:50 mickey Exp $ */ +/* $OpenBSD: db_memrw.c,v 1.10 2006/05/10 13:45:37 mickey Exp $ */ /* $NetBSD: db_memrw.c,v 1.6 1999/04/12 20:38:19 pk Exp $ */ /* @@ -85,9 +85,9 @@ db_write_bytes(vaddr_t addr, size_t size, char *data) *dst++ = *data++; if (addr1) { - pmap_pte_setbits(addr, 0, bits); - if (bits1) - pmap_pte_setbits(addr1, 0, bits1); + pmap_pte_setbits(addr, 0, bits ^ PG_RW); + if (trunc_page(addr) != addr1) + pmap_pte_setbits(addr1, 0, bits1 ^ PG_RW); tlbflush(); } } |