Module Name: src
Committed By: ryo
Date: Mon Jun 10 05:56:15 UTC 2019
Modified Files:
src/sys/arch/aarch64/aarch64: fault.c
Log Message:
since uvm_faut() will fail if cache maintain instructions (e.g., "dc cvau".
that has ESR.WnR=1 = write access) for a read only page causes a data abort
trap,
It shoulde be treat the access type as read access in a data abort with
cache operation (ESR_ISS_DATAABORT_CM=1)
pointed out and tested by mrg@. thanks
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/aarch64/aarch64/fault.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/aarch64/aarch64/fault.c
diff -u src/sys/arch/aarch64/aarch64/fault.c:1.9 src/sys/arch/aarch64/aarch64/fault.c:1.10
--- src/sys/arch/aarch64/aarch64/fault.c:1.9 Sat Apr 6 03:06:24 2019
+++ src/sys/arch/aarch64/aarch64/fault.c Mon Jun 10 05:56:15 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: fault.c,v 1.9 2019/04/06 03:06:24 thorpej Exp $ */
+/* $NetBSD: fault.c,v 1.10 2019/06/10 05:56:15 ryo Exp $ */
/*
* Copyright (c) 2017 Ryo Shimizu <[email protected]>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.9 2019/04/06 03:06:24 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.10 2019/06/10 05:56:15 ryo Exp $");
#include "opt_compat_netbsd32.h"
#include "opt_ddb.h"
@@ -171,6 +171,8 @@ data_abort_handler(struct trapframe *tf,
if ((eclass == ESR_EC_INSN_ABT_EL0) || (eclass == ESR_EC_INSN_ABT_EL1))
ftype = VM_PROT_READ | VM_PROT_EXECUTE;
+ else if (__SHIFTOUT(esr, ESR_ISS_DATAABORT_CM))
+ ftype = VM_PROT_READ;
else
ftype = (rw == 0) ? VM_PROT_READ : VM_PROT_WRITE;