From patchwork Wed Oct 23 20:38:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13847902 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 05E6BCFA472 for ; Wed, 23 Oct 2024 20:43:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=KU4FPru2ydTSPv8IP91kbGwnel2cLg7nTaLFgrHS0os=; b=izakq3aU8kbNtdT0P4ubSFaI86 yZnW0bNd8/I67wPxi7rFdQIEVS5ioW2OjtgCCr3i3Y4nKRZXaN7Bu+E7+a/f34d0ePfiJOVeCdaKQ fVz1EOZ2tvaNOEkHV40VC1UFo98xmVjm6xiEzQUEOMNDZWEZ+r4lFnKp2yPRJI8UB98QTbrYnz30W z548lWlxcnLmkTJSv8VDUYo74kw/EQYnKvs3pxi9n7yQ0cPw8tPMeeZfE10TomMQqGv60v1M8DCro IItn4nIkdb0A8iNnPHWX/WmChB1yxH8Ldh+0VAlvoFT1VqDGBVm2np9qJIKKic5TWpT3iHB0A9gTS i6ChuK/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t3iC0-0000000FsMd-3TWK; Wed, 23 Oct 2024 20:42:56 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t3i8t-0000000FrUd-3Z9L for linux-arm-kernel@lists.infradead.org; Wed, 23 Oct 2024 20:39:45 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 80C715C5ECE; Wed, 23 Oct 2024 20:39:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 451BEC4CECD; Wed, 23 Oct 2024 20:39:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729715982; bh=/bHrhesLCeIwKS6Tm5OOpULv9OOeXujD+y0vb5AVloM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=HEBz9J2SYayNbbRkBwd2iwxoESLTRpgf1SxBFOntvWwBVNUv28S3mZIaSuhRmvayR jQ2lwTFB5OV24DDouzZMEsU9VYK8Mpf+ft/Vcva8GApuEThPqQwXFmrF8APwzG3czW 2Chi4MNYNRA3IpODaKSuCt8oW3b4sxHbCVA7M3MdxuwYIozafqU2TxQpRe5NLo2otu xmqM9O2HWAj7ptDz3y6DAPQV+ts2l/oD/fx5RJ37NdPFDBBNMNhgIu9OBumBnYq0P+ rH3RqA/nOa4AR0HraXZ5lqUo7qilZEhp8SaHhoa4NmvdEIW6zIky2/CEkuN44alSQR mS33JnbX5cPdQ== From: Mark Brown Date: Wed, 23 Oct 2024 21:38:29 +0100 Subject: [PATCH 1/6] kselftest/arm64: Correct misleading comments on fp-stress irritators MIME-Version: 1.0 Message-Id: <20241023-arm64-fp-stress-irritator-v1-1-a51af298d449@kernel.org> References: <20241023-arm64-fp-stress-irritator-v1-0-a51af298d449@kernel.org> In-Reply-To: <20241023-arm64-fp-stress-irritator-v1-0-a51af298d449@kernel.org> To: Catalin Marinas , Will Deacon , Shuah Khan Cc: Mark Rutland , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Brown X-Mailer: b4 0.15-dev-9b746 X-Developer-Signature: v=1; a=openpgp-sha256; l=2112; i=broonie@kernel.org; h=from:subject:message-id; bh=/bHrhesLCeIwKS6Tm5OOpULv9OOeXujD+y0vb5AVloM=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBnGV8Gc55M2w82ehj/LpjjHUBt4adVvVgcz0prD+dS XvsOxI2JATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZxlfBgAKCRAk1otyXVSH0CA5B/ 0c7+WD7+iS6lYyf0bnJuH8r+L60B8ehcqJrpsjYxePuktHethpL14YIdnlm0MeLaomjRQqDl26a7h0 7QEyHO8j9AwYw6KYE0gIZfQLbawPVnu5cl4Hwo9nODuwfvRo8286EF8lBzbpPPvFRaHO1VYuYhCNeA lNfN16OdFKjhP6YpxNxYKuJHChn2L4BZeqy7kMcBiqISG6+MbUlD6YgzxsvpbwRzxKAHodXlNfaMHp sJpVOv3LW4gibvdMHqDEEghYc5SkuWcvfjRWYhsObwwrNev33WFLOeIKNlzU3bSLZmbLXYGb2Bgtsr 3lUfYaJb55y0v/wJGedDx53K8xYUam X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241023_133944_017143_893B748B X-CRM114-Status: GOOD ( 12.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The comments in the handlers for the irritator signal in the test threads for fp-stress suggest that the irritator will corrupt the register state observed by the main thread but this is not the case, instead the FPSIMD and SVE irritators (which are the only ones that are implemented) modify the current register state which is expected to be overwritten on return from the handler by the saved register state. Update the comment to reflect what the handler is actually doing. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/fp/fpsimd-test.S | 3 +-- tools/testing/selftests/arm64/fp/sve-test.S | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/arm64/fp/fpsimd-test.S b/tools/testing/selftests/arm64/fp/fpsimd-test.S index 8b960d01ed2e0ef516893b68794078ddf8c01e1f..bdfb7cf2e4ec175fda62c1c2f38c6ebb1a1c48bf 100644 --- a/tools/testing/selftests/arm64/fp/fpsimd-test.S +++ b/tools/testing/selftests/arm64/fp/fpsimd-test.S @@ -134,8 +134,7 @@ function check_vreg b memcmp endfunction -// Any SVE register modified here can cause corruption in the main -// thread -- but *only* the registers modified here. +// Modify live register state, the signal return will undo our changes function irritator_handler // Increment the irritation signal count (x23): ldr x0, [x2, #ucontext_regs + 8 * 23] diff --git a/tools/testing/selftests/arm64/fp/sve-test.S b/tools/testing/selftests/arm64/fp/sve-test.S index fff60e2a25addfd4850ef71aa3cf6535ac880ffd..e3c0d585684df29723a49265f3df6d23817498c7 100644 --- a/tools/testing/selftests/arm64/fp/sve-test.S +++ b/tools/testing/selftests/arm64/fp/sve-test.S @@ -291,8 +291,7 @@ function check_ffr #endif endfunction -// Any SVE register modified here can cause corruption in the main -// thread -- but *only* the registers modified here. +// Modify live register state, the signal return will undo our changes function irritator_handler // Increment the irritation signal count (x23): ldr x0, [x2, #ucontext_regs + 8 * 23] From patchwork Wed Oct 23 20:38:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13847903 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B4726CFA46A for ; Wed, 23 Oct 2024 20:44:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=XOGDo4vGiv3O5RiGrxGxTNcGTfWFAmUJSUQ3OPPNIOI=; b=fE3YH3rl1wltu+nTAYjsym1C/W De+rCd60jInySj1Em//pCSpG7CmkKAr711y4lj92xUog6xh4gxp7e2CzXGX0oqlIabJg2dZpivvqm Zw6NzELWTqiQkeFw/tL4r3HqTV02exBA4U1WoIJJvDh+DahE9FSecrRNYrfc4gAzq+udEm0I9gHpi sxb0T9dnC06Y66WZRggEMAycat0+sOxlUvsUBemvgnzLRh1PQha3Sd7qoD5OCr2OeQkQXv2B+UZ56 AiCBMCnJTRDe242mTK2Iv1MweuluJryMY1GTB9UxyhUnbtfL/hseL/sd76UWhbd91P5YXCs/BGCK/ ghgRz3ZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t3iDX-0000000Fsjg-2h6s; Wed, 23 Oct 2024 20:44:31 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t3i8w-0000000FrVt-0ihU for linux-arm-kernel@lists.infradead.org; Wed, 23 Oct 2024 20:39:47 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 0AA12A406ED; Wed, 23 Oct 2024 20:39:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5059FC4CEC6; Wed, 23 Oct 2024 20:39:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729715984; bh=A0xCV0/PSvevUax4GW3txbWNtrgIm8u+5XUscwTPb/o=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=GAwtJDupEyWOB3uuEGnaulVAgHAukMaigDlXwBOK/DK5UrHfJ04dEZpVvJHQru2Qy JrS5jofMrUiccO3pL9n/A1HbMCNpFQZu7kJB7vTz9jFTDJeKrSMixnsZjGMv5K8F5j 8o0Cm+wWK3/vWiXr3Lk517Pj0ZnMxFKr8mqOqkBshm8KKT7FQ2R886EIxX2CUBNGWy Af5kJM+fDzNbajd4GJBWYbPOH3FlHqUACAKwyzCzwopBR7RuwHlKwqfGMPnBnZ1awS 21nOuSbDKCG658SpD7ksW1KQgN6qI/rCUZ9/fOJvIrXZNNoMWebYdglt+RJDLFqYui zZnGVTJPu+Tew== From: Mark Brown Date: Wed, 23 Oct 2024 21:38:30 +0100 Subject: [PATCH 2/6] kselftest/arm64: Remove unused ADRs from irritator handlers MIME-Version: 1.0 Message-Id: <20241023-arm64-fp-stress-irritator-v1-2-a51af298d449@kernel.org> References: <20241023-arm64-fp-stress-irritator-v1-0-a51af298d449@kernel.org> In-Reply-To: <20241023-arm64-fp-stress-irritator-v1-0-a51af298d449@kernel.org> To: Catalin Marinas , Will Deacon , Shuah Khan Cc: Mark Rutland , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Brown X-Mailer: b4 0.15-dev-9b746 X-Developer-Signature: v=1; a=openpgp-sha256; l=2606; i=broonie@kernel.org; h=from:subject:message-id; bh=A0xCV0/PSvevUax4GW3txbWNtrgIm8u+5XUscwTPb/o=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBnGV8HpM2/QKONGuDoJRvv7T//ECB/Hh6Fht25u/wh bXTfT0eJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZxlfBwAKCRAk1otyXVSH0KM5B/ 0WNMHqxiKcGxbpdzPHNYqwJzUbmWOTTHmbNlhyehRneGnNCvkwuaW7HSPHCncZK3WuJu5ZxGujaDbw hSX3xomF3kvFN++b6sLJvowe3lgwXeadwd8NRAuKuFwZNRaJlrwqSRfpGeNZRvPd9zAnJBQE52CL5J 1DKNnlI1y7uAhieuL2aGoWQBzrxvBLn7c5myKCEeQYuE9V9Ub3XhU04rUkoFjK05ZcQTDtf1lBtTLd qyFgwUAUizrgXECgz93ffnB7ED86olrhWBFQxWwR7YJAxQe6UnLhbfCZ0CEeQNDudd0Nba+KzNwiBu Oz6gHCXYVR5zI+JUGijriZuillOYAZ X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241023_133946_384724_EC263226 X-CRM114-Status: UNSURE ( 8.34 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The irritator handlers for the fp-stress test programs all use ADR to load an address into x0 which is then not referenced. Remove these ADRs as they just cause confusion. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/fp/fpsimd-test.S | 1 - tools/testing/selftests/arm64/fp/sve-test.S | 1 - tools/testing/selftests/arm64/fp/za-test.S | 1 - tools/testing/selftests/arm64/fp/zt-test.S | 1 - 4 files changed, 4 deletions(-) diff --git a/tools/testing/selftests/arm64/fp/fpsimd-test.S b/tools/testing/selftests/arm64/fp/fpsimd-test.S index bdfb7cf2e4ec175fda62c1c2f38c6ebb1a1c48bf..9977ffdd758a51a7af67cd607d019a6c54d3a6c6 100644 --- a/tools/testing/selftests/arm64/fp/fpsimd-test.S +++ b/tools/testing/selftests/arm64/fp/fpsimd-test.S @@ -142,7 +142,6 @@ function irritator_handler str x0, [x2, #ucontext_regs + 8 * 23] // Corrupt some random V-regs - adr x0, .text + (irritator_handler - .text) / 16 * 16 movi v0.8b, #7 movi v9.16b, #9 movi v31.8b, #31 diff --git a/tools/testing/selftests/arm64/fp/sve-test.S b/tools/testing/selftests/arm64/fp/sve-test.S index e3c0d585684df29723a49265f3df6d23817498c7..f1fb9745c681786f686f1fafcb7e1154f3c8e1a3 100644 --- a/tools/testing/selftests/arm64/fp/sve-test.S +++ b/tools/testing/selftests/arm64/fp/sve-test.S @@ -299,7 +299,6 @@ function irritator_handler str x0, [x2, #ucontext_regs + 8 * 23] // Corrupt some random Z-regs - adr x0, .text + (irritator_handler - .text) / 16 * 16 movi v0.8b, #1 movi v9.16b, #2 movi v31.8b, #3 diff --git a/tools/testing/selftests/arm64/fp/za-test.S b/tools/testing/selftests/arm64/fp/za-test.S index 095b45531640966e685408057c08ada67e68998b..1ee0ec36766d2bef92aff50a002813e76e22963c 100644 --- a/tools/testing/selftests/arm64/fp/za-test.S +++ b/tools/testing/selftests/arm64/fp/za-test.S @@ -158,7 +158,6 @@ function irritator_handler // Corrupt some random ZA data #if 0 - adr x0, .text + (irritator_handler - .text) / 16 * 16 movi v0.8b, #1 movi v9.16b, #2 movi v31.8b, #3 diff --git a/tools/testing/selftests/arm64/fp/zt-test.S b/tools/testing/selftests/arm64/fp/zt-test.S index b5c81e81a37946c1bffe810568855939e9ceb08e..ade9c98abcdafc2755ef4796670566d99e919e5c 100644 --- a/tools/testing/selftests/arm64/fp/zt-test.S +++ b/tools/testing/selftests/arm64/fp/zt-test.S @@ -127,7 +127,6 @@ function irritator_handler // Corrupt some random ZT data #if 0 - adr x0, .text + (irritator_handler - .text) / 16 * 16 movi v0.8b, #1 movi v9.16b, #2 movi v31.8b, #3 From patchwork Wed Oct 23 20:38:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13847904 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8D3F9CFA46A for ; Wed, 23 Oct 2024 20:46:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=NEYRctt2z4pdzaHTQmxg1OAUgFRxSQKW/aWh0IXJXEo=; b=0hzu6rBdq+DHyHITZ8rn2G31DB R09aWR6tihJbV5xgrLfKBQzzEH2csp60GHMq01NRjAU/kl1rVfp2H+TxqN9R3SPrDTkxE8vrBXtEN u46np9j/wnFIqQHVRfWf+hck5F96j5HxWBgQDbD67fG7t0mDqPvZBebtGj5td9tO8VvNvd8M5Oolr h458d9PN/MmXOIV+oNAW/F8TORcuzyVoktw7krJ+PFpdu1cHROPrlBApvUlbN4OqeMtAxU3cO51fm 7aiHov4afl2b10CNQEwOVgJNKmhQQYb8o6DnL0HEeXQVSdVbLFzOnMHV3Lprr5+zhUmDZY4Lp2V74 WfUrXQ6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t3iF3-0000000FssL-0gB0; Wed, 23 Oct 2024 20:46:05 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t3i8y-0000000FrWl-047Q for linux-arm-kernel@lists.infradead.org; Wed, 23 Oct 2024 20:39:49 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id ACAE55C5EA5; Wed, 23 Oct 2024 20:39:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C8EAC4CEE5; Wed, 23 Oct 2024 20:39:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729715987; bh=FhWCGlX4GqW3drCLhOz7oP3Ieg9TfDbYSvqYk0V+nyI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=cG2jZxEYaHm79SoQxc8GhTLIsCsTiHQHhRBHsxmhAZolW8/XUSWmqgZsX/inQT+Jt cZ6Y85/epCbKDJXhUad5vZOsCkCSEh4bmOOcaDBwiSv0cEmXxOReInTXyNhB/Kqf+/ hmXCJjMqzKRREXXR9o7WUfErMqtj00v047ATZ378/zdQegMcSMpays2WcTa/2EAHAS l4ALs86z5InFdcs2ZmX/V/NYBXJOAtxivOzrlS7xi4yYAvSkQVbaUD89wTpZJQATcz BX75Sy1ZtkR8+L5Yj7rZdNPEixSkpt/NiWkdUmbbiKsBpn+Hy+0VYhS0ZtN84rTFLK PjbX9vj7TTskg== From: Mark Brown Date: Wed, 23 Oct 2024 21:38:31 +0100 Subject: [PATCH 3/6] kselftest/arm64: Corrupt P15 in the irritator when testing SSVE MIME-Version: 1.0 Message-Id: <20241023-arm64-fp-stress-irritator-v1-3-a51af298d449@kernel.org> References: <20241023-arm64-fp-stress-irritator-v1-0-a51af298d449@kernel.org> In-Reply-To: <20241023-arm64-fp-stress-irritator-v1-0-a51af298d449@kernel.org> To: Catalin Marinas , Will Deacon , Shuah Khan Cc: Mark Rutland , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Brown X-Mailer: b4 0.15-dev-9b746 X-Developer-Signature: v=1; a=openpgp-sha256; l=893; i=broonie@kernel.org; h=from:subject:message-id; bh=FhWCGlX4GqW3drCLhOz7oP3Ieg9TfDbYSvqYk0V+nyI=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBnGV8HAtprWkaDeom0J0zZOIBZaJtVL+0CTV3rfZXo 5d9PGCOJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZxlfBwAKCRAk1otyXVSH0IToB/ 9RCm0u32j8dB88IyUiR+Jhgoe6iur7nWhVM9wLnewqQD7jW/StOFMDou1lhDiduv8Rf/njUEjfqfSP NFkQaaRcQYqdDB9xJ88pl6oLiq3PEPbN09UaUp5iaDhUGMxGAhMDHKJfYIL9QGx7cMWSXGZkPVkB/d CbP5m2e4LFcmJysjRmhCJHJnRCoQDGx79bn1nWsOqYd1AHeouicl+OyjKhQW+c0KlOyG4BMCjm1y3e Bboe9erv4FX/4cTxqHbvc5Fx9UDu4D5MOIjYvS7jw8GPAw2M1SXzjUkx8RWUJNzPlhmOql5MZVlvn0 eU6Z/sCDxCJ5Cf+O4vLuIjNGnLSmE+ X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241023_133948_137338_1D5231EE X-CRM114-Status: GOOD ( 10.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When building for streaming SVE the irritator for SVE skips updates of both P15 and FFR. While FFR is skipped since it might not be present there is no reason to skip corrupting P15 so move the ifdef appropriately. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/fp/sve-test.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/arm64/fp/sve-test.S b/tools/testing/selftests/arm64/fp/sve-test.S index f1fb9745c681786f686f1fafcb7e1154f3c8e1a3..3c88dfe9c8cad29f44217314aeaffa984bac05e5 100644 --- a/tools/testing/selftests/arm64/fp/sve-test.S +++ b/tools/testing/selftests/arm64/fp/sve-test.S @@ -302,9 +302,9 @@ function irritator_handler movi v0.8b, #1 movi v9.16b, #2 movi v31.8b, #3 -#ifndef SSVE // And P0 rdffr p0.b +#ifndef SSVE // And FFR wrffr p15.b #endif From patchwork Wed Oct 23 20:38:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13847912 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5E2EDCFA472 for ; Wed, 23 Oct 2024 20:47:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=qFQqIJMCoI3l4J3byjW/w5j2MNbERlwbMd704JJ1ji4=; b=0/5CzMM/HtPbEMxXYkzfXjodNS ZI63xI/C65lGZ+JBIvuH+gBhYgTohz+A4w2iCZ0aZ0mVv/007FOwcCD2RwvEA6dMZERI69BRa3Bfq U5UOhsw711xOjarVfHVXd7bz4R4hRw0C1sLQzY3NlR6sXEUDezXllBpXtjzIFVz6ZpMYXd3NWlztp IsIh5J8cZE9jQjTZ5u7BVfOp1xoFCI0atyFmXz3T8fzkVXCdT0jUdBv49jWLfPmsoTKoYstRTSlXS pE+VJ2jgI/ozAaUkMuYVMydn5V0LUc9hgVbQSraM7xVlvzLIq5Am34Iq/9RREBRS7ItQjjNiYci9U Xt0qAxtA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t3iGY-0000000Ft1u-1xTJ; Wed, 23 Oct 2024 20:47:38 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t3i90-0000000FrXd-2Jzg for linux-arm-kernel@lists.infradead.org; Wed, 23 Oct 2024 20:39:52 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 77F87A414B4; Wed, 23 Oct 2024 20:39:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67550C4CEC6; Wed, 23 Oct 2024 20:39:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729715989; bh=WEpX97GMGue5h7bD/Qq1020rZU1gV6I6QjnRHlLOdmM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Dahnr0R796Tfqila1uyH46kYi0NyolVV4NVVXPx6GyX+TrSMZvzYKC2IORDw91YcN tKn1v2LWgFdFPtpoEwjbgjk6TcOIttCRanO+Wn1Kx9ktepzB0DLWfPn2k9kRbxHEpv QVJKi4Vw2rDOt4PFgydLmUw68t6yFax8L3/qoTLFOZ8PTnT7PfbFP2Bi5t25UtJb/L 6DSwhJRBYZF4xpoY6+nQKd+4pjUNnGnL5IqlXi/vM6Trl54bV9JIarDJsED5Y7BdQA L+46L5knrXhElA4DrTtP4mAA62AOtl3HX8KthlH7C5vPXUsyLB8HoAnyPG094zqjm1 RfDstiEW0BL5w== From: Mark Brown Date: Wed, 23 Oct 2024 21:38:32 +0100 Subject: [PATCH 4/6] kselftest/arm64: Implement irritators for ZA and ZT MIME-Version: 1.0 Message-Id: <20241023-arm64-fp-stress-irritator-v1-4-a51af298d449@kernel.org> References: <20241023-arm64-fp-stress-irritator-v1-0-a51af298d449@kernel.org> In-Reply-To: <20241023-arm64-fp-stress-irritator-v1-0-a51af298d449@kernel.org> To: Catalin Marinas , Will Deacon , Shuah Khan Cc: Mark Rutland , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Brown X-Mailer: b4 0.15-dev-9b746 X-Developer-Signature: v=1; a=openpgp-sha256; l=2511; i=broonie@kernel.org; h=from:subject:message-id; bh=WEpX97GMGue5h7bD/Qq1020rZU1gV6I6QjnRHlLOdmM=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBnGV8IqFapOgWCDGYthrlNY7lK+roKfgEiszak93NR OziALsmJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZxlfCAAKCRAk1otyXVSH0C8aB/ 9UFKrDED/C0Pc/AaNhAZcgAygaJXFU3+FqMiLgUTnRqeckBQB23OIdfU76q00F6+cT6wcXrddgjfVq MN5mRc7jPQF2rWgQEsUviDNoaRJuSk89KZDFW0vOjP0KOqSS3U6rVinrrSGwF/1S3Y2VU9mdRY7ZGY gtvGmm+spMMl+ImoOlbp2kwd589P2O798KVzGLyKtjt0vWyzTPzEeNBWN92SbdgYKuH2tBvd35PhEy hW1oGvxgsIaWSIuuik8tF7zyvh76LntL4xi+PKyt8f/uv6RFAjkr3TFONT9HaYPi8vg3r9V4EhcHsY pwKFhl48BWyYjvD6WHIwzrUzHfEUBP X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241023_133950_754711_B4E38F6C X-CRM114-Status: GOOD ( 11.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Currently we don't use the irritator signal in our floating point stress tests so when we added ZA and ZT stress tests we didn't actually bother implementing any actual action in the handlers, we just counted the signal deliveries. In preparation for using the irritators let's implement them, just trivially SMSTOP and SMSTART to reset all bits in the register to 0. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/fp/za-test.S | 12 ++++-------- tools/testing/selftests/arm64/fp/zt-test.S | 12 ++++-------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/tools/testing/selftests/arm64/fp/za-test.S b/tools/testing/selftests/arm64/fp/za-test.S index 1ee0ec36766d2bef92aff50a002813e76e22963c..f902e6ef9077bfa34fa7f85ce572ce3df4346789 100644 --- a/tools/testing/selftests/arm64/fp/za-test.S +++ b/tools/testing/selftests/arm64/fp/za-test.S @@ -148,20 +148,16 @@ function check_za b memcmp endfunction -// Any SME register modified here can cause corruption in the main -// thread -- but *only* the locations modified here. +// Modify the live SME register state, signal return will undo our changes function irritator_handler // Increment the irritation signal count (x23): ldr x0, [x2, #ucontext_regs + 8 * 23] add x0, x0, #1 str x0, [x2, #ucontext_regs + 8 * 23] - // Corrupt some random ZA data -#if 0 - movi v0.8b, #1 - movi v9.16b, #2 - movi v31.8b, #3 -#endif + // This will reset ZA to all bits 0 + smstop + smstart ret endfunction diff --git a/tools/testing/selftests/arm64/fp/zt-test.S b/tools/testing/selftests/arm64/fp/zt-test.S index ade9c98abcdafc2755ef4796670566d99e919e5c..c96cb7c2ad4b406c54099fe3f73917259bd947e4 100644 --- a/tools/testing/selftests/arm64/fp/zt-test.S +++ b/tools/testing/selftests/arm64/fp/zt-test.S @@ -117,20 +117,16 @@ function check_zt b memcmp endfunction -// Any SME register modified here can cause corruption in the main -// thread -- but *only* the locations modified here. +// Modify the live SME register state, signal return will undo our changes function irritator_handler // Increment the irritation signal count (x23): ldr x0, [x2, #ucontext_regs + 8 * 23] add x0, x0, #1 str x0, [x2, #ucontext_regs + 8 * 23] - // Corrupt some random ZT data -#if 0 - movi v0.8b, #1 - movi v9.16b, #2 - movi v31.8b, #3 -#endif + // This will reset ZT to all bits 0 + smstop + smstart ret endfunction From patchwork Wed Oct 23 20:38:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13847913 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9268FCFA472 for ; Wed, 23 Oct 2024 20:49:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=x81WPgjq5SOtyxbakC7ihgczw+G9LIIBElwuB8ruK4c=; b=vIOlxT1re9jmjb9SOojpgw2LKd eRsSZ4DvjJmewvyIpvUDBbiqX6LOAAEJLcBlQKhwbbZgWT9EIyPpyKJ9kmg6xHfohkBonEy83yoIq 9y+43XX7J4ct69ikQoKgW0U/97E89Y8UsVmx1WLhz2yX/AkRz1tyIvCvgHvCcjn6GIGBJDaz4HvIb 4KEFzBnbsAoCg4+VmGjqd05eFPXTNHu2cnuAtPXE8mjTSdo1Eh9NZklIE//AfUl1USPBCO8rXwdEN 2nKr8dRrh+UnCWhS5701CQewTSgn7b7hFHmDrr4PS26nTJ0eA9vq4zFb68JQfZ6Bb/dug2PggbqlA Mx5iRuTw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t3iI2-0000000FtCr-41tG; Wed, 23 Oct 2024 20:49:10 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t3i93-0000000FrY2-05nK for linux-arm-kernel@lists.infradead.org; Wed, 23 Oct 2024 20:39:54 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 592ECA41665; Wed, 23 Oct 2024 20:39:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 76CF0C4CEE5; Wed, 23 Oct 2024 20:39:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729715991; bh=2eYH4MlA2swbnr7Adf9Eu7+rMkjhAxSKCoo92NFhmpw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=HHtL0+aZd7/UFWdJoQ1PUrq2RV2TSukC8tOFWZ8I3o8vQY4dHdkOzmBCQTEyb7ZbT SWbG/D5ipAZWBUWmZjAx5BV1wK9e5KWqWRKargoNf+IfxvN/QS49LScmAQDbWp7/Cq JKupvjpZWV+jqn+tIXeDNRoTTc7NR060b06Gj5cBV26xRlTQiIjNUpUGlvdzabtVzY NzE8PG85FZMx6Cs4N4TNBpafoRwq0dfgWBajllRdkkx+fDUOBLLrPGgvwin/aHCnmJ J2UdHBhfNoBmOB+hFbiyeLd31w14RSqmPogQ8wUUgATZh50KxUFRXJhAq60cNgIesO wpCwCESrNztFQ== From: Mark Brown Date: Wed, 23 Oct 2024 21:38:33 +0100 Subject: [PATCH 5/6] kselftest/arm64: Provide a SIGUSR1 handler in the kernel mode FP stress test MIME-Version: 1.0 Message-Id: <20241023-arm64-fp-stress-irritator-v1-5-a51af298d449@kernel.org> References: <20241023-arm64-fp-stress-irritator-v1-0-a51af298d449@kernel.org> In-Reply-To: <20241023-arm64-fp-stress-irritator-v1-0-a51af298d449@kernel.org> To: Catalin Marinas , Will Deacon , Shuah Khan Cc: Mark Rutland , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Brown X-Mailer: b4 0.15-dev-9b746 X-Developer-Signature: v=1; a=openpgp-sha256; l=1266; i=broonie@kernel.org; h=from:subject:message-id; bh=2eYH4MlA2swbnr7Adf9Eu7+rMkjhAxSKCoo92NFhmpw=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBnGV8JzNZQSvHQxUSc42pdgj2HsNPx/BcpVh07gynO a+c6ELeJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZxlfCQAKCRAk1otyXVSH0A/XB/ wKth7XVx9oz7qbfbhUEMkGwkOSykh7+5RLlvAUOJIoBYlh1ieDD1L9OWcTkbAa2RD+uhlnQrQc2eUm eUG/QBJVTQryVUwdV0wPEbOt9JARw63DmunugDrJ5ZzsHKJjNSeVswGtEU+C12ZSO3DmjSt+YQgKiy CML0owjEHha21n4gBuapaeBgeWUlGPAOEcWWFxQDPf/bCigtcl61nptjMwpkHisLNDg34Xw3MoVVbv rJHizDjXjmogDrvp/XAwGY2MZEFOeNcat73ig+/AOhdYuYg54HSQGvrCeRk9tYBZe5iWnjofKP4rdd 5JLYCyp/lk5qIIURn4WaTlXEglTh7G X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241023_133953_160892_556088DF X-CRM114-Status: GOOD ( 10.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The other stress test programs provide a SIGUSR1 handler which modifies the live register state in order to validate that signal context is being restored during signal return. While we can't usefully do this when testing kernel mode FP usage provide a handler for SIGUSR1 which just counts the number of signals like we do for SIGUSR2, allowing fp-stress to treat all the test programs uniformly. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/fp/kernel-test.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/arm64/fp/kernel-test.c b/tools/testing/selftests/arm64/fp/kernel-test.c index e8da3b4cbd23202c6504ffd8043f8ef351d739f6..859345379044fc287458644309d66cf5f3d8bdf5 100644 --- a/tools/testing/selftests/arm64/fp/kernel-test.c +++ b/tools/testing/selftests/arm64/fp/kernel-test.c @@ -267,6 +267,10 @@ int main(void) strerror(errno), errno); sa.sa_sigaction = handle_kick_signal; + ret = sigaction(SIGUSR1, &sa, NULL); + if (ret < 0) + printf("Failed to install SIGUSR1 handler: %s (%d)\n", + strerror(errno), errno); ret = sigaction(SIGUSR2, &sa, NULL); if (ret < 0) printf("Failed to install SIGUSR2 handler: %s (%d)\n", From patchwork Wed Oct 23 20:38:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13847914 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1D5B4CFA474 for ; Wed, 23 Oct 2024 20:50:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=llYcD+Is513zLIjCAA/mbI8o8ziXEE1hVw9PNEMHQRc=; b=dAto6cCyx8Fnuh3EY4UIwfPGO3 TjFQqsR7Glle/fyHMUqouTtWYelZLYO6zGc8XZs8FUOiyj7NUdM87Y0PFS7RYPgxGviBgtsWmop3B HRRL72HddHD762FChWUS9aYx+MmtloxZ8xziSSAZlY5OWfc7nGecpozIoFtD3nTMJHUtgzVqFChtS l7oZrfCXJJAOODZ9Aakcm037hQICNAC2l+pkg/4Go0awxt6u+Zq2VCADpmPSHO3PFdbxhcts4tnwQ VbDIlUU95Hl63sv05bq6BjBarQR8RszWV35ZnBzH+k2QjUiWw+/Y7aj0zdHfZBo0rL8JWfRXz3hRB j8gKemCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t3iJY-0000000FtS1-12J0; Wed, 23 Oct 2024 20:50:44 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t3i94-0000000FrYu-0oIN for linux-arm-kernel@lists.infradead.org; Wed, 23 Oct 2024 20:39:55 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 38AEFA414B4; Wed, 23 Oct 2024 20:39:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 839AAC4CECD; Wed, 23 Oct 2024 20:39:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729715993; bh=fVAM10zHyP6GG1K9/Odp1Yp4otIM0+Fw+7dp79I2hf8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=kxNgiSR+Wp1mt3SId9CP2ql3ho0BI8q99db+wRWSjZ3R/LkgGZpJe81d40QYGrvvd FzRFy9z0nlSJhtigrWi5JJNCGYwhCv/pNJu0RRMwfgJbs3rvjUKbeBmeAcZGeKDd44 SLpL0jyCRhQCHGXJA6bSChvSp7A/C7ACk+VfwQUfP6IhA4QiuSqBYHKkHHgcokqmLn WV4M9CVU1D0qBo7LrIq8ebO5cfa0zzRTIckZgiv1KkfW6f3fw2a8qU6VyAnjYqGXzT 7nV4EC+vphQGdjcgIdgEN3Gg2mRDWS8xfoSBiP6WrbhJGYmdMW900OU5ygoLXJLmhZ 0FohyD/Ua+NdA== From: Mark Brown Date: Wed, 23 Oct 2024 21:38:34 +0100 Subject: [PATCH 6/6] kselftest/arm64: Test signal handler state modification in fp-stress MIME-Version: 1.0 Message-Id: <20241023-arm64-fp-stress-irritator-v1-6-a51af298d449@kernel.org> References: <20241023-arm64-fp-stress-irritator-v1-0-a51af298d449@kernel.org> In-Reply-To: <20241023-arm64-fp-stress-irritator-v1-0-a51af298d449@kernel.org> To: Catalin Marinas , Will Deacon , Shuah Khan Cc: Mark Rutland , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Brown X-Mailer: b4 0.15-dev-9b746 X-Developer-Signature: v=1; a=openpgp-sha256; l=1298; i=broonie@kernel.org; h=from:subject:message-id; bh=fVAM10zHyP6GG1K9/Odp1Yp4otIM0+Fw+7dp79I2hf8=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBnGV8Kfm83OfpsWup68vNgZGsjfwOxMdRatu9MK/EX EdADtWGJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZxlfCgAKCRAk1otyXVSH0NdBB/ 4ovaIlGKNe94pSK3mKdh49lKzuMNLJ2f8VGtLwmXBVXGhnglT2HKySG/zPktYrphwp93qyS5YYsieP myhszUgkF3kQX80vnQRsEzta0e6Ycs/Q3GhttYo2upy2rIKC8ZV6jCDaLY9XFrJIRk4/B1BtRvlJe3 dOQGO9MEcDOZ/l59v0sholBFfq+j8jcfk3OUPXQnyNXpKFJymV5+3YZcy53rSRRVCQ22KShEx+P7ju Y9bP9QzD6cszgI5i6WM+Ibl7hzFdvjuo/wTlkGBd1Iy+h3h3/W7RnpRt6CHtbpuNIXZBrlnMRj0+cx lU2usTwPpNX6XrRhSkWlnQgrE4rBCa X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241023_133954_356535_47CFB4F7 X-CRM114-Status: GOOD ( 11.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Currently in fp-stress we test signal delivery to the test threads by sending SIGUSR2 which simply counts how many signals are delivered. The test programs now also all have a SIGUSR1 handler which for the threads doing userspace testing additionally modifies the floating point register state in the signal handler, verifying that when we return the saved register state is restored from the signal context as expected. Switch over to triggering that to validate that we are restoring as expected. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/fp/fp-stress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/arm64/fp/fp-stress.c b/tools/testing/selftests/arm64/fp/fp-stress.c index faac24bdefeb9436e2daf20b7250d0ae25ca23a7..3d477249dee0632b662b48582433d39323d18e18 100644 --- a/tools/testing/selftests/arm64/fp/fp-stress.c +++ b/tools/testing/selftests/arm64/fp/fp-stress.c @@ -221,7 +221,7 @@ static void child_output(struct child_data *child, uint32_t events, static void child_tickle(struct child_data *child) { if (child->output_seen && !child->exited) - kill(child->pid, SIGUSR2); + kill(child->pid, SIGUSR1); } static void child_stop(struct child_data *child)