From owner-svn-src-stable-7@FreeBSD.ORG Tue Mar 24 02:09:48 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EFDC106564A; Tue, 24 Mar 2009 02:09:48 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 51B438FC0C; Tue, 24 Mar 2009 02:09:48 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n2O29mB8029267; Tue, 24 Mar 2009 02:09:48 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2O29mPB029266; Tue, 24 Mar 2009 02:09:48 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200903240209.n2O29mPB029266@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 24 Mar 2009 02:09:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r190360 - in stable/7/sys: . amd64/linux32 contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2009 02:09:49 -0000 Author: obrien Date: Tue Mar 24 02:09:48 2009 New Revision: 190360 URL: http://svn.freebsd.org/changeset/base/190360 Log: MFC: r187964: Fix the inconsistent tabbing. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/linux32/linux32_sysvec.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- stable/7/sys/amd64/linux32/linux32_sysvec.c Tue Mar 24 01:56:16 2009 (r190359) +++ stable/7/sys/amd64/linux32/linux32_sysvec.c Tue Mar 24 02:09:48 2009 (r190360) @@ -353,11 +353,11 @@ 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_gs = rgs(); - frame.sf_sc.uc_mcontext.sc_fs = rfs(); - __asm __volatile("movl %%es,%0" : + frame.sf_sc.uc_mcontext.sc_gs = rgs(); + frame.sf_sc.uc_mcontext.sc_fs = rfs(); + __asm __volatile("movl %%es,%0" : "=rm" (frame.sf_sc.uc_mcontext.sc_es)); - __asm __volatile("movl %%ds,%0" : + __asm __volatile("movl %%ds,%0" : "=rm" (frame.sf_sc.uc_mcontext.sc_ds)); frame.sf_sc.uc_mcontext.sc_edi = regs->tf_rdi; frame.sf_sc.uc_mcontext.sc_esi = regs->tf_rsi; @@ -487,10 +487,10 @@ 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_gs = rgs(); - frame.sf_sc.sc_fs = rfs(); - __asm __volatile("movl %%es,%0" : "=rm" (frame.sf_sc.sc_es)); - __asm __volatile("movl %%ds,%0" : "=rm" (frame.sf_sc.sc_ds)); + frame.sf_sc.sc_gs = rgs(); + frame.sf_sc.sc_fs = rfs(); + __asm __volatile("movl %%es,%0" : "=rm" (frame.sf_sc.sc_es)); + __asm __volatile("movl %%ds,%0" : "=rm" (frame.sf_sc.sc_ds)); frame.sf_sc.sc_edi = regs->tf_rdi; frame.sf_sc.sc_esi = regs->tf_rsi; frame.sf_sc.sc_ebp = regs->tf_rbp; @@ -772,35 +772,36 @@ static int exec_linux_imgact_try(struct static int exec_linux_imgact_try(struct image_params *imgp) { - const char *head = (const char *)imgp->image_header; - char *rpath; - int error = -1, len; - - /* - * The interpreter for shell scripts run from a linux binary needs - * to be located in /compat/linux if possible in order to recursively - * maintain linux path emulation. - */ - if (((const short *)head)[0] == SHELLMAGIC) { - /* - * Run our normal shell image activator. If it succeeds attempt - * to use the alternate path for the interpreter. If an alternate - * path is found, use our stringspace to store it. - */ - if ((error = exec_shell_imgact(imgp)) == 0) { - linux_emul_convpath(FIRST_THREAD_IN_PROC(imgp->proc), - imgp->interpreter_name, UIO_SYSSPACE, &rpath, 0); - if (rpath != NULL) { - len = strlen(rpath) + 1; - - if (len <= MAXSHELLCMDLEN) { - memcpy(imgp->interpreter_name, rpath, len); - } - free(rpath, M_TEMP); - } - } - } - return(error); + const char *head = (const char *)imgp->image_header; + char *rpath; + int error = -1, len; + + /* + * The interpreter for shell scripts run from a linux binary needs + * to be located in /compat/linux if possible in order to recursively + * maintain linux path emulation. + */ + if (((const short *)head)[0] == SHELLMAGIC) { + /* + * Run our normal shell image activator. If it succeeds + * attempt to use the alternate path for the interpreter. If + * an alternate path is found, use our stringspace to store it. + */ + if ((error = exec_shell_imgact(imgp)) == 0) { + linux_emul_convpath(FIRST_THREAD_IN_PROC(imgp->proc), + imgp->interpreter_name, UIO_SYSSPACE, &rpath, 0); + if (rpath != NULL) { + len = strlen(rpath) + 1; + + if (len <= MAXSHELLCMDLEN) { + memcpy(imgp->interpreter_name, rpath, + len); + } + free(rpath, M_TEMP); + } + } + } + return(error); } /* @@ -868,7 +869,7 @@ linux_copyout_strings(struct image_param arginfo = (struct linux32_ps_strings *)LINUX32_PS_STRINGS; sigcodesz = *(imgp->proc->p_sysent->sv_szsigcode); destp = (caddr_t)arginfo - sigcodesz - SPARE_USRSPACE - - roundup((ARG_MAX - imgp->args->stringspace), sizeof(char *)); + roundup((ARG_MAX - imgp->args->stringspace), sizeof(char *)); /* * install sigcode @@ -886,23 +887,24 @@ linux_copyout_strings(struct image_param * 'AT_COUNT*2' is size for the ELF Auxargs data. This is for * lower compatibility. */ - imgp->auxarg_size = (imgp->auxarg_size) ? imgp->auxarg_size - : (AT_COUNT * 2); + imgp->auxarg_size = (imgp->auxarg_size) ? imgp->auxarg_size : + (AT_COUNT * 2); /* * The '+ 2' is for the null pointers at the end of each of * the arg and env vector sets,and imgp->auxarg_size is room * for argument of Runtime loader. */ - vectp = (u_int32_t *) (destp - (imgp->args->argc + imgp->args->envc + 2 + - imgp->auxarg_size) * sizeof(u_int32_t)); + vectp = (u_int32_t *)(destp - (imgp->args->argc + + imgp->args->envc + 2 + imgp->auxarg_size) * + sizeof(u_int32_t)); } else /* * The '+ 2' is for the null pointers at the end of each of * the arg and env vector sets */ - vectp = (u_int32_t *) - (destp - (imgp->args->argc + imgp->args->envc + 2) * sizeof(u_int32_t)); + vectp = (u_int32_t *)(destp - (imgp->args->argc + + imgp->args->envc + 2) * sizeof(u_int32_t)); /* * vectp also becomes our initial stack base @@ -974,7 +976,7 @@ linux32_fixlimit(struct rlimit *rl, int switch (which) { case RLIMIT_DATA: - if (linux32_maxdsiz != 0) { + if (linux32_maxdsiz != 0) { if (rl->rlim_cur > linux32_maxdsiz) rl->rlim_cur = linux32_maxdsiz; if (rl->rlim_max > linux32_maxdsiz) @@ -1083,12 +1085,12 @@ linux_elf_modevent(module_t mod, int typ sx_init(&emul_shared_lock, "emuldata->shared lock"); LIST_INIT(&futex_list); sx_init(&futex_sx, "futex protection lock"); - linux_exit_tag = EVENTHANDLER_REGISTER(process_exit, linux_proc_exit, - NULL, 1000); - linux_schedtail_tag = EVENTHANDLER_REGISTER(schedtail, linux_schedtail, - NULL, 1000); - linux_exec_tag = EVENTHANDLER_REGISTER(process_exec, linux_proc_exec, - NULL, 1000); + linux_exit_tag = EVENTHANDLER_REGISTER(process_exit, + linux_proc_exit, NULL, 1000); + linux_schedtail_tag = EVENTHANDLER_REGISTER(schedtail, + linux_schedtail, NULL, 1000); + linux_exec_tag = EVENTHANDLER_REGISTER(process_exec, + linux_proc_exec, NULL, 1000); if (bootverbose) printf("Linux ELF exec handler installed\n"); } else