From baca2ca69e4060baafc40e8655b1c9fa68b70613 Mon Sep 17 00:00:00 2001 From: deraadt Date: Sat, 5 Nov 2022 18:44:09 +0000 Subject: [PATCH] teach ld.so how to call the mimmutable() system call ok kettenis --- libexec/ld.so/Makefile | 6 +++--- libexec/ld.so/syscall.h | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/libexec/ld.so/Makefile b/libexec/ld.so/Makefile index b84590c911e..308043209a6 100644 --- a/libexec/ld.so/Makefile +++ b/libexec/ld.so/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.82 2021/12/23 18:50:32 guenther Exp $ +# $OpenBSD: Makefile,v 1.83 2022/11/05 18:44:09 deraadt Exp $ SUBDIR=ldconfig ldd MAN= ld.so.1 @@ -28,8 +28,8 @@ SRCS+= dl_uname.c dl_dirname.c strlcat.c strlen.c trace.c SRCS+= malloc.c reallocarray.c tib.c ffs.c syscall=close exit fstat getdents getentropy getthrid issetugid kbind \ - mmap mprotect munmap msyscall open pledge read __realpath sendsyslog \ - __set_tcb sysctl thrkill utrace write + mimmutable mmap mprotect munmap msyscall open pledge read \ + __realpath sendsyslog __set_tcb sysctl thrkill utrace write .if (${MACHINE_ARCH} == "i386") syscall+=mquery diff --git a/libexec/ld.so/syscall.h b/libexec/ld.so/syscall.h index d23b01d68c1..a42f7164d83 100644 --- a/libexec/ld.so/syscall.h +++ b/libexec/ld.so/syscall.h @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall.h,v 1.2 2022/01/08 06:49:41 guenther Exp $ */ +/* $OpenBSD: syscall.h,v 1.3 2022/11/05 18:44:09 deraadt Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -52,6 +52,7 @@ int _dl_mprotect(const void *, size_t, int); void *_dl_mquery(void *, size_t, int, int, int, off_t); int _dl_msyscall(void *addr, size_t len); int _dl_munmap(const void *, size_t); +int _dl_mimmutable(const void *, size_t); int _dl_open(const char *, int); int _dl_pledge(const char *, const char **); ssize_t _dl_read(int, const char *, size_t); -- 2.20.1