From owner-svn-src-user@FreeBSD.ORG Sat Feb 21 22:27:59 2015 Return-Path: Delivered-To: svn-src-user@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 9CBA0865; Sat, 21 Feb 2015 22:27:59 +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 7CE78FB0; Sat, 21 Feb 2015 22:27:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1LMRxFC010970; Sat, 21 Feb 2015 22:27:59 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1LMRwFV010966; Sat, 21 Feb 2015 22:27:58 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201502212227.t1LMRwFV010966@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 21 Feb 2015 22:27:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r279116 - user/dchagin/lemul/sys/i386/linux X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Feb 2015 22:27:59 -0000 Author: dchagin Date: Sat Feb 21 22:27:57 2015 New Revision: 279116 URL: https://svnweb.freebsd.org/changeset/base/279116 Log: Finish r279107. Fix build on i386. Modified: user/dchagin/lemul/sys/i386/linux/linux.h user/dchagin/lemul/sys/i386/linux/linux_machdep.c user/dchagin/lemul/sys/i386/linux/linux_ptrace.c user/dchagin/lemul/sys/i386/linux/linux_sysvec.c Modified: user/dchagin/lemul/sys/i386/linux/linux.h ============================================================================== --- user/dchagin/lemul/sys/i386/linux/linux.h Sat Feb 21 22:25:24 2015 (r279115) +++ user/dchagin/lemul/sys/i386/linux/linux.h Sat Feb 21 22:27:57 2015 (r279116) @@ -33,6 +33,7 @@ #include /* for sigval union */ +#include #include /* Modified: user/dchagin/lemul/sys/i386/linux/linux_machdep.c ============================================================================== --- user/dchagin/lemul/sys/i386/linux/linux_machdep.c Sat Feb 21 22:25:24 2015 (r279115) +++ user/dchagin/lemul/sys/i386/linux/linux_machdep.c Sat Feb 21 22:27:57 2015 (r279116) @@ -677,7 +677,7 @@ linux_sigaction(struct thread *td, struc act.lsa_flags = osa.lsa_flags; act.lsa_restorer = osa.lsa_restorer; LINUX_SIGEMPTYSET(act.lsa_mask); - act.lsa_mask.__bits[0] = osa.lsa_mask; + act.lsa_mask.__mask = osa.lsa_mask; } error = linux_do_sigaction(td, args->sig, args->nsa ? &act : NULL, @@ -687,7 +687,7 @@ linux_sigaction(struct thread *td, struc osa.lsa_handler = oact.lsa_handler; osa.lsa_flags = oact.lsa_flags; osa.lsa_restorer = oact.lsa_restorer; - osa.lsa_mask = oact.lsa_mask.__bits[0]; + osa.lsa_mask = oact.lsa_mask.__mask; error = copyout(&osa, args->osa, sizeof(l_osigaction_t)); } @@ -711,7 +711,7 @@ linux_sigsuspend(struct thread *td, stru #endif LINUX_SIGEMPTYSET(mask); - mask.__bits[0] = args->mask; + mask.__mask = args->mask; linux_to_bsd_sigset(&mask, &sigmask); return (kern_sigsuspend(td, sigmask)); } @@ -1100,7 +1100,7 @@ linux_waitid(struct thread *td, struct l if (td->td_retval[0] == 0) bzero(&lsi, sizeof(lsi)); else { - sig = BSD_TO_LINUX_SIGNAL(siginfo.si_signo); + sig = bsd_to_linux_signal(siginfo.si_signo); siginfo_to_lsiginfo(&siginfo, &lsi, sig); } error = copyout(&lsi, args->info, sizeof(lsi)); Modified: user/dchagin/lemul/sys/i386/linux/linux_ptrace.c ============================================================================== --- user/dchagin/lemul/sys/i386/linux/linux_ptrace.c Sat Feb 21 22:25:24 2015 (r279115) +++ user/dchagin/lemul/sys/i386/linux/linux_ptrace.c Sat Feb 21 22:27:57 2015 (r279116) @@ -91,8 +91,7 @@ static __inline int map_signum(int signum) { - if (signum > 0 && signum <= LINUX_SIGTBLSZ) - signum = linux_to_bsd_signal[_SIG_IDX(signum)]; + signum = linux_to_bsd_signal(signum); return ((signum == SIGSTOP)? 0 : signum); } Modified: user/dchagin/lemul/sys/i386/linux/linux_sysvec.c ============================================================================== --- user/dchagin/lemul/sys/i386/linux/linux_sysvec.c Sat Feb 21 22:25:24 2015 (r279115) +++ user/dchagin/lemul/sys/i386/linux/linux_sysvec.c Sat Feb 21 22:27:57 2015 (r279116) @@ -458,7 +458,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo /* * Build the argument list for the signal handler. */ - sig = BSD_TO_LINUX_SIGNAL(sig); + sig = bsd_to_linux_signal(sig); bzero(&frame, sizeof(frame)); @@ -484,7 +484,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo bsd_to_linux_sigset(mask, &frame.sf_sc.uc_sigmask); - frame.sf_sc.uc_mcontext.sc_mask = frame.sf_sc.uc_sigmask.__bits[0]; + frame.sf_sc.uc_mcontext.sc_mask = frame.sf_sc.uc_sigmask.__mask; frame.sf_sc.uc_mcontext.sc_gs = rgs(); frame.sf_sc.uc_mcontext.sc_fs = regs->tf_fs; frame.sf_sc.uc_mcontext.sc_es = regs->tf_es; @@ -563,7 +563,7 @@ linux_sendsig(sig_t catcher, ksiginfo_t struct l_sigframe *fp, frame; l_sigset_t lmask; int sig, code; - int oonstack, i; + int oonstack; PROC_LOCK_ASSERT(p, MA_OWNED); psp = p->p_sigacts; @@ -599,7 +599,7 @@ linux_sendsig(sig_t catcher, ksiginfo_t /* * Build the argument list for the signal handler. */ - sig = BSD_TO_LINUX_SIGNAL(sig); + sig = bsd_to_linux_signal(sig); bzero(&frame, sizeof(frame)); @@ -611,7 +611,7 @@ linux_sendsig(sig_t catcher, ksiginfo_t /* * Build the signal context to be used by sigreturn. */ - frame.sf_sc.sc_mask = lmask.__bits[0]; + frame.sf_sc.sc_mask = lmask.__mask; frame.sf_sc.sc_gs = rgs(); frame.sf_sc.sc_fs = regs->tf_fs; frame.sf_sc.sc_es = regs->tf_es; @@ -633,8 +633,7 @@ linux_sendsig(sig_t catcher, ksiginfo_t frame.sf_sc.sc_cr2 = (register_t)ksi->ksi_addr; frame.sf_sc.sc_trapno = bsd_to_linux_trapcode(ksi->ksi_trapno); - for (i = 0; i < (LINUX_NSIG_WORDS-1); i++) - frame.sf_extramask[i] = lmask.__bits[i+1]; + frame.sf_extramask[0] = lmask.__mask; if (copyout(&frame, fp, sizeof(frame)) != 0) { /* @@ -677,7 +676,7 @@ linux_sigreturn(struct thread *td, struc struct trapframe *regs; l_sigset_t lmask; sigset_t bmask; - int eflags, i; + int eflags; ksiginfo_t ksi; regs = td->td_frame; @@ -718,9 +717,7 @@ linux_sigreturn(struct thread *td, struc return (EINVAL); } - lmask.__bits[0] = frame.sf_sc.sc_mask; - for (i = 0; i < (LINUX_NSIG_WORDS-1); i++) - lmask.__bits[i+1] = frame.sf_extramask[i]; + lmask.__mask = frame.sf_sc.sc_mask; linux_to_bsd_sigset(&lmask, &bmask); kern_sigprocmask(td, SIG_SETMASK, &bmask, NULL, 0); @@ -959,8 +956,8 @@ struct sysentvec linux_sysvec = { .sv_size = LINUX_SYS_MAXSYSCALL, .sv_table = linux_sysent, .sv_mask = 0, - .sv_sigsize = LINUX_SIGTBLSZ, - .sv_sigtbl = bsd_to_linux_signal, + .sv_sigsize = 0, + .sv_sigtbl = NULL, .sv_errsize = ELAST + 1, .sv_errtbl = bsd_to_linux_errno, .sv_transtrap = translate_traps,