Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Sep 2014 00:35:26 +0200
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        Sean Bruno <sbruno@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r271141 - in head/sys: kern sys
Message-ID:  <20140905223526.GB722@dft-labs.eu>
In-Reply-To: <201409042131.s84LVPh3065497@svn.freebsd.org>
References:  <201409042131.s84LVPh3065497@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 04, 2014 at 09:31:25PM +0000, Sean Bruno wrote:
> Author: sbruno
> Date: Thu Sep  4 21:31:25 2014
> New Revision: 271141
> URL: http://svnweb.freebsd.org/changeset/base/271141
> 
> Log:
>   Allow multiple image activators to run on the same execution by changing
>   imgp->interpreted to a bitmask instead of, functionally, a bool. Each
>   imgactivator now requires its own flag in interpreted to indicate whether
>   or not it has already examined argv[0].
>   
>   Change imgp->interpreted to an unsigned char to add one extra bit for
>   future use.
>   
>   With this change, one can execute a shell script from a 64bit host native
>   make and still get the binmisc image activator to fire for the script
>   interpreter.  Prior to this, execution would fail.
>   
>   Phabric:	https://reviews.freebsd.org/D696
>   Reviewed by:	jhb@
>   MFC after:	4 weeks
> 
> Modified:
>   head/sys/kern/imgact_binmisc.c
>   head/sys/kern/imgact_shell.c
>   head/sys/sys/imgact.h
> 
> Modified: head/sys/kern/imgact_binmisc.c
> ==============================================================================
> --- head/sys/kern/imgact_binmisc.c	Thu Sep  4 21:28:25 2014	(r271140)
> +++ head/sys/kern/imgact_binmisc.c	Thu Sep  4 21:31:25 2014	(r271141)
> @@ -600,12 +600,12 @@ imgact_binmisc_exec(struct image_params 
>  	}
>  
>  	/* No interpreter nesting allowed. */
> -	if (imgp->interpreted) {
> +	if (imgp->interpreted & IMGACT_BINMISC) {
>  		mtx_unlock(&interp_list_mtx);
>  		return (ENOEXEC);
>  	}
>  

Unrealated, but I have to ask: can't this be converted to an rmlock?

-- 
Mateusz Guzik <mjguzik gmail.com>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140905223526.GB722>