From f702e215c1561830b639f515b847ff5cc200bf10 Mon Sep 17 00:00:00 2001 From: deraadt Date: Thu, 7 Dec 2023 13:59:04 +0000 Subject: [PATCH] Add a stub pinsyscalls() system call that simply returns 0 for now, before future work where ld.so(1) will need this new system call. Putting this in the kernel ahead of time will save some grief. ok kettenis --- sys/kern/syscalls.master | 5 +++-- sys/uvm/uvm_mmap.c | 12 +++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 5c60c389ffd..20215e6a221 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1,4 +1,4 @@ -; $OpenBSD: syscalls.master,v 1.251 2023/11/29 20:40:06 bluhm Exp $ +; $OpenBSD: syscalls.master,v 1.252 2023/12/07 13:59:04 deraadt Exp $ ; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $ ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -306,7 +306,8 @@ #endif 156 OBSOL ogetdirentries 157 OBSOL statfs25 -158 OBSOL fstatfs25 +158 STD { int sys_pinsyscalls(void *base, size_t len, \ + void *pins, size_t pinslen); } 159 STD { int sys_mimmutable(void *addr, size_t len); } 160 STD { int sys_waitid(int idtype, id_t id, \ siginfo_t *info, int options); } diff --git a/sys/uvm/uvm_mmap.c b/sys/uvm/uvm_mmap.c index caea59be203..1ff2d3106dc 100644 --- a/sys/uvm/uvm_mmap.c +++ b/sys/uvm/uvm_mmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_mmap.c,v 1.182 2023/05/09 10:35:20 kn Exp $ */ +/* $OpenBSD: uvm_mmap.c,v 1.183 2023/12/07 13:59:05 deraadt Exp $ */ /* $NetBSD: uvm_mmap.c,v 1.49 2001/02/18 21:19:08 chs Exp $ */ /* @@ -644,6 +644,16 @@ sys_pinsyscall(struct proc *p, void *v, register_t *retval) return (0); } + /* + * sys_pinsyscalls + */ +int +sys_pinsyscalls(struct proc *p, void *v, register_t *retval) +{ + /* STUB until other parts are ready */ + return (0); +} + /* * sys_mimmutable: the mimmutable system call */ -- 2.20.1