From 3567e62dcf56c289edf867dbad33e48ab3a963ca Mon Sep 17 00:00:00 2001 From: kettenis Date: Mon, 2 Jan 2023 23:03:18 +0000 Subject: [PATCH] The access type for an instruction storage/segment interrupt should not include PROT_READ, otherwise faults on executable pages mapped only as PORT_EXEC will not work. "obviously correct" deraadt@ --- sys/arch/powerpc64/powerpc64/trap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arch/powerpc64/powerpc64/trap.c b/sys/arch/powerpc64/powerpc64/trap.c index fdba2f0e325..f8e09702b58 100644 --- a/sys/arch/powerpc64/powerpc64/trap.c +++ b/sys/arch/powerpc64/powerpc64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.51 2021/05/11 18:21:12 kettenis Exp $ */ +/* $OpenBSD: trap.c,v 1.52 2023/01/02 23:03:18 kettenis Exp $ */ /* * Copyright (c) 2020 Mark Kettenis @@ -305,7 +305,7 @@ trap(struct trapframe *frame) map = &p->p_vmspace->vm_map; va = frame->srr0; - access_type = PROT_READ | PROT_EXEC; + access_type = PROT_EXEC; error = uvm_fault(map, trunc_page(va), 0, access_type); if (error == 0) uvm_grow(p, va); -- 2.20.1