-/* $OpenBSD: pmap.c,v 1.179 2022/10/25 18:44:36 miod Exp $ */
+/* $OpenBSD: pmap.c,v 1.180 2023/01/07 10:09:34 kettenis Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
for (pve = pg->mdpage.pvh_list; pve; pve = pve->pv_next) {
pte |= pmap_vp_find(pve->pv_pmap, pve->pv_va);
if ((va & HPPA_PGAOFF) != (pve->pv_va & HPPA_PGAOFF) &&
+ (pte & PTE_PROT(TLB_GATEWAY)) == 0 &&
(pte & PTE_PROT(TLB_WRITE))) {
#ifdef PMAPDEBUG
printf("pmap_check_alias: "
hppa_prot[PROT_READ] = TLB_AR_R;
hppa_prot[PROT_WRITE] = TLB_AR_RW;
hppa_prot[PROT_READ | PROT_WRITE] = TLB_AR_RW;
- hppa_prot[PROT_EXEC] = TLB_AR_RX;
+ hppa_prot[PROT_EXEC] = TLB_AR_X;
hppa_prot[PROT_READ | PROT_EXEC] = TLB_AR_RX;
hppa_prot[PROT_WRITE | PROT_EXEC] = TLB_AR_RWX;
hppa_prot[PROT_READ | PROT_WRITE | PROT_EXEC] = TLB_AR_RWX;
-/* $OpenBSD: pte.h,v 1.13 2013/03/25 20:14:30 deraadt Exp $ */
+/* $OpenBSD: pte.h,v 1.14 2023/01/07 10:09:34 kettenis Exp $ */
/*
* Copyright (c) 1990,1993,1994 The University of Utah and
#define TLB_EXECUTE 0x02000000
#define TLB_GATEWAY 0x04000000
#define TLB_USER 0x00f00000
+/* no execute access at any PL; no GATEWAY promotion */
#define TLB_AR_NA 0x07300000
#define TLB_AR_R TLB_READ
+/* execute access at designated PL; no GATEWAY promotion */
+#define TLB_AR_X 0x07000000
#define TLB_AR_RW TLB_READ|TLB_WRITE
#define TLB_AR_RX TLB_READ|TLB_EXECUTE
#define TLB_AR_RWX TLB_READ|TLB_WRITE|TLB_EXECUTE