Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/aarch64/aarch64 When accessed in mmap by the device...



details:   https://anonhg.NetBSD.org/src/rev/736e21907962
branches:  trunk
changeset: 369458:736e21907962
user:      ryo <ryo%NetBSD.org@localhost>
date:      Fri Aug 19 07:45:50 2022 +0000

description:
When accessed in mmap by the device pager, pmap_enter() may be called with prot == PROT_WRITE.

diffstat:

 sys/arch/aarch64/aarch64/pmap.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 0d7ab0c223cb -r 736e21907962 sys/arch/aarch64/aarch64/pmap.c
--- a/sys/arch/aarch64/aarch64/pmap.c   Fri Aug 19 07:43:54 2022 +0000
+++ b/sys/arch/aarch64/aarch64/pmap.c   Fri Aug 19 07:45:50 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.137 2022/05/03 20:09:54 skrll Exp $ */
+/*     $NetBSD: pmap.c,v 1.138 2022/08/19 07:45:50 ryo Exp $   */
 
 /*
  * Copyright (c) 2017 Ryo Shimizu <ryo%nerv.org@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.137 2022/05/03 20:09:54 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.138 2022/08/19 07:45:50 ryo Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_cpuoptions.h"
@@ -1914,7 +1914,7 @@
 
        KASSERT_PM_ADDR(pm, va);
        KASSERT(!IN_DIRECTMAP_ADDR(va));
-       KASSERT(prot & VM_PROT_READ);
+       KASSERT((prot & VM_PROT_ALL) != VM_PROT_NONE);
 
 #ifdef PMAPCOUNTERS
        PMAP_COUNT(mappings);



Home | Main Index | Thread Index | Old Index