Skip to content

Commit b59fd42

Browse files
committed
risc-v: pte_make_enter set PTE_D when page is known to be modified.
PR/59696: pte_make_enter() appears to have bug vis a vis already-modified managed pages
1 parent c289d14 commit b59fd42

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • sys/arch/riscv/include

sys/arch/riscv/include/pte.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: pte.h,v 1.16 2025/10/12 19:44:04 skrll Exp $ */
1+
/* $NetBSD: pte.h,v 1.17 2025/10/13 07:43:43 skrll Exp $ */
22

33
/*
44
* Copyright (c) 2014, 2019, 2021 The NetBSD Foundation, Inc.
@@ -246,7 +246,7 @@ pte_make_enter(paddr_t pa, struct vm_page_md *mdpg, vm_prot_t prot,
246246
* indicates it has already been modified. No need for
247247
* modified emulation.
248248
*/
249-
pte |= PTE_A;
249+
pte |= PTE_A | PTE_D;
250250
} else if ((flags & VM_PROT_ALL) || VM_PAGEMD_REFERENCED_P(mdpg)) {
251251
/*
252252
* - The access type indicates that we don't need to do

0 commit comments

Comments
 (0)