From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x232.google.com (mail-oi1-x232.google.com [IPv6:2607:f8b0:4864:20::232]) by sourceware.org (Postfix) with ESMTPS id EABB23858D28 for ; Thu, 7 Apr 2022 13:36:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EABB23858D28 Received: by mail-oi1-x232.google.com with SMTP id w127so5601290oig.10 for ; Thu, 07 Apr 2022 06:36:15 -0700 (PDT) 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:references:from:in-reply-to :content-transfer-encoding; bh=oIMq+36uaU/tFIQmx6KiTC0wNgqmuOhnaBz6LTZ7b38=; b=SoPS0RMCNDng+nq0fFJUz2QT41t/xxgvSx+oNsnWZ/LcekKRzqO/8k/Pj4FMHztxN2 Axdz4dc2dmb9kzo5ll9uR7D9ZoDoVzHi/L/N9mnD3maZgfFQeJDCuEvMwIcsWEqnVjB9 W6Nf1ANPCmPfbQFokh4Y/+ldQxlyXVMgwHQx7Q4uG9ZfGQ8xzarwOTjwK6mYUwSSCkqH Yjbet+reNC0P5uodA1hiK5L28IlzXZlr02MjJCJgNdjFtfCzMXKQ9YGnWABU4le+wymJ NR8foY9x8SMTOoDTFe5FQTguDZCxr6SEHmNWtxfC/5YnXtYpkrHXS9I6BG9HCJLYUzNg wZFg== X-Gm-Message-State: AOAM530tzWZDr3rwnJ1eYerYhVlE0JL706fsA3TloMQQlF33cXegsgKs 5GEM26dmgaKyZyu2Ci09Xi4t0Lz8uHKySw== X-Google-Smtp-Source: ABdhPJyZZl4DhNdYroZNdQtGe9OAm9s3MRoOtYvXtQcDNms5gmmAKD7e/d7Z/1sHAkX3+y1AYHCyhw== X-Received: by 2002:a05:6808:1904:b0:2da:2f99:bed8 with SMTP id bf4-20020a056808190400b002da2f99bed8mr5918470oib.244.1649338574991; Thu, 07 Apr 2022 06:36:14 -0700 (PDT) Received: from ?IPV6:2804:431:c7cb:321:9304:77a6:d900:ebb? ([2804:431:c7cb:321:9304:77a6:d900:ebb]) by smtp.gmail.com with ESMTPSA id h186-20020acab7c3000000b002ef5106248asm7580498oif.45.2022.04.07.06.36.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 Apr 2022 06:36:13 -0700 (PDT) Message-ID: Date: Thu, 7 Apr 2022 10:36:11 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH] S390: Fix elf/tst-audit25[ab] Content-Language: en-US To: libc-alpha@sourceware.org References: <20220407115948.1664232-1-stli@linux.ibm.com> From: Adhemerval Zanella In-Reply-To: <20220407115948.1664232-1-stli@linux.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-13.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_STOCKGEN, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: Thu, 07 Apr 2022 13:36:17 -0000 On 07/04/2022 08:59, Stefan Liebler via Libc-alpha wrote: > If glibc is configured with --disable-default-pie and build on > s390 with -O3, the tests elf/tst-audit25a and elf/tst-audit25b are > failing as there are additional la_symbind lines for free and malloc. > It turns out that those belong to the executable. In fact those are > the PLT-stubs. Furthermore la_symbind is also called for calloc and > realloc symbols, but those belong to libc. > > Those functions are not called at all, but dlsym'ed in > elf/dl-minimal.c: > __rtld_malloc_init_real (struct link_map *main_map) > { > ... > void *new_calloc = lookup_malloc_symbol (main_map, "calloc", &version); > void *new_free = lookup_malloc_symbol (main_map, "free", &version); > void *new_malloc = lookup_malloc_symbol (main_map, "malloc", &version); > void *new_realloc = lookup_malloc_symbol (main_map, "realloc", &version); > ... > } > > Therefore, this commit just ignored symbols with LA_SYMB_DLSYM flag. LGTM, thank. Why don't we see in other configuration and/or architecture? What s390 is doing different here? Reviewed-by: Adheemrval Zanella > --- > elf/tst-auditmod25.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/elf/tst-auditmod25.c b/elf/tst-auditmod25.c > index 20640a8daf..0524c5aab1 100644 > --- a/elf/tst-auditmod25.c > +++ b/elf/tst-auditmod25.c > @@ -72,7 +72,8 @@ la_symbind32 (Elf32_Sym *sym, unsigned int ndx, > unsigned int *flags, const char *symname) > #endif > { > - if (*refcook != -1 && *defcook != -1 && symname[0] != '\0') > + if (*refcook != -1 && *defcook != -1 && symname[0] != '\0' > + && (*flags & LA_SYMB_DLSYM) == 0) > fprintf (stderr, "la_symbind: %s %u\n", symname, > *flags & (LA_SYMB_NOPLTENTER | LA_SYMB_NOPLTEXIT) ? 1 : 0); > return sym->st_value;