From owner-freebsd-current@FreeBSD.ORG Tue Oct 6 08:49:11 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC0D51065672 for ; Tue, 6 Oct 2009 08:49:11 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from services.ipt.ru (services.ipt.ru [194.62.233.110]) by mx1.freebsd.org (Postfix) with ESMTP id A68BC8FC22 for ; Tue, 6 Oct 2009 08:49:11 +0000 (UTC) Received: from bb.ipt.ru ([194.62.233.89]) by services.ipt.ru with esmtp (Exim 4.54 (FreeBSD)) id 1Mv5jJ-0001pw-Oq; Tue, 06 Oct 2009 12:49:09 +0400 From: Boris Samorodov To: Kostik Belousov References: <78132948@bb.ipt.ru> <20091005190710.GW2259@deviant.kiev.zoral.com.ua> Date: Tue, 06 Oct 2009 12:49:09 +0400 In-Reply-To: <20091005190710.GW2259@deviant.kiev.zoral.com.ua> (Kostik Belousov's message of "Mon, 5 Oct 2009 22:07:10 +0300") Message-ID: <22767770@bb.ipt.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-current@freebsd.org Subject: Re: abort acroread at today's -current, but OK at 03-Oct -current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2009 08:49:12 -0000 On Mon, 5 Oct 2009 22:07:10 +0300 Kostik Belousov wrote: > On Mon, Oct 05, 2009 at 10:46:51PM +0400, Boris Samorodov wrote: > > > > today I updated my computer from 03-Oct CURRENT to -current and > > some ports were updated. And have got an error: > > ----- > > % acroread > > zsh: abort acroread > > % /bin/sh -x `which acroread` > > + echo '' > > + tr a-z A-Z > > + ADOBE_LANG='' > > + : ENU > > + BN=acroread > > + VN='' > > + [ -d /usr/local/Adobe/Reader8 ] > > + ADOBE_VER=8 > > + [ -d /usr/local/Adobe/Reader9 ] > > + ACROBASE=Adobe/Reader8 > > + BINPREFIX=Adobe/Reader8/bin > > + MOZILLA_COMP_PATH=/..//usr/local/lib/linux-nvu > > + export MOZILLA_COMP_PATH > > + GTK_IM_MODULE=xim > > + export GTK_IM_MODULE > > + UNAME_s=Linux > > + export UNAME_s > > + [ -x /usr/local/Adobe/Reader8/ENU/Adobe/Reader8/bin/acroread ] > > + exec /compat/linux/bin/sh /usr/local/Adobe/Reader8/ENU/Adobe/Reader8/bin/acroread > > zsh: abort /bin/sh -x `which acroread` > > ----- > > > > Loading old kernel gives a working acroread. What did I miss? > > Thanks. > Try this. > diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c > index 4ed7382..e958214 100644 > --- a/sys/kern/imgact_elf.c > +++ b/sys/kern/imgact_elf.c > @@ -635,7 +635,8 @@ __elfN(load_file)(struct proc *p, const char *file, u_long *addr, > } > > for (i = 0, numsegs = 0; i < hdr->e_phnum; i++) { > - if (phdr[i].p_type == PT_LOAD) { /* Loadable segment */ > + if (phdr[i].p_type == PT_LOAD && phdr[i].p_memsz != 0) { > + /* Loadable segment */ > prot = 0; > if (phdr[i].p_flags & PF_X) > prot |= VM_PROT_EXECUTE; > @@ -764,6 +768,8 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) > for (i = 0; i < hdr->e_phnum; i++) { > switch (phdr[i].p_type) { > case PT_LOAD: /* Loadable segment */ > + if (phdr[i].p_memsz == 0) > + break; > prot = 0; > if (phdr[i].p_flags & PF_X) > prot |= VM_PROT_EXECUTE; Thanks. Unfortunately there is no changes. Acroread works only with security.bsd.map_at_zero=1. -- WBR, Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone & Internet SP FreeBSD Committer, http://www.FreeBSD.org The Power To Serve