From owner-svn-src-head@FreeBSD.ORG Sun May 24 16:30:24 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A699B4A9; Sun, 24 May 2015 16:30:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8731A1459; Sun, 24 May 2015 16:30:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4OGUOfO085326; Sun, 24 May 2015 16:30:24 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4OGUNIE085323; Sun, 24 May 2015 16:30:23 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201505241630.t4OGUNIE085323@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 24 May 2015 16:30:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283436 - in head/sys: amd64/linux32 compat/linux i386/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2015 16:30:24 -0000 Author: dchagin Date: Sun May 24 16:30:23 2015 New Revision: 283436 URL: https://svnweb.freebsd.org/changeset/base/283436 Log: Use the BSD_TO_LINUX_SIGNAL() wherever there is no need to check the ABI as it is known. Differential Revision: https://reviews.freebsd.org/D1086 Modified: head/sys/amd64/linux32/linux32_sysvec.c head/sys/compat/linux/linux_signal.c head/sys/i386/linux/linux_sysvec.c Modified: head/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysvec.c Sun May 24 16:28:58 2015 (r283435) +++ head/sys/amd64/linux32/linux32_sysvec.c Sun May 24 16:30:23 2015 (r283436) @@ -344,9 +344,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo /* * Build the argument list for the signal handler. */ - if (p->p_sysent->sv_sigtbl) - if (sig <= p->p_sysent->sv_sigsize) - sig = p->p_sysent->sv_sigtbl[_SIG_IDX(sig)]; + sig = BSD_TO_LINUX_SIGNAL(sig); bzero(&frame, sizeof(frame)); @@ -492,9 +490,7 @@ linux_sendsig(sig_t catcher, ksiginfo_t /* * Build the argument list for the signal handler. */ - if (p->p_sysent->sv_sigtbl) - if (sig <= p->p_sysent->sv_sigsize) - sig = p->p_sysent->sv_sigtbl[_SIG_IDX(sig)]; + sig = BSD_TO_LINUX_SIGNAL(sig); bzero(&frame, sizeof(frame)); Modified: head/sys/compat/linux/linux_signal.c ============================================================================== --- head/sys/compat/linux/linux_signal.c Sun May 24 16:28:58 2015 (r283435) +++ head/sys/compat/linux/linux_signal.c Sun May 24 16:30:23 2015 (r283436) @@ -628,10 +628,8 @@ linux_tkill(struct thread *td, struct li if (!LINUX_SIG_VALID(args->sig)) return (EINVAL); - if (args->sig > 0 && args->sig <= LINUX_SIGTBLSZ) - sig = linux_to_bsd_signal[_SIG_IDX(args->sig)]; - else - sig = args->sig; + + sig = BSD_TO_LINUX_SIGNAL(args->sig); tdt = linux_tdfind(td, args->tid, -1); if (tdt == NULL) @@ -788,10 +786,7 @@ linux_rt_sigqueueinfo(struct thread *td, if (linfo.lsi_code >= 0) return (EPERM); - if (args->sig > 0 && args->sig <= LINUX_SIGTBLSZ) - sig = linux_to_bsd_signal[_SIG_IDX(args->sig)]; - else - sig = args->sig; + sig = BSD_TO_LINUX_SIGNAL(args->sig); error = ESRCH; if ((p = pfind(args->pid)) != NULL || Modified: head/sys/i386/linux/linux_sysvec.c ============================================================================== --- head/sys/i386/linux/linux_sysvec.c Sun May 24 16:28:58 2015 (r283435) +++ head/sys/i386/linux/linux_sysvec.c Sun May 24 16:30:23 2015 (r283436) @@ -480,9 +480,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo /* * Build the argument list for the signal handler. */ - if (p->p_sysent->sv_sigtbl) - if (sig <= p->p_sysent->sv_sigsize) - sig = p->p_sysent->sv_sigtbl[_SIG_IDX(sig)]; + sig = BSD_TO_LINUX_SIGNAL(sig); bzero(&frame, sizeof(frame)); @@ -623,9 +621,7 @@ linux_sendsig(sig_t catcher, ksiginfo_t /* * Build the argument list for the signal handler. */ - if (p->p_sysent->sv_sigtbl) - if (sig <= p->p_sysent->sv_sigsize) - sig = p->p_sysent->sv_sigtbl[_SIG_IDX(sig)]; + sig = BSD_TO_LINUX_SIGNAL(sig); bzero(&frame, sizeof(frame));