From patchwork Tue Mar 12 16:21:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 1911190 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=IUhqX39A; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TvJn8502Cz1yWn for ; Wed, 13 Mar 2024 03:21:48 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1B27D3858029 for ; Tue, 12 Mar 2024 16:21:46 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by sourceware.org (Postfix) with ESMTPS id 9BB7E385840C for ; Tue, 12 Mar 2024 16:21:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9BB7E385840C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9BB7E385840C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710260488; cv=none; b=P8Jqwu+M7gArwDrFiR9K4ozl2ANFE9kpba2n7O3qGnNCSE4kCQ1GuQT2R3zeimFs8GOZNh3XBh7teYWRU08yhUOisnIvG4IMDxBVB2PKpuyxO+a7E0cDiFl5WFCXi02lsQhviu3JPQ0Ambf3a529Is3Dp6grFIyqYcOTz/rIUgA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710260488; c=relaxed/simple; bh=Zj5qaNPGqU4rwCzB8Z1RndH9Dgo8npy+F9cpJB0IZuo=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=IoP8Z7XQQAwKELVyKAdG4hLBznZYVw4F9gVgOmt1bXP82l6l+63I6MSzPjQS+91AVsTRdoUyCIiFTaCmzGG+qBC3FQx2MSwGUl3OzYm8dOJr615LPls+mh0pYE1c+3RvdEH6SETIVUy/woZB9MKqh8PKjlza+ln+mOHkmQ2Jy38= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1dd10ae77d8so43340355ad.0 for ; Tue, 12 Mar 2024 09:21:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710260485; x=1710865285; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=F71vZGRy7u2kZPY+uRVQ8UTzreMtjtVUgOibucTvJhk=; b=IUhqX39AspEY0JJuaiph0T0sDDoxp+9oHjm7RGwc5XJvrzxpDvl/dvM2+PXILxEkYb ldyXhkV6gBomfSFK47Dt3PBuM3kIwg2JfxHPhFtECiw13cuYh8QSIonvs7QKsXOTromq WVUO7S/oelPRmrdpgff1uy4LzSjuYJ4KYTsva+DCR5uphnExo6aen598nPusuishiE37 02cqqWyTqCw4XH1PALuc/ei1pZS0ag7k4PID4wl1yiws20ix3CGy20UgqH737uoatxGA oNRBlbchyhOp75guRX+Bm06sZdC29DjTL/BCBpAS21v2L+jfqbWC9Dm3685VQnK1NUV/ 2UEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710260485; x=1710865285; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=F71vZGRy7u2kZPY+uRVQ8UTzreMtjtVUgOibucTvJhk=; b=fys9Et83Nf2bhzhbbGWJH3Ln0GiCXTXP09RjTpFzhK/8PJWZusBu5A+zr1SbTYP4rm QVhx9lG9yFiFOJfmPVQ477s1wkXoUNnUuKpJT4Cfw1ffVElnaY70VYpR9wQpVcFzhmHX MAjCafAo+t8ooCvla3rlRMqAX5hBgoUjD9w/oGPvh+ZtZPZrSU37IZ2WhRGIsXoutH+v A8clmeyvDOoWZUjHviVDoqlUBLCfneurT1+QaZNdOFmLr6Ad0V4GR3zmLuYkXKwNy4o9 fa3sZLrYwWz6UgV0E+dXLZLSP2Vi8uJfnRmvV+MWh+wRtjyfh6xRjPrdL67zB4QdGQRK tHfQ== X-Gm-Message-State: AOJu0YymP6oEQX3kn5LzsHG71ZXqzwrgLSfOOP/fH+ukWj5gdKD7xFIt PxbbcAxwivmGv/kD+e9xuUeRCi/mon35BzozDJqWpzHxnBS3TevbkxfsQyl0EdPTDUvm4pjNwfJ H X-Google-Smtp-Source: AGHT+IEK5AU8Y8A8cwdcMT+5QN+sUd1RuF/QkniwoK6Bsh+KKJdzsJ6GxrwaqCw2nqrVcrCCbXv+fg== X-Received: by 2002:a17:903:41c2:b0:1dd:611d:3be0 with SMTP id u2-20020a17090341c200b001dd611d3be0mr2685216ple.27.1710260485049; Tue, 12 Mar 2024 09:21:25 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c2:8dfd:281a:8caa:77d5:74db]) by smtp.gmail.com with ESMTPSA id o13-20020a170903008d00b001dbcf653017sm6913990pld.289.2024.03.12.09.21.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 09:21:24 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Szabolcs Nagy , "H . J . Lu" , Arjun Shankar Subject: [PATCH v2 0/3] Extending TLS testing and fixing TLS gnu2 for ARM Date: Tue, 12 Mar 2024 13:21:17 -0300 Message-Id: <20240312162120.1360522-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org A recent x86 fix for TLS descriptors [1] uncovered an ARM issue on _dl_tlsdesc_dynamic where it fails to save/restore all possible register. And checking if aarch64 is also affected, I noted that the TLS descriptor tests are only enabled iff -mtls-dialect= accepts 'gnu2'. Since aarch64 uses a different naming for the TLS abi (traditional/desc), some tests are not enabled. The last patch fixes it by parametrizing the TLS descriptor dialect name. [1] https://sourceware.org/pipermail/libc-alpha/2024-February/154995.html Changes from v2 - Use -shared instead of -unresolved-symbols=ignore-all on configure check. - Extend tst-gnu2-tls2.h test for both HWCAP_ARM_VFP and HWCAP_ARM_VFPD32. - Use -mtls-dialect=desc for aarch64. Adhemerval Zanella (3): Ignore undefined symbols for -mtls-dialect=gnu2 arm: Update _dl_tlsdesc_dynamic to preserve caller-saved registers (BZ 31372) elf: Enable TLS descriptor tests on aarch64 config.h.in | 3 + configure | 25 ++++--- configure.ac | 17 +++-- elf/Makefile | 30 ++++---- elf/tst-gnu2-tls2.h | 4 ++ elf/tst-gnu2-tls2mod0.c | 3 +- elf/tst-gnu2-tls2mod1.c | 3 +- elf/tst-gnu2-tls2mod2.c | 3 +- sysdeps/aarch64/preconfigure | 1 + sysdeps/arm/Makefile | 8 +-- sysdeps/arm/configure | 32 +++++++++ sysdeps/arm/configure.ac | 15 ++++ sysdeps/arm/dl-tlsdesc.S | 70 ++++++++++++++++--- sysdeps/arm/tst-gnu2-tls2.h | 128 +++++++++++++++++++++++++++++++++++ 14 files changed, 292 insertions(+), 50 deletions(-) create mode 100644 sysdeps/arm/tst-gnu2-tls2.h