From patchwork Thu Feb 29 19:46:39 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: 56745 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 04AD23858002 for ; Thu, 29 Feb 2024 19:47:20 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by sourceware.org (Postfix) with ESMTPS id 493D73858C3A for ; Thu, 29 Feb 2024 19:46:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 493D73858C3A 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 493D73858C3A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::102d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709236011; cv=none; b=fMm2vC//oNUtXgkQ3+svsry2LyoYpCBLOki7gxlx6W4cKuuIrthTSZY1i2sQ3oygxOzewJ3EqxaJSTP9kIGod0YHQXZsd2djTYTBYCbz7xUvAtUkT7po7xfhfD6MeGgqcIcUflUA4pd8jQuzxSzu7a/oQM5LJMrdvZZ6Q+BPaIw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709236011; c=relaxed/simple; bh=zN9RjWeixA8dww755lw4puicKhOs2HWLzVOWyxDyYlE=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=KZNNbqSsVm+UHVMPRwMMQGwuaPxJZeyuJkMANOpy0CWw8SCsgUTam6NBE4lnyPonzPkeDrcV/jbbyFQhBRvUqar4ama9GRrP3NY6MWX3tzyLlh78f4LqF54uQkVD6gkY4LMQ3xe3lm3cY1MFR644zapWORnm3g3rQXV8S57gZYs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x102d.google.com with SMTP id 98e67ed59e1d1-299b818d63aso1064857a91.0 for ; Thu, 29 Feb 2024 11:46:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709236007; x=1709840807; 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=Y4Ty4uaCFYA3Ptbo2KO1E1QvnmxhFb/xUvgFxN+zTho=; b=avga1E78Dup9PqvPfHo7gc2HTTtZkmZ3HbyQmF1nprEbZkLpRbaIFBdM/A6vIjyicV SpnhtWosmJwELg90ijqe0tn02/ddX5SJzi8WqD3S99KRBxYj0ph+xraZL2QCOTs0FHH1 nSe17P9RmQt/oCVOJZnkIvF98fvnQT7aZatK47W3HEwCUIJDrreuqEFzOdNwCjknWVOh zanSDKytfJH+2h2VS2wV6gvwvcYR8ctQm6MmvSpFt0DBif7YqV0bvHKfDoqm5u7Gpuqp RdQJK4M5skrHuNsmwn7HjrtdfZIUpM6HE3HqGePyf1UopOX/sodEzEJedAXl+rd74s2i Xc3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709236007; x=1709840807; 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=Y4Ty4uaCFYA3Ptbo2KO1E1QvnmxhFb/xUvgFxN+zTho=; b=MldP/qprsFDDxBFH1pumJwcESFvrVuXPEpEtujG3gzPDKoL1NaLtxavdAsawTw+C11 FMnEYOGdmFd0e92hKaRZF5Sg0HCuTQNpUpASsxIBi9ALBBW1AGkNFk4nEfu06WUq0zdu x3xI5qkBKhr+D9yFBv/PXlO9V7lH5AJWpnOg3g7IikNlB01ikZwRKz7jPhHEU+D4BYDR mWEjfBzmnWc4XfaGMWHxIUNbmAoO365+HLauYFekhkpfgcX5Y6h2heMaruIwAhlFzFpS P45OuRlxz6DMhYki+Ld0CZXodPvA2JIRo8VtNE8gVM76B7caoYHI0swJE0ZLWmOzmr5k XCGA== X-Gm-Message-State: AOJu0Yzc/v6KM5DKMWH/4y3j0h/v4Xkb7ZDZorQHFwx8hE/Bgey42kNr zvcjPsYR3iOfH4dMbJnFgu3FnUu3/rNwaUgPAq5NW6In2OrxOlt4D6ptq/hjbKfnVGY0j/l40AX w X-Google-Smtp-Source: AGHT+IHi1Ux4ahd+acFozy0q0fq+ccAINpLHo6FFSwBxwV1gFstJ+JL+WlThjaP3BhSqP6UXe/vchQ== X-Received: by 2002:a17:90b:4d90:b0:29b:13e3:e1ac with SMTP id oj16-20020a17090b4d9000b0029b13e3e1acmr2594386pjb.21.1709236007608; Thu, 29 Feb 2024 11:46:47 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c1:3a1a:a62d:15eb:5bb4:832d]) by smtp.gmail.com with ESMTPSA id cz13-20020a17090ad44d00b0029ad44cc063sm3957206pjb.35.2024.02.29.11.46.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 11:46:47 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Szabolcs Nagy , "H . J . Lu" Subject: [PATCH 0/3] Extending TLS testing and fixing TLS gnu2 for ARM Date: Thu, 29 Feb 2024 16:46:39 -0300 Message-Id: <20240229194642.3398122-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+patchwork=sourceware.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 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 | 96 ++++++++++++++++++++++++++++++++++++ 14 files changed, 260 insertions(+), 50 deletions(-) create mode 100644 sysdeps/arm/tst-gnu2-tls2.h