From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57800 invoked by alias); 22 Mar 2018 17:16:44 -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 57778 invoked by uid 89); 22 Mar 2018 17:16:43 -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=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=U*hjl X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: mail-ot0-f181.google.com Received: from mail-ot0-f181.google.com (HELO mail-ot0-f181.google.com) (74.125.82.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 22 Mar 2018 17:16:41 +0000 Received: by mail-ot0-f181.google.com with SMTP id v23-v6so10289625oth.9 for ; Thu, 22 Mar 2018 10:16:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=P1WoNNKs6dgl5BF6PO9m8KMRQlWgRUhXlzRuwL/G4fE=; b=HLPKFALYjquPfXKWubdqGvcsIEArn5+i21K9gmX9DIJlJy5VPswdailH7n5KykggpD 0H9pR4ggqtQQxKOmw6ErEs6SpcN5MbBDk7SMj0gtO5GfUCltNq8mYSAmPx5vBgl+JaTI M1kNhGdlmhbU7+MFSIEO1/vo40i0NwOYtbMvrmtQraVDdxn9vmglUxzQWe/rVPT/Q8b/ JSMZUcPcWnDf1PqcUSQ2KYezJLUR7tkebUFaxs10QQArQOv/5UFo4b6bSG4uKDu4IBRu /BEdz+AVD4IbjPJVZsgPQv7UWQuyE65sHZgJN+whfFOqNB9RSvhOSQFgVsMRVIxdMKAW 7FYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=P1WoNNKs6dgl5BF6PO9m8KMRQlWgRUhXlzRuwL/G4fE=; b=m+OkjBhhfJWqC5MVDynQDNDh/wVhJWOmtwH1XI1Hdw1Fwpx2gGzVCikXfPws3Tgwz0 UGkFlvfFDVcA0CsNc0WezICtIb8VeiVL6Lch7zu2zYGfWLG0TGbhhcmPSyji2cGEpNhC QpaR39zLgbhVjgypBim5x9gaS2h6mMS4eiQcdSYd9/JG4nvoYCx4ne9UR8GF53CVA1IT wupoGg3d5UMq+R8vQhv1XPTKWB9i16ivQB7r9QoaNS0tQ1ABi04vfkvojaAlEvPZBnDm bZ9J/kpOWJ/n/DKsRfhTp8hgKvfJ1JUP44/eJZN2Xar66D0l7o2iAJfoKSHSGEQOUJBh N9jw== X-Gm-Message-State: AElRT7E5gQviMAgeuklSNeF5SO0kuUz/0CG90J5a4RkWOL1KxCCqgKpy +tK9jdsBjAG/porQH46Ab1c0W1f69rNdKSgI6O8= X-Google-Smtp-Source: AG47ELvdFfkWAqaS7zTuUnC99VADYyZfg+w24VjB+/p+w4Kw+NrUHIsaI9YUj5SJ00JjwIrRHXUJAoadTMoadNu+vwQ= X-Received: by 2002:a9d:3464:: with SMTP id v91-v6mr15514248otb.159.1521738999950; Thu, 22 Mar 2018 10:16:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.10.20 with HTTP; Thu, 22 Mar 2018 10:16:38 -0700 (PDT) In-Reply-To: <87zi30t4jf.fsf@mid.deneb.enyo.de> 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> <87zi30t4jf.fsf@mid.deneb.enyo.de> From: "H.J. Lu" Date: Mon, 01 Jan 2018 00:00:00 -0000 Message-ID: Subject: Re: RFC: Audit external function called indirectly via GOT To: Florian Weimer Cc: "Carlos O'Donell" , Generic System V Application Binary Interface , gnu-gabi@sourceware.org Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-q1/txt/msg00026.txt.bz2 On Thu, Mar 22, 2018 at 10:15 AM, Florian Weimer wrote: > * 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? Yes. -- H.J.