From: kettenis Date: Mon, 2 Jan 2023 23:03:18 +0000 (+0000) Subject: The access type for an instruction storage/segment interrupt should not X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=3567e62dcf56c289edf867dbad33e48ab3a963ca;p=openbsd 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@ --- 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);