summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2022-10-22 15:06:48 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2022-10-22 15:06:48 +0000
commit80eb04ad9091f3e41e260bb3c2722311eedc6229 (patch)
tree2ca0935f2e05aa95820c580bd2c1e9db956c49c3 /sys/kern
parent7920ba9a7334a95b85c2a83bbb9facc4799f0796 (diff)
automatic immutable for base executable is not ready on mips
because DT_DEBUG isn't in the right place
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/exec_elf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/exec_elf.c b/sys/kern/exec_elf.c
index 8b5a67baea6..d65c637a52f 100644
--- a/sys/kern/exec_elf.c
+++ b/sys/kern/exec_elf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_elf.c,v 1.169 2022/10/21 18:10:56 deraadt Exp $ */
+/* $OpenBSD: exec_elf.c,v 1.170 2022/10/22 15:06:47 deraadt Exp $ */
/*
* Copyright (c) 1996 Per Fogelstrom
@@ -201,6 +201,9 @@ elf_load_psection(struct exec_vmcmd_set *vcset, struct vnode *vp,
if ((ph->p_flags & (PF_X | PF_W)) != (PF_X | PF_W) &&
(ph->p_flags & PF_OPENBSD_MUTABLE) == 0)
flags |= VMCMD_IMMUTABLE;
+#if defined (__mips__)
+ flags &= ~VMCMD_IMMUTABLE; /* DT_DEBUG is not ready on mips */
+#endif
msize = ph->p_memsz + diff;
offset = ph->p_offset - bdiff;