aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2021-11-17 20:12:25 +0000
committerBrooks Davis <brooks@FreeBSD.org>2021-11-17 20:12:25 +0000
commitf089a2f3d1a7830d6efc2b32fdf3279db4b33280 (patch)
tree9718bbd4e54d11598ea68abadb3f0e4c9a732d95
parente02f64d9b88ce33313755f4a94c46a7839a23f10 (diff)
downloadsrc-f089a2f3d1a7830d6efc2b32fdf3279db4b33280.tar.gz
src-f089a2f3d1a7830d6efc2b32fdf3279db4b33280.zip
freebsd32: add stubs for ofreebsd32_(send|recv)msg
The upcoming change to generate freebsd32 generated files from sys/kern/syscalls.master doesn't have a way to handle disabling this one without disabling the non-COMPAT counterpart so just add a stub for now. Reviewed by: kevans
-rw-r--r--sys/compat/freebsd32/freebsd32_misc.c17
-rw-r--r--sys/compat/freebsd32/freebsd32_proto.h14
-rw-r--r--sys/compat/freebsd32/freebsd32_syscall.h4
-rw-r--r--sys/compat/freebsd32/freebsd32_syscalls.c4
-rw-r--r--sys/compat/freebsd32/freebsd32_sysent.c4
-rw-r--r--sys/compat/freebsd32/syscalls.master6
6 files changed, 41 insertions, 8 deletions
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c
index 528180dbd063..4e69dc99b3b2 100644
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -1458,6 +1458,14 @@ freebsd32_recvmsg(struct thread *td, struct freebsd32_recvmsg_args *uap)
return (error);
}
+#ifdef COMPAT_43
+int
+ofreebsd32_recvmsg(struct thread *td, struct ofreebsd32_recvmsg_args *uap)
+{
+ return (ENOSYS);
+}
+#endif
+
/*
* Copy-in the array of control messages constructed using alignment
* and padding suitable for a 32-bit environment and construct an
@@ -1606,6 +1614,15 @@ out:
return (error);
}
+#ifdef COMPAT_43
+int
+ofreebsd32_sendmsg(struct thread *td, struct ofreebsd32_sendmsg_args *uap)
+{
+ return (ENOSYS);
+}
+#endif
+
+
int
freebsd32_settimeofday(struct thread *td,
struct freebsd32_settimeofday_args *uap)
diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h
index f86fb5dfa96f..701c4494b628 100644
--- a/sys/compat/freebsd32/freebsd32_proto.h
+++ b/sys/compat/freebsd32/freebsd32_proto.h
@@ -948,6 +948,16 @@ struct ofreebsd32_sigstack_args {
char nss_l_[PADL_(struct sigstack32 *)]; struct sigstack32 * nss; char nss_r_[PADR_(struct sigstack32 *)];
char oss_l_[PADL_(struct sigstack32 *)]; struct sigstack32 * oss; char oss_r_[PADR_(struct sigstack32 *)];
};
+struct ofreebsd32_recvmsg_args {
+ char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)];
+ char msg_l_[PADL_(struct omsghdr32 *)]; struct omsghdr32 * msg; char msg_r_[PADR_(struct omsghdr32 *)];
+ char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
+};
+struct ofreebsd32_sendmsg_args {
+ char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)];
+ char msg_l_[PADL_(const struct omsghdr32 *)]; const struct omsghdr32 * msg; char msg_r_[PADR_(const struct omsghdr32 *)];
+ char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
+};
struct ofreebsd32_getdirentries_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)];
@@ -978,6 +988,8 @@ int ofreebsd32_mmap(struct thread *, struct ofreebsd32_mmap_args *);
int ofreebsd32_sigreturn(struct thread *, struct ofreebsd32_sigreturn_args *);
int ofreebsd32_sigvec(struct thread *, struct ofreebsd32_sigvec_args *);
int ofreebsd32_sigstack(struct thread *, struct ofreebsd32_sigstack_args *);
+int ofreebsd32_recvmsg(struct thread *, struct ofreebsd32_recvmsg_args *);
+int ofreebsd32_sendmsg(struct thread *, struct ofreebsd32_sendmsg_args *);
int ofreebsd32_getdirentries(struct thread *, struct ofreebsd32_getdirentries_args *);
#endif /* COMPAT_43 */
@@ -1326,6 +1338,8 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta
#define FREEBSD32_SYS_AUE_ofreebsd32_sigreturn AUE_SIGRETURN
#define FREEBSD32_SYS_AUE_ofreebsd32_sigvec AUE_O_SIGVEC
#define FREEBSD32_SYS_AUE_ofreebsd32_sigstack AUE_O_SIGSTACK
+#define FREEBSD32_SYS_AUE_ofreebsd32_recvmsg AUE_RECVMSG
+#define FREEBSD32_SYS_AUE_ofreebsd32_sendmsg AUE_SENDMSG
#define FREEBSD32_SYS_AUE_freebsd32_gettimeofday AUE_GETTIMEOFDAY
#define FREEBSD32_SYS_AUE_freebsd32_getrusage AUE_GETRUSAGE
#define FREEBSD32_SYS_AUE_freebsd32_readv AUE_READV
diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h
index c57cce7c5343..312c136aa074 100644
--- a/sys/compat/freebsd32/freebsd32_syscall.h
+++ b/sys/compat/freebsd32/freebsd32_syscall.h
@@ -116,8 +116,8 @@
/* 110 is old sigsetmask */
/* 111 is old sigsuspend */
/* 112 is old freebsd32_sigstack */
- /* 113 is obsolete orecvmsg */
- /* 114 is obsolete osendmsg */
+ /* 113 is old freebsd32_recvmsg */
+ /* 114 is old freebsd32_sendmsg */
/* 115 is obsolete vtrace */
#define FREEBSD32_SYS_freebsd32_gettimeofday 116
#define FREEBSD32_SYS_freebsd32_getrusage 117
diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c
index 4ab6adb56b4a..31887661f39b 100644
--- a/sys/compat/freebsd32/freebsd32_syscalls.c
+++ b/sys/compat/freebsd32/freebsd32_syscalls.c
@@ -122,8 +122,8 @@ const char *freebsd32_syscallnames[] = {
"compat.sigsetmask", /* 110 = old sigsetmask */
"compat.sigsuspend", /* 111 = old sigsuspend */
"compat.freebsd32_sigstack", /* 112 = old freebsd32_sigstack */
- "obs_orecvmsg", /* 113 = obsolete orecvmsg */
- "obs_osendmsg", /* 114 = obsolete osendmsg */
+ "compat.freebsd32_recvmsg", /* 113 = old freebsd32_recvmsg */
+ "compat.freebsd32_sendmsg", /* 114 = old freebsd32_sendmsg */
"obs_vtrace", /* 115 = obsolete vtrace */
"freebsd32_gettimeofday", /* 116 = freebsd32_gettimeofday */
"freebsd32_getrusage", /* 117 = freebsd32_getrusage */
diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c
index c25ee1edaab7..dc700fca2a10 100644
--- a/sys/compat/freebsd32/freebsd32_sysent.c
+++ b/sys/compat/freebsd32/freebsd32_sysent.c
@@ -175,8 +175,8 @@ struct sysent freebsd32_sysent[] = {
{ compat(AS(osigsetmask_args),sigsetmask), .sy_auevent = AUE_O_SIGSETMASK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 110 = old sigsetmask */
{ compat(AS(osigsuspend_args),sigsuspend), .sy_auevent = AUE_SIGSUSPEND, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 111 = old sigsuspend */
{ compat(AS(ofreebsd32_sigstack_args),freebsd32_sigstack), .sy_auevent = AUE_O_SIGSTACK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 112 = old freebsd32_sigstack */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 113 = obsolete orecvmsg */
- { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 114 = obsolete osendmsg */
+ { compat(AS(ofreebsd32_recvmsg_args),freebsd32_recvmsg), .sy_auevent = AUE_RECVMSG, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 113 = old freebsd32_recvmsg */
+ { compat(AS(ofreebsd32_sendmsg_args),freebsd32_sendmsg), .sy_auevent = AUE_SENDMSG, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 114 = old freebsd32_sendmsg */
{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 115 = obsolete vtrace */
{ .sy_narg = AS(freebsd32_gettimeofday_args), .sy_call = (sy_call_t *)freebsd32_gettimeofday, .sy_auevent = AUE_GETTIMEOFDAY, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 116 = freebsd32_gettimeofday */
{ .sy_narg = AS(freebsd32_getrusage_args), .sy_call = (sy_call_t *)freebsd32_getrusage, .sy_auevent = AUE_GETRUSAGE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 117 = freebsd32_getrusage */
diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master
index a85b72c7fb6e..c4f94cab1add 100644
--- a/sys/compat/freebsd32/syscalls.master
+++ b/sys/compat/freebsd32/syscalls.master
@@ -247,8 +247,10 @@
112 AUE_O_SIGSTACK COMPAT { int freebsd32_sigstack( \
struct sigstack32 *nss, \
struct sigstack32 *oss); }
-113 AUE_NULL OBSOL orecvmsg
-114 AUE_NULL OBSOL osendmsg
+113 AUE_RECVMSG COMPAT { int freebsd32_recvmsg(int s, \
+ struct omsghdr32 *msg, int flags); }
+114 AUE_SENDMSG COMPAT { int freebsd32_sendmsg(int s, \
+ const struct omsghdr32 *msg, int flags); }
115 AUE_NULL OBSOL vtrace
116 AUE_GETTIMEOFDAY STD { int freebsd32_gettimeofday( \
struct timeval32 *tp, \