From patchwork Thu Nov 7 01:39:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13865729 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 0C337D29FBC for ; Thu, 7 Nov 2024 01:56:59 +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=AJ7B7W97ZbQz4BUZdGp7fg4qj3BBLPP4ihosl5lMMic=; b=EcIxdOXgyq3g7rJylayP/MRefP 0fFhXDlpMIFYWIiyOXhTs2ICGmEWCJBfhLeHBph7IAUo6FCosEchIl4TW9F2HKtPIkvvMy2351IRo EqNLbTKV6tZnJK7OjouEk7X8vfrKnIAJGREFxk76+f3PVhBdTotT71utfhXSs7qAJ0+i6oc8uUVnI suAtsRkjgMji7I2wzaNSNEhnyWZi7gBAyJTS5fU3S85aOD8PcGD+U9Cx0DC0CbBqQoqHUw5YZ8iB+ 3jaDI8CmNYybolyJ8h2z3NVWcVJTZVlMy55hdlChaHmIQIpn71PrxxaDFy0WyTvHZTBvFVQT/ufKn O0AMIV2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t8rlP-00000005MZD-2aZx; Thu, 07 Nov 2024 01:56:47 +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 1t8rYv-00000005KBW-0sLD for linux-arm-kernel@lists.infradead.org; Thu, 07 Nov 2024 01:43:56 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id DC8F05C54A8; Thu, 7 Nov 2024 01:43:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8410C4CED6; Thu, 7 Nov 2024 01:43:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730943832; bh=0bSqJfCBOTI4Jmz4xl8iWhEjG/ZUwMwS5LAsSpOElfs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=hUkKATgwOUiynyRaCLwhg28ZBXndF/nkmS5+NsBGFJ77E7tKRWc/xWWmBq9AWEU20 eg2Hp3nUIYojB8nOZ8XR4cc2XfMip+g6ql6M7kqgmNUcqFN+5fyI3qkR2GL9BeZL9h lh5kXV3HvpngOLIxX8qHzWzCRT7Mtk8un0l5AbzHkvdzN4JxyFQP2CpvWDJMtXjU8i Qx32HnMp3RRo1gRJHT2yEy4/KSqHRSFSYgr+YqFT+xyGbI3TlAzQPguEw1XcXiq4Kt xsCzOIC7X1QZ+N9hhv926A1Q87jHK+ye6aJHB/tDVPJp9TZtBtCzuPcSxLmPmvh8g6 FD3EtRnT8uUAg== From: Mark Brown Date: Thu, 07 Nov 2024 01:39:20 +0000 Subject: [PATCH v2 1/6] kselftest/arm64: Correct misleading comments on fp-stress irritators MIME-Version: 1.0 Message-Id: <20241107-arm64-fp-stress-irritator-v2-1-c4b9622e36ee@kernel.org> References: <20241107-arm64-fp-stress-irritator-v2-0-c4b9622e36ee@kernel.org> In-Reply-To: <20241107-arm64-fp-stress-irritator-v2-0-c4b9622e36ee@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=2159; i=broonie@kernel.org; h=from:subject:message-id; bh=0bSqJfCBOTI4Jmz4xl8iWhEjG/ZUwMwS5LAsSpOElfs=; b=owGbwMvMwMWocq27KDak/QLjabUkhnQdaf+pybN0Nz+Uf9z3XOk/V30ft+Kz1H8Tmw408aVGujZr OizuZDRmYWDkYpAVU2RZ+yxjVXq4xNb5j+a/ghnEygQyhYGLUwAmoqTB/j/zXSXPHp5Q9wuqnNlTJ/ dy394V1xd7XDPEomniW1H/wPiQuLtZr5umd9tWtG73vXfvHdfeLa+jnz5Q5QtfM0+6Z4r7T73gxzGS du+vftWfu7jsqljFFaWZ69/VPCzc02Dpy2nnEv7UrfmK14N7ETPjZBuvTvqgExTcX7BrAqObn2ntzb /8wso5LZ65i3NXv3R5zKhkrC+16v1Xx1umR2eItCXvuz1rVx3HrLwGO6/921vbCoWOF19u23xCVtTw 6yq/lmAD5bdzZ8unqJ/gSFfu3Xh4tsU35/46hZxQQ7uM5ZtOZEb+/XXNPiw5oP5PjQSjCFPothdGgT 9VT/CcDzwfr31v3vN4bp8Yb+aPAA== 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-20241106_174353_789481_1A87B9F7 X-CRM114-Status: GOOD ( 12.20 ) 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. Acked-by: Mark Rutland 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 Thu Nov 7 01:39:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13865731 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 E9AB0D29FA5 for ; Thu, 7 Nov 2024 01:58:40 +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=1vVUvyFHwngXeMXOSKmwCbEQ/z9rYXT2x8MXOeUDBn4=; b=oSLUNMviKJ/YNh9DvzCdNaoXqN CVxzNu2sxEdnW4KFJN+qFlsrWLuLnIgFnvx48pzHiChii8ucz1ka+b9vv5ITv/GTu1dpwh1CNQpez Z/L5IA4aYTcTmKwwjhPT/dhXWXahDJ2XJT5FfEDCOFkaEu0uDLcJZK0oJ8C0eDg1GPAwo0Jb0ng5U r7x/db4vimk7IXYmPdKZo1SCr1PAffEPaKGq4l588+jCK1FzPDx7M1NvENrTRaZemu9V473zVhWZz HskFiHRHHEIJEecc3MJZR40UqTuBvvXTrrRfX4MylDChsRDWtYZuNQ9aVRnyCtn5esnuSi6JKh8M4 QO5ZY8xg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t8rn5-00000005Mln-2gei; Thu, 07 Nov 2024 01:58:31 +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 1t8rYx-00000005KDW-10Jo for linux-arm-kernel@lists.infradead.org; Thu, 07 Nov 2024 01:43:56 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id E348A5C54CA; Thu, 7 Nov 2024 01:43:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2980C4CEC6; Thu, 7 Nov 2024 01:43:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730943834; bh=pztdj+ZQ+nZ7pOduVmqycF1CMI4X4Tvlwsap3wvNFRg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Oc+QEMKHU7cbG/RYFDdqKaWXES/WEKu10yV5Iul6hLPPPTLWiRslUB2L06v3iq7zr HoVNs9Y8/UOuZPRSUaiT2/xD47sfdKaR/z1M9VMCLK8fCx+ILNlmguP+EGRxQyz9ak 0UN5NYv2qPruR9YSVUSHMKJ2wW26eMMnocEGe9M6Lw2alYRRMdGMHMeirfEh07vdS8 5ON1GmoXGhVxvvvPMwHfkc9xtoQfyoDfQE2WMY8vok59QuulrrR1DkQGLZUHmSIoic 14hhGFXKT914pLGwPGNmj9d5dRq/YUdshqPZK8uGcdWCQ3nnBX+8Xb7nwERJgTw4NS /QNo02PWQrOEg== From: Mark Brown Date: Thu, 07 Nov 2024 01:39:21 +0000 Subject: [PATCH v2 2/6] kselftest/arm64: Remove unused ADRs from irritator handlers MIME-Version: 1.0 Message-Id: <20241107-arm64-fp-stress-irritator-v2-2-c4b9622e36ee@kernel.org> References: <20241107-arm64-fp-stress-irritator-v2-0-c4b9622e36ee@kernel.org> In-Reply-To: <20241107-arm64-fp-stress-irritator-v2-0-c4b9622e36ee@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=2653; i=broonie@kernel.org; h=from:subject:message-id; bh=pztdj+ZQ+nZ7pOduVmqycF1CMI4X4Tvlwsap3wvNFRg=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBnLBtQXEOcLYz6Ymz/L4TdCASUU/sNqoWsRJpykR6Z kTRk5l+JATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZywbUAAKCRAk1otyXVSH0PYwB/ 4l4i+l+21+Q7gIu9w2FF+H8asSmEscEiVklMw1AHhwNlzuWQ8cF1nEfeIf5vYFpbEakZsgDeEZWQeR AxAiY+xOXYg1HFw113F3OHX46sgc5qf+Lnmbi1oO7kUy76Bu7F/WwDvF/gGX72ItO9BTQkj1n95vCt 12T/S2MKUiqaEOF/rXX07ehlOs9+cj/dBqXyvrv2Z1xRauxMpIwANsDYhJUtYEApfosvOdprj0Ayxr dqx5ouw13YOwbhMyCN1Y+RGsZlbeAfPA46AWnGjg0zvF322CJttDB3PGXeB53GBVYvggpdLeTPxHVL PDWXh9J01KcLIG+nP9N4WoD4HaJlWT 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-20241106_174355_532544_0C68D373 X-CRM114-Status: UNSURE ( 8.29 ) 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. Acked-by: Mark Rutland 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 Thu Nov 7 01:39:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13865732 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 D2402D29FA5 for ; Thu, 7 Nov 2024 02:00:36 +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=ey6XNX5PbqVGBWLGb03G/bAnkJUej94evD8jcDY62k8=; b=pqQ2du9HqGP4ph5o1wQMTKS/C2 ZDx+SGJHc6X2I0smFRBSKi7Jw5mAOthFHMENcQNiA4HNgTvJKRyk4xAPlpUuED8qYRSGPS4LMITEg vXmxabi92/3+RbUBif8nJhMgbQeemwwWCX0C8mtWfdz6KyA72xJu7JuFSlDcYA8x2aM8P0p1ZFmU1 Vh54m4DmXnJjoES7dXFS1TNo8n2XdILtVYtHBY3oQRURS8dYF+0f7vZ9eHf9lz8kTfuAcSr/xZeIa mzdaJYdCNAorRl1m55ME3clecqsK8oco0fBZqkV6v91GIVVa/RmWYgwVs873grpd9zQToufqGEHQR 0t6ZtxPg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t8rot-00000005NBa-3xxg; Thu, 07 Nov 2024 02:00:23 +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 1t8rYz-00000005KEe-0KBC for linux-arm-kernel@lists.infradead.org; Thu, 07 Nov 2024 01:43:58 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id DBC5A5C5438; Thu, 7 Nov 2024 01:43:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BBD3AC4CED2; Thu, 7 Nov 2024 01:43:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730943836; bh=Ntx8WxDk8rLB1Q5ojb39wO8KX0zB/auSEfmEWkUG1Zw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=eOGRyaQBHLWbThvMfSOe+NdKSSWq47FiT6b0jbREJrCrmCCkKRYzBX+kI8uqf4FGB 8Rv3aIyC0qor9e7OhXBedZ/cj9Of9jgpTWw/ukU8ZRaZzBW1kRxPIXrz7wQ72uT3Go k3T+rD5Fmj8phhkMIU94o0Mc6vDXwQiq9tz8HUaiJBhUqOzNkve1cErbwnm5NhPshu AzS2XHxlYB6oBLepZrn7YXVck1C5VRttG7VoARVhv4jOm4klkosh8LV7cTGDr1rCI+ r+4m1zmGwPYFpV3s2XQgqfkehkMXEBiIgUHjIOC0VUa5YYa+5E4YFmg/XikX2smBGe eVxd6sDElshsA== From: Mark Brown Date: Thu, 07 Nov 2024 01:39:22 +0000 Subject: [PATCH v2 3/6] kselftest/arm64: Corrupt P0 in the irritator when testing SSVE MIME-Version: 1.0 Message-Id: <20241107-arm64-fp-stress-irritator-v2-3-c4b9622e36ee@kernel.org> References: <20241107-arm64-fp-stress-irritator-v2-0-c4b9622e36ee@kernel.org> In-Reply-To: <20241107-arm64-fp-stress-irritator-v2-0-c4b9622e36ee@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=949; i=broonie@kernel.org; h=from:subject:message-id; bh=Ntx8WxDk8rLB1Q5ojb39wO8KX0zB/auSEfmEWkUG1Zw=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBnLBtRwxb32ApH8TNCcyHne3pvmw/cpBt6AyUptaVN CbigTQOJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZywbUQAKCRAk1otyXVSH0Ez4B/ wOuFw0QZXOAEYlFcCsYcnod9CvSTtuMwy5tDEnl0yp9kzzWK0P1Y3U89+XaFPf37gas7ljxNTWD85P ep6hgFfDMW3ZUzsQks3C8oSQPvpGEdsaNW7Bb3lCM6k30WJxpcA1AbWsNpgXEG2TAQHqSwLcZUHbr/ Phe9TzUtRbi2szmDxzDGMzOL/JOz6K/v3AziIWHW3LWds5gA1DfXMFf2Y8tONxzQk/I6JXuX3MWZxV PNGhLcDB1GZx1onv67RT3a2zDo5zgAmJvV4dwJbMMvljWihwNE+pv35clsC/22S07uBgQRK8VFpNGU J36mxVJYc8xIgrRjhbJxYU2fCZ8E4U 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-20241106_174357_201920_C271B32C X-CRM114-Status: GOOD ( 10.38 ) 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 P0 and FFR. While FFR is skipped since it might not be present there is no reason to skip corrupting P0 so switch to an instruction valid in streaming mode and move the ifdef. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/fp/sve-test.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/arm64/fp/sve-test.S b/tools/testing/selftests/arm64/fp/sve-test.S index f1fb9745c681786f686f1fafcb7e1154f3c8e1a3..28eb8b5cc2d2e6f51818f29db037e55c9b838a41 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 + ptrue p0.d +#ifndef SSVE // And FFR wrffr p15.b #endif From patchwork Thu Nov 7 01:39:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13865733 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 D2574D29FA5 for ; Thu, 7 Nov 2024 02:02:38 +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=7fr1aydG1CeWxI3Ir6yD5jRjXFZ0+WsHcDj2lCQ3QPI=; b=Ea565E0U0VA17LYbQAA0xce5QS LqQyhHyMCIjU37p5cYXT5/MdAZuU7ntl4/sAaMbCeYbCHXrNar9/NCx3hl9EFZOt2ljNXwRuRnIE6 Ybe9gun0emp367a7Q1OcEbQ0L3flW2t7UwxFb1z78wk4DyYvV++vqx08byTrtG/BYykXVpRn296pB TM7KK2eebpnmluXJPPyE86Dvx6THwVQ2CUTbFffV2eaGq/UStPQkkavCKQH9tkwHg22hurrbfNHJS ZHBsj4DM/PeKuri8J/HF6BvS3gmHwxyuof81orMtdq5nhPUu4S12edXb3QMb5H4yZAFOPKSmejFdO o6KqR8Pw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t8rqv-00000005NvZ-2uWT; Thu, 07 Nov 2024 02:02:29 +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 1t8rZ1-00000005KFd-0Axt for linux-arm-kernel@lists.infradead.org; Thu, 07 Nov 2024 01:44:01 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id D800B5C54A8; Thu, 7 Nov 2024 01:43:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7C76C4CED3; Thu, 7 Nov 2024 01:43:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730943838; bh=UoJTq/4nL7BvDS6uY/r24/IvWcAW7qJlvfXTsku1iBE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=JoGAVFaMtyTqLWfIgNr/IR1H96/1i3JXJuY1GBIIhGy/MSX8l0z2eMmOBuO+vEchH XW3dC68fRE0dOb9WdFfGmPTbBPCyctuR1/2OiSz+9Ci9bKIVgivsauXlYRbYGvOQQU t5hgPhXjvQtcFGBj6e+RuRYMSqa4/3Yb0Tj8mNQIyuYDUtu88A8/KWta9+IbHc7HcT SNsjwZAmaG1xwVEih+yu/ebwYh+SwgiAlANhJ9mLnCP5IQZ4uSm2iCw1NzPcFssxcO ccoYPDLBaX6GKL7xFL1HRRss4zU8P5K45fnIqAnLdBwBy8usY/7Hpaq3luJUcHieyU tfemnMhet+hKA== From: Mark Brown Date: Thu, 07 Nov 2024 01:39:23 +0000 Subject: [PATCH v2 4/6] kselftest/arm64: Implement irritators for ZA and ZT MIME-Version: 1.0 Message-Id: <20241107-arm64-fp-stress-irritator-v2-4-c4b9622e36ee@kernel.org> References: <20241107-arm64-fp-stress-irritator-v2-0-c4b9622e36ee@kernel.org> In-Reply-To: <20241107-arm64-fp-stress-irritator-v2-0-c4b9622e36ee@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=2558; i=broonie@kernel.org; h=from:subject:message-id; bh=UoJTq/4nL7BvDS6uY/r24/IvWcAW7qJlvfXTsku1iBE=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBnLBtSwoIBhD3y9ti90AkhESfq9btN6AviJzAkJBpX JMLOoZCJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZywbUgAKCRAk1otyXVSH0PY7B/ 4pynI9BeZ8ypvO8mQZDFKRkRl06pvwb0CZjNnHowWK4SQFeZQ69MZ1Bn2LD87oQiKDerIG6YmzQh6L tYGa+qzUGMOxhhVpXX1nEE2AA8/4cOVbjG1gjo0LnDtl53wdeI12qPSO7UOSc17WgfHJLVf7AA8S0q E8C7T6gnyfhtT/RPLB6k6+x7S76ra+U4yvVGGnuO9EjcByDdHdKrIz/7BEg8l7vmWbb+Hv0x8PXvke 0S9JnXkgAeIrTH7X47McaV+BsgXHXI4PEhw40BJI6TKGhIB+gR8rpiLifeHX+mHuhL8dZiQ5YW9fzI V8CA8bt3/idVoZ+zcv6yZe6ckghDjl 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-20241106_174359_235711_20A8448F X-CRM114-Status: GOOD ( 11.02 ) 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. Acked-by: Mark Rutland 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 Thu Nov 7 01:39:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13865736 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 14854D29FA5 for ; Thu, 7 Nov 2024 02:04:37 +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=LOdfE5x4EKrySyBVmxKS94qCwTLAMgW8NOpDH3vP8WU=; b=SCxfytWsBzg/DcHqegtZppGoBV tXumsAsYfjZuEqu0UgAjIoxJpW/2wWB15JkEbjuhzfXonm5HBdxJKmBiX5ChNkPG8aytGHPMwc8hD yAmUDx7Z5Lhy2sKlil53sjLeYlrH6wM2bWwZLB9DKMvID2sVNx1HHUHNN1eG/TQCYm5btGHY2sblL NWjVzqfGe7Bd4ZTPiaF+DqsqcrM4G4GY80Ohpc4x2U6UVmMNSEBvYrSVSFG4W6bz1TodYt7by4jRA qktjdx5Uof85HEqZnyq/N9txjm0qU94hnBP/oNqyg2RNlrCMgN8mHdFxBKTaYb7O5SFHbyLAtvDyk SMHO0x4A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t8rso-00000005OXs-0PK8; Thu, 07 Nov 2024 02:04:26 +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 1t8rZ2-00000005KGy-3wI6 for linux-arm-kernel@lists.infradead.org; Thu, 07 Nov 2024 01:44:02 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id B541A5C54C7; Thu, 7 Nov 2024 01:43:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2BB7C4CECC; Thu, 7 Nov 2024 01:43:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730943840; bh=leVU7E1xUyU67WCn5RdQJAXMEOCia4xbUFczyjMgbo0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=jD80AIlzSqU2r/cv9e/ie7Owo+WfjDElCsL6B8UgadlAaRiP+5loHocFvNnVoXa3b oG8RmynJUtK37v71OIhLcZ69krDJBhOFA0AeuVVW27cAGQZionXdR24/7k0cRDqCk7 iUgTosPk1f5VAvyd9OHB6ztAXzsPufCXXbu9EQKqM8rMrotlyka3xcBKE/zQe7Dm+9 Am0HwME3N8tHhzwS2JxuGME7wRWy4Bdv4SY/M689QhbIdy/rP0KVDWZHhYAwaUSc+O qGu4/mSb5RC+oydJLjZTYmjZ4HhgbkKe72gq7teGXdHUNvHWNniMIDf6rr69kggRVh nNhCsTdzDcVqg== From: Mark Brown Date: Thu, 07 Nov 2024 01:39:24 +0000 Subject: [PATCH v2 5/6] kselftest/arm64: Provide a SIGUSR1 handler in the kernel mode FP stress test MIME-Version: 1.0 Message-Id: <20241107-arm64-fp-stress-irritator-v2-5-c4b9622e36ee@kernel.org> References: <20241107-arm64-fp-stress-irritator-v2-0-c4b9622e36ee@kernel.org> In-Reply-To: <20241107-arm64-fp-stress-irritator-v2-0-c4b9622e36ee@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=1313; i=broonie@kernel.org; h=from:subject:message-id; bh=leVU7E1xUyU67WCn5RdQJAXMEOCia4xbUFczyjMgbo0=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBnLBtS2FRnGevJn8KdIwsF19SK/BkdiQ/yz1S77N3e u1IvERGJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZywbUgAKCRAk1otyXVSH0DadB/ 41K/s/wFQumB72ze1INxlRbvEQrpNju8Mfu7P81epd5uw2x02Ey2Bg9GCyHSCnA6T+2mHk4N5NK+FS vPG6XeN9PkdLjANLz/0gx91TrUw/Sf4Cbun9GSYKk7tmLBqHMJrEEAWoeJtfWXVi0aj/UZ78bTikSw nA90uLjIeY8Gnr9Sdo0xss5XTV1RjfGNScF7EPgMreb6nGCHmhfq9i1rqauJwqT2oCTJUsGYMxcLi9 XDVrtAY14aXzBud0yt2s442KvlKVj/EcHfZdnM5cR8ZtRmPbYH3Aj3qb6JQOiIrczBxYLAGuT2TRs/ EPkj0uwDq0d7TChyA7GwaXUmott0Rf 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-20241106_174401_150731_D103F198 X-CRM114-Status: UNSURE ( 9.91 ) 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 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. Acked-by: Mark Rutland 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 Thu Nov 7 01:39:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13865737 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 07387D29FA5 for ; Thu, 7 Nov 2024 02:06:21 +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=dFwUVkp1LFUrT1bd0e5cxLw4J6G7gfMz/1czgC7EWMY=; b=pHDja/GeRrAUYbjHa8FnRjH98K w8IACw3dVKUh3pcojxWfIYbEKblWlvbBCzW2dxEpp1u9EZoJZvddGcE8t06RIoJkowmZQnhFjEUo+ NWZzE57ZcjHXR/Iu78sXFC/VihlFeex3cb/OnGgafb+/mm5iUrgkpshpbFeU2yEd+eQfdRUO1cLC7 o1q/gmS1QfQ8pebt8r1J0+/Ysh3PYeSDOo5AzNMSZoSIckDsoDq5W2ibbLGiYhCZNQnzKK1XVYAyT Cy5gshR6Tzgi7edmcVCdBdCoLr9S0s84jUkogQtaDW3ABG5yJRU+cwenjt9O7qxTVVV29baxv4mi2 GbLQEXDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t8ruV-00000005Ozz-2mCO; Thu, 07 Nov 2024 02:06:11 +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 1t8rZ4-00000005KIF-3i8Y for linux-arm-kernel@lists.infradead.org; Thu, 07 Nov 2024 01:44:04 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id B166E5C54A1; Thu, 7 Nov 2024 01:43:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACC4BC4CEC6; Thu, 7 Nov 2024 01:44:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730943842; bh=vmq9jrn8vuSD3VpJFg9vZzUggmSUeit7J7xVMGFrJhg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=SNyWj4hXoSwtKFE4Q23qDjAbNQV2HYafmT6nfUhsCGj9bJC1XOa/8scYdkfYM6zdj 4PtEtBF0uPRREIwL7lgIH8w9Rss3EgVdkR/dT+GNsrpHOdr7q9lIX5JS5qKH6oBzLP g3XgNT2cdhbFuf2e4JcEv7KlSMnuxUPwN5D/E8X9PlX0yjjbweoTHyTjW1nlskRBBd rIvle74315XTZEpG7Q7owSb+06aLjmK5wVYhfct1/A+rsJ4x5SOg8HXa+HAcv6V/KL AZx46JsJ2IDBxapUvJgrlXfLsxqNc4syQGUNE8BrDKf1xnOFZ/ZPwadSVTMrmjfX+3 ytP5fOQ0Kn7JA== From: Mark Brown Date: Thu, 07 Nov 2024 01:39:25 +0000 Subject: [PATCH v2 6/6] kselftest/arm64: Test signal handler state modification in fp-stress MIME-Version: 1.0 Message-Id: <20241107-arm64-fp-stress-irritator-v2-6-c4b9622e36ee@kernel.org> References: <20241107-arm64-fp-stress-irritator-v2-0-c4b9622e36ee@kernel.org> In-Reply-To: <20241107-arm64-fp-stress-irritator-v2-0-c4b9622e36ee@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=1345; i=broonie@kernel.org; h=from:subject:message-id; bh=vmq9jrn8vuSD3VpJFg9vZzUggmSUeit7J7xVMGFrJhg=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBnLBtTWoXA4eHd6zfw971HD8lilDRJqnyTNW/1R2WW DSk3ur+JATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZywbUwAKCRAk1otyXVSH0NxLB/ 0QhT6wTv8THELHvP8ObPV5Wls/EzSymSLag6pDrd4ya2LZ50x0Q6/+4Yni77XBfDvIMGDzADqk9d1y pPC6kx+WhBONPXVYzCcG+oeucfATYVRlJem/srypiq84viWGUdETPLB3tyJun/CcptYd37d2PNrhcP cOakCK+6UKQjnTZYU2ERhh1zRPHoavzLs/5eBz54TqQBgsLVd37WPGHVh/gKjlkLLucyFfpNCATfqT /vKAnFfvgVjPegyVyYXKfFpee2BIk+e92YdZTYJHREdL19GhFfMhDfWbMgDI2U0lpW/swoLG0QXSMn aKXv8WLvIqS08/7aj4Zn88rMvcrV7N 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-20241106_174403_022818_130522A0 X-CRM114-Status: GOOD ( 11.02 ) 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. Acked-by: Mark Rutland 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)