From nobody Sat Oct 4 01:42:15 2025 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 81F4A20B218; Thu, 21 Aug 2025 15:13:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755789197; cv=none; b=WNRZdw5u9rJ0aV1s5Cp5LpCnWBkWtnqTzzOn9rk+88qzpZbTpp8EEM1/XXDaEV+HTw72HggkTjthMfjHmWYf/eFYhdOYsJZ0w3GDYC9M17tDPQgFw+jsjjVrPW/BvN9Gd1aUkVjLL116CXuNabRPaHHgjSCb1t6HTCaaFpQjmZY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755789197; c=relaxed/simple; bh=h/4lrKAX6pF/gjGhEXhKe5bBTHwGePjRZnh/r+I4xI4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=SHw6zAUelfPSwdcuB2CIO9eaoRCrjY25kZCA3EQTgru5JOF5CFBV3zRx0MIcyCW9qwtfQKTopoPGlhGhaTqq3yYuZq3yf0MIs3AbAZvi58Ab6KbNl1pnFxOXzROs7x64CQLNss2eCOEtwJ0bgrld5QhENc8oZwK4DBqdESch9kQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=iAK3Yt20; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="iAK3Yt20" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1755789186; bh=h/4lrKAX6pF/gjGhEXhKe5bBTHwGePjRZnh/r+I4xI4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=iAK3Yt209KoUD5hZLoakwBGYllm7FZn2mNfFs8SUAjwxpvDND+DcEhqweUbyX04ZS Ec2UW43S3gLMOWXSQu461XAx0VZg5ureV6xd61Jxc0+VIIa5D4M/UwaQQD8fS2mmSN 8m5SKRzpBm2jGKj4zmdSZKrvvVWJC+N7BIDNfX00= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Thu, 21 Aug 2025 17:13:03 +0200 Subject: [PATCH 2/2] kselftest/arm64/gcs: Use nolibc's getauxval() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-nolibc-gcs-fixes-v1-2-88519836c915@weissschuh.net> References: <20250821-nolibc-gcs-fixes-v1-0-88519836c915@weissschuh.net> In-Reply-To: <20250821-nolibc-gcs-fixes-v1-0-88519836c915@weissschuh.net> To: Catalin Marinas , Will Deacon , Shuah Khan , Thiago Jung Bauermann , Mark Brown Cc: linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1755789186; l=1309; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=h/4lrKAX6pF/gjGhEXhKe5bBTHwGePjRZnh/r+I4xI4=; b=hIZZJkYzmN2hdyvFbNdtAvwuxrH719lR2ZzZJRUedITZyThsSbc/iRxqfkT61PGxExwDfboaA rHiSZqT3Cx3Dy4prmE4ufwjTxVehaU0ivf0eJruoKdrB4KZF1fPQude X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Nolibc now does have getauxval(), use it. Signed-off-by: Thomas Wei=C3=9Fschuh Reviewed-by: Mark Brown --- tools/testing/selftests/arm64/gcs/basic-gcs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/arm64/gcs/basic-gcs.c b/tools/testing/= selftests/arm64/gcs/basic-gcs.c index 100d2a983155f7347a19b2b8b88f9494dc6a51d5..250977abc3988685abf68666d35= b7a8547f74f4e 100644 --- a/tools/testing/selftests/arm64/gcs/basic-gcs.c +++ b/tools/testing/selftests/arm64/gcs/basic-gcs.c @@ -10,6 +10,7 @@ =20 #include #include +#include #include =20 #include "kselftest.h" @@ -386,14 +387,13 @@ int main(void) =20 ksft_print_header(); =20 - /* - * We don't have getauxval() with nolibc so treat a failure to - * read GCS state as a lack of support and skip. - */ + if (!(getauxval(AT_HWCAP) & HWCAP_GCS)) + ksft_exit_skip("SKIP GCS not supported\n"); + ret =3D my_syscall5(__NR_prctl, PR_GET_SHADOW_STACK_STATUS, &gcs_mode, 0, 0, 0); if (ret !=3D 0) - ksft_exit_skip("Failed to read GCS state: %d\n", ret); + ksft_exit_fail_msg("Failed to read GCS state: %d\n", ret); =20 if (!(gcs_mode & PR_SHADOW_STACK_ENABLE)) { gcs_mode =3D PR_SHADOW_STACK_ENABLE; --=20 2.50.1