Date: Wed, 17 Nov 2021 20:22:07 GMT From: Brooks Davis <brooks@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 85d1d2a675c8 - main - syscalls: use struct siginfo rather than siginfo_t Message-ID: <202111172022.1AHKM7Ib059312@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=85d1d2a675c83d02591a96819c726fd597750d79 commit 85d1d2a675c83d02591a96819c726fd597750d79 Author: Brooks Davis <brooks@FreeBSD.org> AuthorDate: 2021-11-17 20:12:22 +0000 Commit: Brooks Davis <brooks@FreeBSD.org> CommitDate: 2021-11-17 20:12:22 +0000 syscalls: use struct siginfo rather than siginfo_t This allows freebsd32 to use struct siginfo32 with an automatable conversion. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_proto.h | 8 ++++---- sys/compat/freebsd32/freebsd32_systrace_args.c | 16 ++++++++-------- sys/compat/freebsd32/syscalls.master | 8 ++++---- sys/kern/syscalls.master | 6 +++--- sys/kern/systrace_args.c | 12 ++++++------ sys/sys/sysproto.h | 6 +++--- 6 files changed, 28 insertions(+), 28 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 2ddd5f472ccf..29bde63f4cec 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -297,12 +297,12 @@ struct freebsd32_jail_args { }; struct freebsd32_sigtimedwait_args { char set_l_[PADL_(const sigset_t *)]; const sigset_t * set; char set_r_[PADR_(const sigset_t *)]; - char info_l_[PADL_(siginfo_t *)]; siginfo_t * info; char info_r_[PADR_(siginfo_t *)]; + char info_l_[PADL_(struct siginfo32 *)]; struct siginfo32 * info; char info_r_[PADR_(struct siginfo32 *)]; char timeout_l_[PADL_(const struct timespec *)]; const struct timespec * timeout; char timeout_r_[PADR_(const struct timespec *)]; }; struct freebsd32_sigwaitinfo_args { char set_l_[PADL_(const sigset_t *)]; const sigset_t * set; char set_r_[PADR_(const sigset_t *)]; - char info_l_[PADL_(siginfo_t *)]; siginfo_t * info; char info_r_[PADR_(siginfo_t *)]; + char info_l_[PADL_(struct siginfo32 *)]; struct siginfo32 * info; char info_r_[PADR_(struct siginfo32 *)]; }; struct freebsd32_aio_waitcomplete_args { char aiocbp_l_[PADL_(struct aiocb32 **)]; struct aiocb32 ** aiocbp; char aiocbp_r_[PADR_(struct aiocb32 **)]; @@ -604,7 +604,7 @@ struct freebsd32_wait6_args { char status_l_[PADL_(int *)]; int * status; char status_r_[PADR_(int *)]; char options_l_[PADL_(int)]; int options; char options_r_[PADR_(int)]; char wrusage_l_[PADL_(struct wrusage32 *)]; struct wrusage32 * wrusage; char wrusage_r_[PADR_(struct wrusage32 *)]; - char info_l_[PADL_(siginfo_t *)]; siginfo_t * info; char info_r_[PADR_(siginfo_t *)]; + char info_l_[PADL_(struct siginfo32 *)]; struct siginfo32 * info; char info_r_[PADR_(struct siginfo32 *)]; }; #else struct freebsd32_posix_fallocate_args { @@ -629,7 +629,7 @@ struct freebsd32_wait6_args { char status_l_[PADL_(int *)]; int * status; char status_r_[PADR_(int *)]; char options_l_[PADL_(int)]; int options; char options_r_[PADR_(int)]; char wrusage_l_[PADL_(struct wrusage32 *)]; struct wrusage32 * wrusage; char wrusage_r_[PADR_(struct wrusage32 *)]; - char info_l_[PADL_(siginfo_t *)]; siginfo_t * info; char info_r_[PADR_(siginfo_t *)]; + char info_l_[PADL_(struct siginfo32 *)]; struct siginfo32 * info; char info_r_[PADR_(struct siginfo32 *)]; }; #endif struct freebsd32_cap_ioctls_limit_args { diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 96a67aef6255..64e500aaad25 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -1593,7 +1593,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 345: { struct freebsd32_sigtimedwait_args *p = params; uarg[0] = (intptr_t)p->set; /* const sigset_t * */ - uarg[1] = (intptr_t)p->info; /* siginfo_t * */ + uarg[1] = (intptr_t)p->info; /* struct siginfo32 * */ uarg[2] = (intptr_t)p->timeout; /* const struct timespec * */ *n_args = 3; break; @@ -1602,7 +1602,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 346: { struct freebsd32_sigwaitinfo_args *p = params; uarg[0] = (intptr_t)p->set; /* const sigset_t * */ - uarg[1] = (intptr_t)p->info; /* siginfo_t * */ + uarg[1] = (intptr_t)p->info; /* struct siginfo32 * */ *n_args = 2; break; } @@ -2916,7 +2916,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) uarg[4] = (intptr_t)p->status; /* int * */ iarg[5] = p->options; /* int */ uarg[6] = (intptr_t)p->wrusage; /* struct wrusage32 * */ - uarg[7] = (intptr_t)p->info; /* siginfo_t * */ + uarg[7] = (intptr_t)p->info; /* struct siginfo32 * */ *n_args = 8; break; } @@ -2953,7 +2953,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) uarg[3] = (intptr_t)p->status; /* int * */ iarg[4] = p->options; /* int */ uarg[5] = (intptr_t)p->wrusage; /* struct wrusage32 * */ - uarg[6] = (intptr_t)p->info; /* siginfo_t * */ + uarg[6] = (intptr_t)p->info; /* struct siginfo32 * */ *n_args = 7; break; } @@ -5929,7 +5929,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const sigset_t *"; break; case 1: - p = "userland siginfo_t *"; + p = "userland struct siginfo32 *"; break; case 2: p = "userland const struct timespec *"; @@ -5945,7 +5945,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const sigset_t *"; break; case 1: - p = "userland siginfo_t *"; + p = "userland struct siginfo32 *"; break; default: break; @@ -8298,7 +8298,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland struct wrusage32 *"; break; case 7: - p = "userland siginfo_t *"; + p = "userland struct siginfo32 *"; break; default: break; @@ -8374,7 +8374,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland struct wrusage32 *"; break; case 6: - p = "userland siginfo_t *"; + p = "userland struct siginfo32 *"; break; default: break; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index c76e6b426b2e..1cf37d777c25 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -627,10 +627,10 @@ 344 AUE_SIGRETURN COMPAT4 { int freebsd32_sigreturn( \ const struct freebsd4_freebsd32_ucontext *sigcntxp); } 345 AUE_SIGWAIT STD { int freebsd32_sigtimedwait(const sigset_t *set, \ - siginfo_t *info, \ + struct siginfo32 *info, \ const struct timespec *timeout); } 346 AUE_NULL STD { int freebsd32_sigwaitinfo(const sigset_t *set, \ - siginfo_t *info); } + struct siginfo32 *info); } 347 AUE_ACL_GET_FILE NOPROTO { int __acl_get_file(const char *path, \ acl_type_t type, struct acl *aclp); } 348 AUE_ACL_SET_FILE NOPROTO { int __acl_set_file(const char *path, \ @@ -1036,7 +1036,7 @@ uint32_t id1, uint32_t id2, \ int *status, int options, \ struct wrusage32 *wrusage, \ - siginfo_t *info); } + struct siginfo32 *info); } #else 530 AUE_POSIX_FALLOCATE STD { int freebsd32_posix_fallocate(int fd,\ uint32_t offset1, uint32_t offset2,\ @@ -1049,7 +1049,7 @@ uint32_t id1, uint32_t id2, \ int *status, int options, \ struct wrusage32 *wrusage, \ - siginfo_t *info); } + struct siginfo32 *info); } #endif 533 AUE_CAP_RIGHTS_LIMIT NOPROTO { \ int cap_rights_limit(int fd, \ diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index bacf76a94437..a4dcac75b2b3 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1783,14 +1783,14 @@ 345 AUE_SIGWAIT STD|CAPENABLED { int sigtimedwait( _In_ const sigset_t *set, - _Out_opt_ siginfo_t *info, + _Out_opt_ struct siginfo *info, _In_opt_ const struct timespec *timeout ); } 346 AUE_NULL STD|CAPENABLED { int sigwaitinfo( _In_ const sigset_t *set, - _Out_opt_ siginfo_t *info + _Out_opt_ struct siginfo *info ); } 347 AUE_ACL_GET_FILE STD { @@ -2920,7 +2920,7 @@ _Out_opt_ int *status, int options, _Out_opt_ struct __wrusage *wrusage, - _Out_opt_ siginfo_t *info + _Out_opt_ struct siginfo *info ); } 533 AUE_CAP_RIGHTS_LIMIT STD|CAPENABLED { diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index ab8e4d0d49d3..140dbea1474e 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -1638,7 +1638,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 345: { struct sigtimedwait_args *p = params; uarg[0] = (intptr_t)p->set; /* const sigset_t * */ - uarg[1] = (intptr_t)p->info; /* siginfo_t * */ + uarg[1] = (intptr_t)p->info; /* struct siginfo * */ uarg[2] = (intptr_t)p->timeout; /* const struct timespec * */ *n_args = 3; break; @@ -1647,7 +1647,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 346: { struct sigwaitinfo_args *p = params; uarg[0] = (intptr_t)p->set; /* const sigset_t * */ - uarg[1] = (intptr_t)p->info; /* siginfo_t * */ + uarg[1] = (intptr_t)p->info; /* struct siginfo * */ *n_args = 2; break; } @@ -2980,7 +2980,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) uarg[2] = (intptr_t)p->status; /* int * */ iarg[3] = p->options; /* int */ uarg[4] = (intptr_t)p->wrusage; /* struct __wrusage * */ - uarg[5] = (intptr_t)p->info; /* siginfo_t * */ + uarg[5] = (intptr_t)p->info; /* struct siginfo * */ *n_args = 6; break; } @@ -5996,7 +5996,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const sigset_t *"; break; case 1: - p = "userland siginfo_t *"; + p = "userland struct siginfo *"; break; case 2: p = "userland const struct timespec *"; @@ -6012,7 +6012,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const sigset_t *"; break; case 1: - p = "userland siginfo_t *"; + p = "userland struct siginfo *"; break; default: break; @@ -8348,7 +8348,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland struct __wrusage *"; break; case 5: - p = "userland siginfo_t *"; + p = "userland struct siginfo *"; break; default: break; diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index ee1517573afa..64d38cbff42f 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -872,12 +872,12 @@ struct sigpending_args { }; struct sigtimedwait_args { char set_l_[PADL_(const sigset_t *)]; const sigset_t * set; char set_r_[PADR_(const sigset_t *)]; - char info_l_[PADL_(siginfo_t *)]; siginfo_t * info; char info_r_[PADR_(siginfo_t *)]; + char info_l_[PADL_(struct siginfo *)]; struct siginfo * info; char info_r_[PADR_(struct siginfo *)]; char timeout_l_[PADL_(const struct timespec *)]; const struct timespec * timeout; char timeout_r_[PADR_(const struct timespec *)]; }; struct sigwaitinfo_args { char set_l_[PADL_(const sigset_t *)]; const sigset_t * set; char set_r_[PADR_(const sigset_t *)]; - char info_l_[PADL_(siginfo_t *)]; siginfo_t * info; char info_r_[PADR_(siginfo_t *)]; + char info_l_[PADL_(struct siginfo *)]; struct siginfo * info; char info_r_[PADR_(struct siginfo *)]; }; struct __acl_get_file_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; @@ -1610,7 +1610,7 @@ struct wait6_args { char status_l_[PADL_(int *)]; int * status; char status_r_[PADR_(int *)]; char options_l_[PADL_(int)]; int options; char options_r_[PADR_(int)]; char wrusage_l_[PADL_(struct __wrusage *)]; struct __wrusage * wrusage; char wrusage_r_[PADR_(struct __wrusage *)]; - char info_l_[PADL_(siginfo_t *)]; siginfo_t * info; char info_r_[PADR_(siginfo_t *)]; + char info_l_[PADL_(struct siginfo *)]; struct siginfo * info; char info_r_[PADR_(struct siginfo *)]; }; struct cap_rights_limit_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202111172022.1AHKM7Ib059312>