From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) by sourceware.org (Postfix) with ESMTPS id 4DD4D3858401 for ; Mon, 27 Dec 2021 20:17:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4DD4D3858401 Received: by mail-qt1-x82a.google.com with SMTP id v4so11799481qtk.0 for ; Mon, 27 Dec 2021 12:17:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=xdu6UR1QcX3jRejMlO4ozfOhHIyr0R4QiqPOR8o29f8=; b=bmnB2H9qeynloIBB+fgwt8wCU/7VOlhG+rfY5FYqgQ7lsxxj+ngFgahUg8claI9Mp2 XAI45Mxs3gyyOvbeN5RXP2SKTVOq2Wxz9I1YNzLw5cwoXv6jDlcktXQVWcGV8GD/LXvZ w16/9M9oQW/hF/em2ZLAfy3WcLTiWcpcPsFF+s+oJwUufztDEoT+hDYO4Onpge5X/Syf xjyI+zwILWkqm0Xqkwc4q1igkEMbI8zS6VDOheVqga1fctA8u4bzHHPfGgWnovv3bkmH bCEDsaDIKqhG6etw48fylpka5jme0y1kjDchio8mJqNU3VGBBn5C+0wcK9RS/GSG4sTd WwGQ== X-Gm-Message-State: AOAM531RPvMtQybb+EAlvdw9QV4ycQvb6O9nHR7G9zDAx5cuehLETuHt FzPxGGSiqel6+1VHhG4p7be7aw== X-Google-Smtp-Source: ABdhPJw5Txkx4mQ44NMYf3etlpg47xQXpQbu89uZw6IMWughrEJgHq3QyWGXQlqF/zXs/8vUN3Uf5g== X-Received: by 2002:ac8:7a93:: with SMTP id x19mr16139220qtr.145.1640636248881; Mon, 27 Dec 2021 12:17:28 -0800 (PST) Received: from ?IPV6:2804:431:c7cb:3b1e:f218:7987:80e2:7249? ([2804:431:c7cb:3b1e:f218:7987:80e2:7249]) by smtp.gmail.com with ESMTPSA id q21sm13443942qkl.52.2021.12.27.12.17.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Dec 2021 12:17:28 -0800 (PST) Message-ID: Date: Mon, 27 Dec 2021 17:17:26 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH v7 15/16] elf: Issue la_symbind for bind-now (BZ #23734) Content-Language: en-US To: Florian Weimer Cc: libc-alpha@sourceware.org, John Mellor-Crummey , Ben Woodard References: <20211222132712.523295-1-adhemerval.zanella@linaro.org> <20211222132712.523295-16-adhemerval.zanella@linaro.org> <877dbt96r9.fsf@oldenburg.str.redhat.com> From: Adhemerval Zanella In-Reply-To: <877dbt96r9.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Dec 2021 20:17:30 -0000 On 24/12/2021 15:50, Florian Weimer wrote: > * Adhemerval Zanella: > >> diff --git a/NEWS b/NEWS >> index 6161658184..c5f49c1267 100644 >> --- a/NEWS >> +++ b/NEWS >> @@ -119,6 +119,10 @@ Deprecated and removed features, and other changes affecting compatibility: >> configuration script now automatically detects static-pie support in the >> toolchain and architecture and enables it if available. >> >> +* The audit module interface version LAV_CURRENT is increased to enable >> + proper bind-now support. The loader now advertise on the la_symbind >> + flags that PLT trace is not possible. > > Spurious whitespace: “version LAV_CURRENT[ ]is increased” Ack. > >> diff --git a/elf/sotruss-lib.c b/elf/sotruss-lib.c >> index f69d23894b..50f237dba8 100644 >> --- a/elf/sotruss-lib.c >> +++ b/elf/sotruss-lib.c >> @@ -231,6 +231,12 @@ uintptr_t >> la_symbind (Elf_Sym *sym, unsigned int ndx, uintptr_t *refcook, >> uintptr_t *defcook, unsigned int *flags, const char *symname) >> { >> + if (*flags & LA_SYMB_NOPLTENTER) >> + error (1, 0, "cannot trace PLT enter (bind-now enabled)"); >> + >> + if (do_exit && *flags & LA_SYMB_NOPLTEXIT) >> + error (1, 0, "cannot trace PLT exit (bind-now enabled)"); >> + >> if (!do_exit) >> *flags = LA_SYMB_NOPLTEXIT; > > I think this shouldn't be an error; we should ignore these bindings. > This would be consistent with the previous behavior. I will change to an warning, I think now that glibc advertise users should know that PLT trace does not really work for bind-now.