-/* $OpenBSD: machdep.c,v 1.80 2023/03/30 15:09:01 kn Exp $ */
+/* $OpenBSD: machdep.c,v 1.81 2023/04/24 10:22:48 kettenis Exp $ */
/*
* Copyright (c) 2014 Patrick Wildt <patrick@blueri.se>
* Copyright (c) 2021 Mark Kettenis <kettenis@openbsd.org>
struct pcb *pcb = &p->p_addr->u_pcb;
struct trapframe *tf = pcb->pcb_tf;
+ if (pack->ep_flags & EXEC_NOBTCFI)
+ p->p_vmspace->vm_map.pmap->pm_guarded = 0;
+ else
+ p->p_vmspace->vm_map.pmap->pm_guarded = ATTR_GP;
+
/* If we were using the FPU, forget about it. */
memset(&pcb->pcb_fpstate, 0, sizeof(pcb->pcb_fpstate));
pcb->pcb_flags &= ~PCB_FPU;