Page MenuHomeFreeBSD

D15557.id42945.diff
No OneTemporary

D15557.id42945.diff

Index: lib/libc/sys/Makefile.inc
===================================================================
--- lib/libc/sys/Makefile.inc
+++ lib/libc/sys/Makefile.inc
@@ -46,6 +46,7 @@
PSEUDO+= _getdirentries.o
SRCS+= pipe.c
+SRCS+= vadvise.c
INTERPOSED = \
accept \
Index: lib/libc/sys/vadvise.c
===================================================================
--- /dev/null
+++ lib/libc/sys/vadvise.c
@@ -0,0 +1,47 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2018 SRI International
+ * All rights reserved.
+ *
+ * This software was developed by SRI International and the University of
+ * Cambridge Computer Laboratory (Department of Computer Science and
+ * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the
+ * DARPA SSITH research programme.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+#include <sys/errno.h>
+
+__weak_reference(__sys_vadvise, vadvise);
+__weak_reference(__sys_vadvise, _vadvise);
+
+int __sys_vadvise(int);
+
+int
+__sys_vadvise(int arg __unused)
+{
+
+ return (EINVAL);
+}
Index: sys/compat/freebsd32/syscalls.master
===================================================================
--- sys/compat/freebsd32/syscalls.master
+++ sys/compat/freebsd32/syscalls.master
@@ -173,8 +173,7 @@
70 AUE_SSTK NOPROTO { int sstk(int incr); }
71 AUE_MMAP COMPAT|NOPROTO { int mmap(void *addr, int len, \
int prot, int flags, int fd, int pos); }
-72 AUE_O_VADVISE NOPROTO { int ovadvise(int anom); } vadvise \
- ovadvise_args int
+72 AUE_O_VADVISE COMPAT11|NOPROTO { int vadvise(int anom); }
73 AUE_MUNMAP NOPROTO { int munmap(void *addr, size_t len); }
74 AUE_MPROTECT STD { int freebsd32_mprotect(void *addr, \
size_t len, int prot); }
Index: sys/kern/syscalls.master
===================================================================
--- sys/kern/syscalls.master
+++ sys/kern/syscalls.master
@@ -229,8 +229,7 @@
70 AUE_SSTK STD { int sstk(int incr); }
71 AUE_MMAP COMPAT { int mmap(_In_ void *addr, int len, int prot, \
int flags, int fd, long pos); }
-72 AUE_O_VADVISE STD { int ovadvise(int anom); } vadvise \
- ovadvise_args int
+72 AUE_O_VADVISE COMPAT11 { int vadvise(int anom); }
73 AUE_MUNMAP STD { int munmap(_In_ void *addr, size_t len); }
74 AUE_MPROTECT STD { int mprotect(_In_ void *addr, \
size_t len, int prot); }
Index: sys/vm/vm_unix.c
===================================================================
--- sys/vm/vm_unix.c
+++ sys/vm/vm_unix.c
@@ -232,20 +232,16 @@
return (error);
}
+#ifdef COMPAT_FREEBSD11
#ifndef _SYS_SYSPROTO_H_
-struct ovadvise_args {
+struct freebsd11_vadvise_args {
int anom;
};
#endif
-
-/*
- * MPSAFE
- */
-/* ARGSUSED */
int
-sys_ovadvise(struct thread *td, struct ovadvise_args *uap)
+freebsd11_vadvise(struct thread *td, struct freebsd11_vadvise_args *uap)
{
- /* START_GIANT_OPTIONAL */
- /* END_GIANT_OPTIONAL */
+
return (EINVAL);
}
+#endif

File Metadata

Mime Type
text/plain
Expires
Mon, Mar 16, 9:39 AM (6 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29732143
Default Alt Text
D15557.id42945.diff (4 KB)

Event Timeline