From patchwork Sat Sep 12 11:34:20 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 143640 X-Patchwork-Delegate: arjun.is@lostca.se Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1F6854C31820 for ; Sat, 12 Sep 2026 11:35:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1F6854C31820 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=aurel32.net header.i=@aurel32.net header.a=rsa-sha256 header.s=202004.hall header.b=rzfMEYWt X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from hall.aurel32.net (hall.aurel32.net [IPv6:2001:bc8:30d7:100::1]) by sourceware.org (Postfix) with ESMTPS id 21FA34BCA2C8 for ; Sat, 12 Sep 2026 11:34:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 21FA34BCA2C8 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=aurel32.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=aurel32.net ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 21FA34BCA2C8 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2001:bc8:30d7:100::1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1789212883; cv=none; b=L5/mkWz3QgRxX9nINxCEdrnmzlj4ukyEN+wfjDJyB5PGsbIgrKt5LYAJy0Af82in16E8JOBvzxDtX8CYouvZjLn0Mri7eYu2n1Cya+IH5sAOESgDIsEFuUJmoCqEEJvUecmSoieE140U1nX7lB7nVSumXh2MQ08d8Qnivp6sq3M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1789212883; c=relaxed/simple; bh=Mtr+M6Oeea6GcrJDWBkzH92U3pF69tiR6d4YS0UUh7c=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=GNJAIWa5adaxod1QzXaLKEQ49GjvzSLTcxGX9/AOp/FndH04bA2MNPiJnM+KfhJmYAnZJoOpPn95cDRIFygQnMpfiral3R4WfKD2aziGCC7WSUfvr45tNkKyevbffQ51YkDrhWY+9vUFJtOFqgv1MW0sNgZhRYe/Siw8sXQrCRc= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, secure) header.d=aurel32.net header.i=@aurel32.net header.a=rsa-sha256 header.s=202004.hall header.b=rzfMEYWt DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 21FA34BCA2C8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=aurel32.net ; s=202004.hall; h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date: Subject:Cc:To:From:Content-Type:From:Reply-To:Subject:Content-ID: Content-Description:In-Reply-To:References:X-Debbugs-Cc; bh=rAnkLquk1A7qwb8ccrqm9Gg3Sp7w3+wxUpQ9x6yyJQ4=; b=rzfMEYWtKHxMr+ARugXvH/iWN2 dc5EorVhJPLVGBL+AjM79A1JSRpgA+yqVQZAn2D1V4dhXXqjdV12iEbRxtLJZ/ZWcIS2ZnvAhITYG KWJ/Op9b8oF3mUiA23oc/eHj2UWpoh3ZfhnIdmseo69x3jtacKf4oqM9KCW5ZlBXOB3cXXO1YH+P+ +bybffEzY4OLU1CNmtp4naoV7pHXRQsS7IPAN3TWUus34TAPPWvGCa1Vb37VbAkRHeht/mTR59tRm 2sKGpn35g/DlkhWzg2dZxII8kvKiMef/EbC2UrHKI/H9LpTrHvjTbHk+AVVULVlyX7YNiuLNo1Drh GYvDwy5w==; Received: from authenticated user by hall.aurel32.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x5M0E-0000000A12V-479G; Sat, 12 Sep 2026 13:34:38 +0200 From: Aurelien Jarno To: libc-alpha@sourceware.org Cc: "H . J . Lu" , Aurelien Jarno Subject: [PATCH] x86_64/cet: fix tst-shstk-legacy-1{f,g} tests [BZ #31877] Date: Sat, 12 Sep 2026 13:34:20 +0200 Message-ID: <20260912113420.3723703-1-aurelien@aurel32.net> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on 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 The tst-shstk-legacy-1f and tst-shstk-legacy-1g tests depend on the tst-shstk-legacy-mod-1.so module to test that legacy shadow stack code in init_array does not trigger a segfault in tst-shstk-legacy-1f, while it does trigger a segfault in tst-shstk-legacy-1g. However, the module is built but never loaded by the tests. Load it using LD_PRELOAD. When glibc is configured with --enable-cet, this allows tst-shstk-legacy-1g to pass on systems with kernel and hardware support for shadow stacks. --- sysdeps/x86_64/Makefile | 2 +- sysdeps/x86_64/tst-shstk-legacy-1g.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile index ff0463d7ca..688b537a48 100644 --- a/sysdeps/x86_64/Makefile +++ b/sysdeps/x86_64/Makefile @@ -466,7 +466,7 @@ $(objpfx)tst-shstk-legacy-1e-static.out: \ $(objpfx)tst-shstk-legacy-1e-static $(SHELL) $< $(common-objpfx) 2> $@; \ $(evaluate-test) -tst-shstk-legacy-1f-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK +tst-shstk-legacy-1f-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK LD_PRELOAD=$(objpfx)tst-shstk-legacy-mod-1.so $(objpfx)tst-shstk-legacy-1f: $(objpfx)tst-shstk-legacy-mod-1.so $(objpfx)tst-shstk-legacy-mod-1.so: \ $(objpfx)tst-shstk-legacy-mod-1.os \ diff --git a/sysdeps/x86_64/tst-shstk-legacy-1g.sh b/sysdeps/x86_64/tst-shstk-legacy-1g.sh index 449bf7493b..0453e3d3af 100755 --- a/sysdeps/x86_64/tst-shstk-legacy-1g.sh +++ b/sysdeps/x86_64/tst-shstk-legacy-1g.sh @@ -22,6 +22,7 @@ common_objpfx=$1; shift test_program_prefix=$1; shift GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK \ +LD_PRELOAD=${common_objpfx}elf/tst-shstk-legacy-mod-1.so \ ${test_program_prefix} \ ${common_objpfx}elf/tst-shstk-legacy-1g # The exit status should only be unsupported (77) or segfault (139).