[Midnightbsd-cvs] src [12344] trunk/sys/sys/sysent.h: sync with FreeBSD 11-stable
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Feb 8 15:09:30 EST 2020
Revision: 12344
http://svnweb.midnightbsd.org/src/?rev=12344
Author: laffer1
Date: 2020-02-08 15:09:29 -0500 (Sat, 08 Feb 2020)
Log Message:
-----------
sync with FreeBSD 11-stable
Modified Paths:
--------------
trunk/sys/sys/sysent.h
Modified: trunk/sys/sys/sysent.h
===================================================================
--- trunk/sys/sys/sysent.h 2020-02-08 20:08:57 UTC (rev 12343)
+++ trunk/sys/sys/sysent.h 2020-02-08 20:09:29 UTC (rev 12344)
@@ -27,7 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: stable/10/sys/sys/sysent.h 303395 2016-07-27 16:27:41Z julian $
+ * $FreeBSD: stable/11/sys/sys/sysent.h 346815 2019-04-28 13:16:54Z dchagin $
*/
#ifndef _SYS_SYSENT_H_
@@ -39,19 +39,19 @@
struct sysent;
struct thread;
struct ksiginfo;
+struct syscall_args;
+enum systrace_probe_t {
+ SYSTRACE_ENTRY,
+ SYSTRACE_RETURN,
+};
+
typedef int sy_call_t(struct thread *, void *);
-/* Used by the machine dependent syscall() code. */
-typedef void (*systrace_probe_func_t)(u_int32_t, int, struct sysent *, void *,
- int);
+typedef void (*systrace_probe_func_t)(struct syscall_args *,
+ enum systrace_probe_t, int);
+typedef void (*systrace_args_func_t)(int, void *, uint64_t *, int *);
-/*
- * Used by loaded syscalls to convert arguments to a DTrace array
- * of 64-bit arguments.
- */
-typedef void (*systrace_args_func_t)(int, void *, u_int64_t *, int *);
-
extern systrace_probe_func_t systrace_probe_func;
struct sysent { /* system call table */
@@ -77,9 +77,14 @@
#define SY_THR_ABSENT 0x4
#define SY_THR_INCR 0x8
+#ifdef KLD_MODULE
+#define SY_THR_STATIC_KLD 0
+#else
+#define SY_THR_STATIC_KLD SY_THR_STATIC
+#endif
+
struct image_params;
struct __sigset;
-struct syscall_args;
struct trapframe;
struct vnode;
@@ -87,10 +92,8 @@
int sv_size; /* number of entries */
struct sysent *sv_table; /* pointer to sysent */
u_int sv_mask; /* optional mask to index */
- int sv_sigsize; /* size of signal translation table */
- int *sv_sigtbl; /* signal translation table */
int sv_errsize; /* size of errno translation table */
- int *sv_errtbl; /* errno translation table */
+ const int *sv_errtbl; /* errno translation table */
int (*sv_transtrap)(int, int);
/* translate trap-to-signal mapping */
int (*sv_fixup)(register_t **, struct image_params *);
@@ -99,8 +102,6 @@
/* send signal */
char *sv_sigcode; /* start of sigtramp code */
int *sv_szsigcode; /* size of sigtramp code */
- void (*sv_prepsyscall)(struct trapframe *, int *, u_int *,
- caddr_t *);
char *sv_name; /* name of binary type */
int (*sv_coredump)(struct thread *, struct vnode *, off_t, int);
/* function to dump core, or NULL */
@@ -119,27 +120,28 @@
u_long *sv_maxssiz;
u_int sv_flags;
void (*sv_set_syscall_retval)(struct thread *, int);
- int (*sv_fetch_syscall_args)(struct thread *, struct
- syscall_args *);
+ int (*sv_fetch_syscall_args)(struct thread *);
const char **sv_syscallnames;
+ vm_offset_t sv_timekeep_base;
vm_offset_t sv_shared_page_base;
vm_offset_t sv_shared_page_len;
vm_offset_t sv_sigcode_base;
- vm_offset_t sv_timekeep_base;
- int sv_timekeep_off;
- int sv_timekeep_curr;
- uint32_t sv_timekeep_gen;
void *sv_shared_page_obj;
void (*sv_schedtail)(struct thread *);
void (*sv_thread_detach)(struct thread *);
int (*sv_trap)(struct thread *);
+ u_long *sv_hwcap; /* Value passed in AT_HWCAP. */
+ u_long *sv_hwcap2; /* Value passed in AT_HWCAP2. */
};
-#define SV_ILP32 0x000100
-#define SV_LP64 0x000200
-#define SV_IA32 0x004000
-#define SV_AOUT 0x008000
-#define SV_SHP 0x010000
+#define SV_ILP32 0x000100 /* 32-bit executable. */
+#define SV_LP64 0x000200 /* 64-bit executable. */
+#define SV_IA32 0x004000 /* Intel 32-bit executable. */
+#define SV_AOUT 0x008000 /* a.out executable. */
+#define SV_SHP 0x010000 /* Shared page. */
+#define SV_CAPSICUM 0x020000 /* Force cap_enter() on startup. */
+#define SV_TIMEKEEP 0x040000 /* Shared page timehands. */
+#define SV_HWCAP 0x080000 /* sv_hwcap field is valid. */
#define SV_ABI_MASK 0xff
#define SV_ABI_ERRNO(p, e) ((p)->p_sysent->sv_errsize <= 0 ? e : \
@@ -151,6 +153,7 @@
/* same as ELFOSABI_XXX, to prevent header pollution */
#define SV_ABI_LINUX 3
#define SV_ABI_FREEBSD 9
+#define SV_ABI_CLOUDABI 17
#define SV_ABI_UNDEF 255
#ifdef _KERNEL
@@ -158,7 +161,7 @@
extern struct sysent sysent[];
extern const char *syscallnames[];
-#if defined(__amd64__) || defined(__ia64__)
+#if defined(__amd64__)
extern int i386_read_exec;
#endif
@@ -172,6 +175,7 @@
int *offset; /* offset into sysent */
struct sysent *new_sysent; /* new sysent */
struct sysent old_sysent; /* old sysent */
+ int flags; /* flags for syscall_register */
};
/* separate initialization vector so it can be used in a substructure */
@@ -230,33 +234,39 @@
int syscall_no;
int registered;
};
-#define SYSCALL_INIT_HELPER(syscallname) { \
+#define SYSCALL_INIT_HELPER_F(syscallname, flags) { \
.new_sysent = { \
.sy_narg = (sizeof(struct syscallname ## _args ) \
/ sizeof(register_t)), \
.sy_call = (sy_call_t *)& sys_ ## syscallname, \
- .sy_auevent = SYS_AUE_##syscallname \
+ .sy_auevent = SYS_AUE_##syscallname, \
+ .sy_flags = (flags) \
}, \
.syscall_no = SYS_##syscallname \
}
-#define SYSCALL_INIT_HELPER_COMPAT(syscallname) { \
+#define SYSCALL_INIT_HELPER_COMPAT_F(syscallname, flags) { \
.new_sysent = { \
.sy_narg = (sizeof(struct syscallname ## _args ) \
/ sizeof(register_t)), \
.sy_call = (sy_call_t *)& syscallname, \
- .sy_auevent = SYS_AUE_##syscallname \
+ .sy_auevent = SYS_AUE_##syscallname, \
+ .sy_flags = (flags) \
}, \
.syscall_no = SYS_##syscallname \
}
+#define SYSCALL_INIT_HELPER(syscallname) \
+ SYSCALL_INIT_HELPER_F(syscallname, 0)
+#define SYSCALL_INIT_HELPER_COMPAT(syscallname) \
+ SYSCALL_INIT_HELPER_COMPAT_F(syscallname, 0)
#define SYSCALL_INIT_LAST { \
.syscall_no = NO_SYSCALL \
}
int syscall_register(int *offset, struct sysent *new_sysent,
- struct sysent *old_sysent);
+ struct sysent *old_sysent, int flags);
int syscall_deregister(int *offset, struct sysent *old_sysent);
int syscall_module_handler(struct module *mod, int what, void *arg);
-int syscall_helper_register(struct syscall_helper_data *sd);
+int syscall_helper_register(struct syscall_helper_data *sd, int flags);
int syscall_helper_unregister(struct syscall_helper_data *sd);
struct proc;
@@ -275,6 +285,7 @@
int shared_page_fill(int size, int align, const void *data);
void shared_page_write(int base, int size, const void *data);
void exec_sysvec_init(void *param);
+void exec_inittk(void);
#define INIT_SYSENTVEC(name, sv) \
SYSINIT(name, SI_SUB_EXEC, SI_ORDER_ANY, \
More information about the Midnightbsd-cvs
mailing list