From owner-svn-src-head@freebsd.org Sat Nov 3 15:50:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43A1610DB8FD for ; Sat, 3 Nov 2018 15:50:07 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 8CE6C8706C; Sat, 3 Nov 2018 15:50:06 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id wA3Fnuep057443 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 3 Nov 2018 17:49:59 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua wA3Fnuep057443 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id wA3Fntjd057442; Sat, 3 Nov 2018 17:49:55 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 3 Nov 2018 17:49:55 +0200 From: Konstantin Belousov To: Mark Millard Cc: svn-src-head@freebsd.org, Alexander Richardson Subject: Re: svn commit: r339876 - head/libexec/rtld-elf Message-ID: <20181103154955.GR5335@kib.kiev.ua> References: <8E5A5F3A-F1A7-4702-A2F7-65D74CC5B2E5@yahoo.com> <20181102004101.GI5335@kib.kiev.ua> <003A49D7-6E8B-4775-A70B-E0EB44505D4B@yahoo.com> <20181102113827.GM5335@kib.kiev.ua> <7B29A4C8-228D-41CB-B594-98DFA456E9C8@yahoo.com> <20181102155234.GN5335@kib.kiev.ua> <20181102185014.GP5335@kib.kiev.ua> <34554290-D26E-4FED-A598-4FB3E313EA92@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <34554290-D26E-4FED-A598-4FB3E313EA92@yahoo.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Nov 2018 15:50:07 -0000 On Fri, Nov 02, 2018 at 05:51:25PM -0700, Mark Millard wrote: > On 2018-Nov-2, at 11:50 AM, Konstantin Belousov wrote: > > > On Fri, Nov 02, 2018 at 10:38:08AM -0700, Mark Millard wrote: > >> . . . > > > > There seems to be an issue with the direct execution mode on ppc. > > Even otherwise working ld-elf.so.1 segfaults if I try to use it as > > standalone binary. > > > > But if I specify patched ld-elf.so.1 as the interpreter for some program, > > using 'cc -Wl,-I,/ld-elf.so.1' it works. So I see there two bugs, > > one is regression due to textsize calculation, which should be fixed by > > my patch. Another is the direct exec problem. > > My head -r339076 based powerpc64 and armv7 contexts also > fail for: > > # /libexec/ld-elf.so.1 /bin/ls > > The armv7 (a Cortext-A7 context) is interestingly different > in how it fails: > > # /libexec/ld-elf.so.1 /bin/ls > ld-elf.so.1: /bin/ls: mmap of entire address space failed: Cannot allocate memory Can you show the ktrace/kdump for this ? > > My aarch64 context (a Cortext-A53 context) had no problem. > > (All 3 examples are without any of the the recent updates > or patches to ld-elf.so.1 source code.) And still, does the patch for isync range works ? You can test the new ld-elf.so.1 standalone by hard-coding its path into the binary. Build e.g. only ls(1) by using make in its directory, then re-issue the linking command with the additional flag '-Wl,-I, and try to run ls.full.