From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 22:35:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D75C402; Fri, 5 Sep 2014 22:35:37 +0000 (UTC) Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [IPv6:2a00:1450:400c:c05::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B950E1932; Fri, 5 Sep 2014 22:35:36 +0000 (UTC) Received: by mail-wi0-f170.google.com with SMTP id cc10so222636wib.1 for ; Fri, 05 Sep 2014 15:35:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=yvDxkt9Npkqy4uC3mVwSX5djbYS3LD4X+IHVWhdS49E=; b=ovxiLqCsQoyb61pQOUrdZQbJz7GoDA+3xrDJ3lwLSGiqhnMZ4tY0VT4atYW6Gr5kEn WuGU8RrNvJlxScxyG8GGxQ+yeo9wbpSs+qLhYIIx8fdnXcDCfmBRStdwO4Z951GklHLk M3o003kmI6fPmrvEAPKdC3oOH3OIXT4cMlIfLhW5p+rkPeS00Xj12ZNLD2Mnkci/lX3F IE/RFTNerl3AcHDEizM2rjDDq07nm+vLQQ4ydmYS4Fny8YvZb4mQ/Q1HqzsOeQhApXA0 yBngms1NJM5MlGqJ9AdzpyBXtJkFZyzdYD8fSGWnbm5uTuCCKlbSmflJHO4ahHo0gG7n ulkg== X-Received: by 10.180.212.50 with SMTP id nh18mr6226598wic.81.1409956534775; Fri, 05 Sep 2014 15:35:34 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id hi4sm2742019wjb.46.2014.09.05.15.35.33 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 05 Sep 2014 15:35:33 -0700 (PDT) Date: Sat, 6 Sep 2014 00:35:26 +0200 From: Mateusz Guzik To: Sean Bruno Subject: Re: svn commit: r271141 - in head/sys: kern sys Message-ID: <20140905223526.GB722@dft-labs.eu> References: <201409042131.s84LVPh3065497@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201409042131.s84LVPh3065497@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 22:35:37 -0000 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