From nobody Wed Nov 17 20:22:35 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 357F3185531B; Wed, 17 Nov 2021 20:22:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvZ9V5BMCz4rG0; Wed, 17 Nov 2021 20:22:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4BFF027A87; Wed, 17 Nov 2021 20:22:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AHKMZRI059913; Wed, 17 Nov 2021 20:22:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMZn1059912; Wed, 17 Nov 2021 20:22:35 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:35 GMT Message-Id: <202111172022.1AHKMZn1059912@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 1de34945f440 - main - freebsd32: remove redundent osig*() implementations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1de34945f4403f67cc502ca6a9091ea3adf263b2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=1de34945f4403f67cc502ca6a9091ea3adf263b2 commit 1de34945f4403f67cc502ca6a9091ea3adf263b2 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:25 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:25 +0000 freebsd32: remove redundent osig*() implementations ofreebsd32_sigprocmask, ofreebsd32_sigblock, ofreebsd32_sigsetmask, and ofreebsd32_sigsuspend were all duplicates of the default ABI versions and there are no type concerns as all arguments are the same. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_misc.c | 47 ------------------------------- sys/compat/freebsd32/freebsd32_proto.h | 21 -------------- sys/compat/freebsd32/freebsd32_syscall.h | 8 +++--- sys/compat/freebsd32/freebsd32_syscalls.c | 8 +++--- sys/compat/freebsd32/freebsd32_sysent.c | 8 +++--- sys/compat/freebsd32/syscalls.master | 9 +++--- 6 files changed, 16 insertions(+), 85 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 08abd7ac26c8..c7c6036e81e8 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -2688,19 +2688,6 @@ ofreebsd32_sigaction(struct thread *td, return (error); } -int -ofreebsd32_sigprocmask(struct thread *td, - struct ofreebsd32_sigprocmask_args *uap) -{ - sigset_t set, oset; - int error; - - OSIG2SIG(uap->mask, set); - error = kern_sigprocmask(td, uap->how, &set, &oset, SIGPROCMASK_OLD); - SIG2OSIG(oset, td->td_retval[0]); - return (error); -} - struct sigvec32 { u_int32_t sv_handler; int sv_mask; @@ -2741,40 +2728,6 @@ ofreebsd32_sigvec(struct thread *td, return (error); } -int -ofreebsd32_sigblock(struct thread *td, - struct ofreebsd32_sigblock_args *uap) -{ - sigset_t set, oset; - - OSIG2SIG(uap->mask, set); - kern_sigprocmask(td, SIG_BLOCK, &set, &oset, 0); - SIG2OSIG(oset, td->td_retval[0]); - return (0); -} - -int -ofreebsd32_sigsetmask(struct thread *td, - struct ofreebsd32_sigsetmask_args *uap) -{ - sigset_t set, oset; - - OSIG2SIG(uap->mask, set); - kern_sigprocmask(td, SIG_SETMASK, &set, &oset, 0); - SIG2OSIG(oset, td->td_retval[0]); - return (0); -} - -int -ofreebsd32_sigsuspend(struct thread *td, - struct ofreebsd32_sigsuspend_args *uap) -{ - sigset_t mask; - - OSIG2SIG(uap->mask, mask); - return (kern_sigsuspend(td, mask)); -} - struct sigstack32 { u_int32_t ss_sp; int ss_onstack; diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 74410d1d0698..659339eb3715 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -910,10 +910,6 @@ struct ofreebsd32_sigaction_args { char nsa_l_[PADL_(struct osigaction32 *)]; struct osigaction32 * nsa; char nsa_r_[PADR_(struct osigaction32 *)]; char osa_l_[PADL_(struct osigaction32 *)]; struct osigaction32 * osa; char osa_r_[PADR_(struct osigaction32 *)]; }; -struct ofreebsd32_sigprocmask_args { - char how_l_[PADL_(int)]; int how; char how_r_[PADR_(int)]; - char mask_l_[PADL_(osigset_t)]; osigset_t mask; char mask_r_[PADR_(osigset_t)]; -}; struct ofreebsd32_fstat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char sb_l_[PADL_(struct ostat32 *)]; struct ostat32 * sb; char sb_r_[PADR_(struct ostat32 *)]; @@ -934,15 +930,6 @@ struct ofreebsd32_sigvec_args { char nsv_l_[PADL_(struct sigvec32 *)]; struct sigvec32 * nsv; char nsv_r_[PADR_(struct sigvec32 *)]; char osv_l_[PADL_(struct sigvec32 *)]; struct sigvec32 * osv; char osv_r_[PADR_(struct sigvec32 *)]; }; -struct ofreebsd32_sigblock_args { - char mask_l_[PADL_(int)]; int mask; char mask_r_[PADR_(int)]; -}; -struct ofreebsd32_sigsetmask_args { - char mask_l_[PADL_(int)]; int mask; char mask_r_[PADR_(int)]; -}; -struct ofreebsd32_sigsuspend_args { - char mask_l_[PADL_(int)]; int mask; char mask_r_[PADR_(int)]; -}; 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 *)]; @@ -972,14 +959,10 @@ int ofreebsd32_lseek(struct thread *, struct ofreebsd32_lseek_args *); int ofreebsd32_stat(struct thread *, struct ofreebsd32_stat_args *); int ofreebsd32_lstat(struct thread *, struct ofreebsd32_lstat_args *); int ofreebsd32_sigaction(struct thread *, struct ofreebsd32_sigaction_args *); -int ofreebsd32_sigprocmask(struct thread *, struct ofreebsd32_sigprocmask_args *); int ofreebsd32_fstat(struct thread *, struct ofreebsd32_fstat_args *); 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_sigblock(struct thread *, struct ofreebsd32_sigblock_args *); -int ofreebsd32_sigsetmask(struct thread *, struct ofreebsd32_sigsetmask_args *); -int ofreebsd32_sigsuspend(struct thread *, struct ofreebsd32_sigsuspend_args *); int ofreebsd32_sigstack(struct thread *, struct ofreebsd32_sigstack_args *); int ofreebsd32_getdirentries(struct thread *, struct ofreebsd32_getdirentries_args *); @@ -1322,7 +1305,6 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #define FREEBSD32_SYS_AUE_ofreebsd32_stat AUE_STAT #define FREEBSD32_SYS_AUE_ofreebsd32_lstat AUE_LSTAT #define FREEBSD32_SYS_AUE_ofreebsd32_sigaction AUE_SIGACTION -#define FREEBSD32_SYS_AUE_ofreebsd32_sigprocmask AUE_SIGPROCMASK #define FREEBSD32_SYS_AUE_freebsd32_sigaltstack AUE_SIGALTSTACK #define FREEBSD32_SYS_AUE_freebsd32_ioctl AUE_IOCTL #define FREEBSD32_SYS_AUE_freebsd32_execve AUE_EXECVE @@ -1335,9 +1317,6 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #define FREEBSD32_SYS_AUE_freebsd32_select AUE_SELECT #define FREEBSD32_SYS_AUE_ofreebsd32_sigreturn AUE_SIGRETURN #define FREEBSD32_SYS_AUE_ofreebsd32_sigvec AUE_O_SIGVEC -#define FREEBSD32_SYS_AUE_ofreebsd32_sigblock AUE_O_SIGBLOCK -#define FREEBSD32_SYS_AUE_ofreebsd32_sigsetmask AUE_O_SIGSETMASK -#define FREEBSD32_SYS_AUE_ofreebsd32_sigsuspend AUE_SIGSUSPEND #define FREEBSD32_SYS_AUE_ofreebsd32_sigstack AUE_O_SIGSTACK #define FREEBSD32_SYS_AUE_freebsd32_gettimeofday AUE_GETTIMEOFDAY #define FREEBSD32_SYS_AUE_freebsd32_getrusage AUE_GETRUSAGE diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index 316d3bfd5857..d263e7f4f7e7 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -53,7 +53,7 @@ #define FREEBSD32_SYS_ktrace 45 /* 46 is old freebsd32_sigaction */ #define FREEBSD32_SYS_getgid 47 - /* 48 is old freebsd32_sigprocmask */ + /* 48 is old sigprocmask */ #define FREEBSD32_SYS_getlogin 49 #define FREEBSD32_SYS_setlogin 50 #define FREEBSD32_SYS_acct 51 @@ -112,9 +112,9 @@ #define FREEBSD32_SYS_listen 106 /* 107 is obsolete vtimes */ /* 108 is old freebsd32_sigvec */ - /* 109 is old freebsd32_sigblock */ - /* 110 is old freebsd32_sigsetmask */ - /* 111 is old freebsd32_sigsuspend */ + /* 109 is old sigblock */ + /* 110 is old sigsetmask */ + /* 111 is old sigsuspend */ /* 112 is old freebsd32_sigstack */ /* 113 is obsolete orecvmsg */ /* 114 is obsolete osendmsg */ diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index cd990811c0da..9d5c19a06774 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -57,7 +57,7 @@ const char *freebsd32_syscallnames[] = { "ktrace", /* 45 = ktrace */ "compat.freebsd32_sigaction", /* 46 = old freebsd32_sigaction */ "getgid", /* 47 = getgid */ - "compat.freebsd32_sigprocmask", /* 48 = old freebsd32_sigprocmask */ + "compat.sigprocmask", /* 48 = old sigprocmask */ "getlogin", /* 49 = getlogin */ "setlogin", /* 50 = setlogin */ "acct", /* 51 = acct */ @@ -118,9 +118,9 @@ const char *freebsd32_syscallnames[] = { "listen", /* 106 = listen */ "obs_vtimes", /* 107 = obsolete vtimes */ "compat.freebsd32_sigvec", /* 108 = old freebsd32_sigvec */ - "compat.freebsd32_sigblock", /* 109 = old freebsd32_sigblock */ - "compat.freebsd32_sigsetmask", /* 110 = old freebsd32_sigsetmask */ - "compat.freebsd32_sigsuspend", /* 111 = old freebsd32_sigsuspend */ + "compat.sigblock", /* 109 = old sigblock */ + "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 */ diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 20c6d7a3e8a7..285ec61747a0 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -110,7 +110,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(ktrace_args), .sy_call = (sy_call_t *)sys_ktrace, .sy_auevent = AUE_KTRACE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 45 = ktrace */ { compat(AS(ofreebsd32_sigaction_args),freebsd32_sigaction), .sy_auevent = AUE_SIGACTION, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 46 = old freebsd32_sigaction */ { .sy_narg = 0, .sy_call = (sy_call_t *)sys_getgid, .sy_auevent = AUE_GETGID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 47 = getgid */ - { compat(AS(ofreebsd32_sigprocmask_args),freebsd32_sigprocmask), .sy_auevent = AUE_SIGPROCMASK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 48 = old freebsd32_sigprocmask */ + { compat(AS(osigprocmask_args),sigprocmask), .sy_auevent = AUE_SIGPROCMASK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 48 = old sigprocmask */ { .sy_narg = AS(getlogin_args), .sy_call = (sy_call_t *)sys_getlogin, .sy_auevent = AUE_GETLOGIN, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 49 = getlogin */ { .sy_narg = AS(setlogin_args), .sy_call = (sy_call_t *)sys_setlogin, .sy_auevent = AUE_SETLOGIN, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 50 = setlogin */ { .sy_narg = AS(acct_args), .sy_call = (sy_call_t *)sys_acct, .sy_auevent = AUE_ACCT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 51 = acct */ @@ -171,9 +171,9 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(listen_args), .sy_call = (sy_call_t *)sys_listen, .sy_auevent = AUE_LISTEN, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 106 = listen */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 107 = obsolete vtimes */ { compat(AS(ofreebsd32_sigvec_args),freebsd32_sigvec), .sy_auevent = AUE_O_SIGVEC, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 108 = old freebsd32_sigvec */ - { compat(AS(ofreebsd32_sigblock_args),freebsd32_sigblock), .sy_auevent = AUE_O_SIGBLOCK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 109 = old freebsd32_sigblock */ - { compat(AS(ofreebsd32_sigsetmask_args),freebsd32_sigsetmask), .sy_auevent = AUE_O_SIGSETMASK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 110 = old freebsd32_sigsetmask */ - { compat(AS(ofreebsd32_sigsuspend_args),freebsd32_sigsuspend), .sy_auevent = AUE_SIGSUSPEND, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 111 = old freebsd32_sigsuspend */ + { compat(AS(osigblock_args),sigblock), .sy_auevent = AUE_O_SIGBLOCK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 109 = old sigblock */ + { 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 */ diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index f3c506e856b5..a88568b620d8 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -142,8 +142,7 @@ struct osigaction32 *nsa, \ struct osigaction32 *osa); } 47 AUE_GETGID NOPROTO { gid_t getgid(void); } -48 AUE_SIGPROCMASK COMPAT { int freebsd32_sigprocmask(int how, \ - osigset_t mask); } +48 AUE_SIGPROCMASK COMPAT|NOPROTO { int sigprocmask(int how, osigset_t mask); } 49 AUE_GETLOGIN NOPROTO { int getlogin(char *namebuf, \ u_int namelen); } 50 AUE_SETLOGIN NOPROTO { int setlogin(const char *namebuf); } @@ -235,9 +234,9 @@ 108 AUE_O_SIGVEC COMPAT { int freebsd32_sigvec(int signum, \ struct sigvec32 *nsv, \ struct sigvec32 *osv); } -109 AUE_O_SIGBLOCK COMPAT { int freebsd32_sigblock(int mask); } -110 AUE_O_SIGSETMASK COMPAT { int freebsd32_sigsetmask( int mask); } -111 AUE_SIGSUSPEND COMPAT { int freebsd32_sigsuspend( int mask); } +109 AUE_O_SIGBLOCK COMPAT|NOPROTO { int sigblock(int mask); } +110 AUE_O_SIGSETMASK COMPAT|NOPROTO { int sigsetmask(int mask); } +111 AUE_SIGSUSPEND COMPAT|NOPROTO { int sigsuspend( int mask); } 112 AUE_O_SIGSTACK COMPAT { int freebsd32_sigstack( \ struct sigstack32 *nss, \ struct sigstack32 *oss); }