Messages in this thread | | | From | Borislav Deianov <> | Date | Thu, 10 Feb 2000 17:49:16 +0100 | Subject | write-protecting a kernel page |
| |
Hi,
I'm trying to write-protect a kernel page, for debugging purposes. I want to get an oops when something (in ther kernel) tries to write to it. Here is what I have (ptr points to the start of the page):
unsigned long address = (unsigned long)ptr; pgd_t *src_pgd = pgd_offset_k(address); pmd_t *src_pmd = pmd_offset(src_pgd, address); pte_t *src_pte = pte_offset(src_pmd, address); pte_t pte = *src_pte; pte = pte_wrprotect(pte); set_pte(src_pte, pte); flush_tlb_all();
The problem is I can still write to the page after that. What am I doing wrong? This is on a dual PIII machine, btw.
Thanks, Borislav
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |