From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31904 invoked by alias); 22 Mar 2018 17:15:55 -0000 Mailing-List: contact gnu-gabi-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: gnu-gabi-owner@sourceware.org Received: (qmail 31118 invoked by uid 89); 22 Mar 2018 17:15:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.4 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=Hx-languages-length:1389, H*F:U*fw, U*hjl X-Spam-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: albireo.enyo.de Received: from albireo.enyo.de (HELO albireo.enyo.de) (5.158.152.32) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 22 Mar 2018 17:15:52 +0000 Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1ez3oa-0000ZJ-Q8; Thu, 22 Mar 2018 17:15:48 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.89) (envelope-from ) id 1ez3oa-0003pw-J9; Thu, 22 Mar 2018 18:15:48 +0100 From: Florian Weimer To: "H.J. Lu" Cc: "Carlos O'Donell" , Generic System V Application Binary Interface , gnu-gabi@sourceware.org Subject: Re: RFC: Audit external function called indirectly via GOT References: <20180317133115.GA4681@gmail.com> <87370txhr1.fsf@mid.deneb.enyo.de> <3a203b82-1247-5538-4848-92c9227cc77e@redhat.com> <87po3wo589.fsf@mid.deneb.enyo.de> <76f5551d-e8dc-4915-e3d8-54a2305a5718@redhat.com> <874ll8uker.fsf@mid.deneb.enyo.de> Date: Mon, 01 Jan 2018 00:00:00 -0000 In-Reply-To: (H. J. Lu's message of "Thu, 22 Mar 2018 10:00:02 -0700") Message-ID: <87zi30t4jf.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2018-q1/txt/msg00025.txt.bz2 * H. J. Lu: > On Thu, Mar 22, 2018 at 9:47 AM, Florian Weimer wrote: >> * Carlos O'Donell: >> >>> Well, Levin's "Linker's and Loaders" >>> https://www.iecc.com/linker/linker10.html, is the immediate reference >>> that I have on my shelf, and that developers working on glibc/binutils >>> should read. >> >> Thanks, I didn't know that. >> >>>> My understanding is that H.J.'s proposal requires changes when running >>>> in non-audit mode. It certainly requires relinking all binaries, >>>> perhaps even with special flags. >>> >>> It would require a relink only to fix existing binaries which are broken >>> by the use of -fno-plt, which is not an option that has seen general use >>> anywhere that I am aware of. >> >> I don't think that's actually true. BFD ld has not emitted >> R_X86_64_JUMP_SLOT relocations with -z now for quite some time now. >> This optimization predates -fno-plt. >> > > Not true with binutils 2.30: > > [hjl@gnu-bdx-1 include]$ readelf -d /bin/ld | grep NOW > 0x0000000000000018 (BIND_NOW) > 0x000000006ffffffb (FLAGS_1) Flags: NOW PIE > [hjl@gnu-bdx-1 include]$ readelf -rW /bin/ld | grep JUMP_SLOT > 00000000001b0868 0000000100000007 R_X86_64_JUMP_SLOT > 0000000000000000 getenv@GLIBC_2.2.5 + 0 > ... But binutils 2.28 or some earlier version exhibited different behavior, right?