From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 8FCC93858C50 for ; Thu, 7 Apr 2022 11:59:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8FCC93858C50 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 237ALiNm011875 for ; Thu, 7 Apr 2022 11:59:55 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com with ESMTP id 3f9x4w1uj3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 07 Apr 2022 11:59:55 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 237BvLTH008775 for ; Thu, 7 Apr 2022 11:59:53 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma06ams.nl.ibm.com with ESMTP id 3f6drhssft-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 07 Apr 2022 11:59:52 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 237BxnvY54985154 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 7 Apr 2022 11:59:49 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B1F6DAE056; Thu, 7 Apr 2022 11:59:49 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 90560AE051; Thu, 7 Apr 2022 11:59:49 +0000 (GMT) Received: from t35lp56.lnxne.boe (unknown [9.152.108.100]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 7 Apr 2022 11:59:49 +0000 (GMT) From: Stefan Liebler To: libc-alpha@sourceware.org Cc: Stefan Liebler Subject: [PATCH] S390: Fix elf/tst-audit25[ab] Date: Thu, 7 Apr 2022 13:59:48 +0200 Message-Id: <20220407115948.1664232-1-stli@linux.ibm.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: dCbS-bJX2No0w-9VGTxAKFF6BjelRKq4 X-Proofpoint-GUID: dCbS-bJX2No0w-9VGTxAKFF6BjelRKq4 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.850,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-04-07_01,2022-04-07_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 phishscore=0 mlxlogscore=886 priorityscore=1501 spamscore=0 suspectscore=0 mlxscore=0 adultscore=0 malwarescore=0 impostorscore=0 bulkscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204070057 X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, KAM_STOCKGEN, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, 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 11:59:58 -0000 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. --- 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; -- 2.35.1