From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9013 invoked by alias); 21 Mar 2018 21:54:29 -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 8998 invoked by uid 89); 21 Mar 2018 21:54:28 -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.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=Carlos, books, HTo:U*fw X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE 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-qk0-f179.google.com Received: from mail-qk0-f179.google.com (HELO mail-qk0-f179.google.com) (209.85.220.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 21 Mar 2018 21:54:27 +0000 Received: by mail-qk0-f179.google.com with SMTP id s9so7129284qke.12 for ; Wed, 21 Mar 2018 14:54:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=a7mnTdeXVIO+0rDljLxm7CWO5yjlIIx033eUcLediUk=; b=sOfkkZL0EBhto8t7hAiGcS8ScaMbszTyLqeSjknlF2h1UmauwJP93FxWLA/dY48IFF kS2eTiAEhWrj6v0WUYNJuS2fvjR5mR68pGoeBAoZfPa5FqXQVLP2Ey5+UwY/nyC1R1Ed GXDtXWqCpmW4tMK2FXFufIYfLrtsMiHh/ucfj5ve1HXpDjoeHssE9w7bBLPD6JKKa1b5 OSn6leJKqyQth3nfTf5PW8fYh/bcWp4unmtHNuHj0vhjmA5BaZw2o2vVGnOQcPQ0XecT yBVw0/uk667wbzRS7dwW6LpjHhFVJq1fWSV7nc10QCADnz42uVXS1eBhie+O5rH3zVCO 0TkA== X-Gm-Message-State: AElRT7HebvjBqXhWCUzcDm0vdo14xjQBo+QBKDj1c4Ltn7gNvgEv+1In ZM6XwiuSVyC8B5gEW93eU206Op018Jk= X-Google-Smtp-Source: AG47ELveHscEkp1ALlKvt30hoWggjWca9/x71ULc8YPoydQoFGFYBGtaGhGxt3ttdnFfl75wEMkMNg== X-Received: by 10.55.162.66 with SMTP id l63mr7046271qke.124.1521669265356; Wed, 21 Mar 2018 14:54:25 -0700 (PDT) Received: from [10.150.73.95] (198.sub-174-207-13.myvzw.com. [174.207.13.198]) by smtp.gmail.com with ESMTPSA id p8sm4262886qkp.37.2018.03.21.14.54.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Mar 2018 14:54:24 -0700 (PDT) Subject: Re: RFC: Audit external function called indirectly via GOT To: Florian Weimer , "H.J. Lu" Cc: Generic System V Application Binary Interface , gnu-gabi@sourceware.org References: <20180317133115.GA4681@gmail.com> <87370txhr1.fsf@mid.deneb.enyo.de> From: Carlos O'Donell Message-ID: <3a203b82-1247-5538-4848-92c9227cc77e@redhat.com> Date: Mon, 01 Jan 2018 00:00:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <87370txhr1.fsf@mid.deneb.enyo.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-q1/txt/msg00007.txt.bz2 On 03/21/2018 03:04 PM, Florian Weimer wrote: > * H. J. Lu: > >>> Could we ship a template for the PLT entries in ld.so instead? And if >>> needed, map it from the file together with an address array, like this? >> >> This won't work since linker needs to know exactly PLT layout to generate >> JUMP_SLOT relocations for LD_AUDIT. > > Why would we need JUMP_SLOT relocations? Couldn't we install suitable > interceptors for GLOB_DAT relocations instead, as long as they resolve > to external function symbols? I think your suggestion might work, but why alter the existing behaviour which users expect and is documented in countless linker text books? Existing tooling to process such relocations and entries could remain unchanged and we would continue to support LD_AUDIT. What other benefits would we gain from your suggestion? Cheers, Carlos.