From patchwork Tue Dec 5 16:48:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13480464 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 DCEBC4174B; Tue, 5 Dec 2023 16:52:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aHMiViY7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2CC9C433C7; Tue, 5 Dec 2023 16:52:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701795127; bh=jvyJQ++Epw5Vr3/tG/z6+6Y9vzI/cjN2rH2C/CkHcMI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=aHMiViY74sLM0JM7CzVJxKp1sKwUZX3Hz9kDzZI0BjfyDPqoitPV11YOa1xB0jo4z mfgW8ZzoWBeARI/GI7KvWK42ECqqPhaD1WPQal6NKo6F5rwnFFiwvaUBdO4yVdMu45 9z8jCLaGf5UiD4jHqlbpq0xHMcsySwF6XLZoKSfPO8U9zwh7xZ3kntA9OAQVcsbftl +RngOADO5zHGkrpjQbH8wZjGI5qp6BJC9FcYz3iCfAxv4UaJVykCMPZpWRx6aj6SbQ 5ei0iZxkE6eS7+vcegmr/0Z8Hi5lPh7A1utIf9oX/BoRw4EURS1C8gGoDvQClNN6BT IzEFsGvg5ezyQ== From: Mark Brown Date: Tue, 05 Dec 2023 16:48:15 +0000 Subject: [PATCH v3 17/21] kselftest/arm64: Handle FPMR context in generic signal frame parser Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20231205-arm64-2023-dpisa-v3-17-dbcbcd867a7f@kernel.org> References: <20231205-arm64-2023-dpisa-v3-0-dbcbcd867a7f@kernel.org> In-Reply-To: <20231205-arm64-2023-dpisa-v3-0-dbcbcd867a7f@kernel.org> To: Catalin Marinas , Will Deacon , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Jonathan Corbet , Shuah Khan Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, Mark Brown X-Mailer: b4 0.13-dev-5c066 X-Developer-Signature: v=1; a=openpgp-sha256; l=1642; i=broonie@kernel.org; h=from:subject:message-id; bh=jvyJQ++Epw5Vr3/tG/z6+6Y9vzI/cjN2rH2C/CkHcMI=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBlb1T2B3U1hdoWdZAXs9jUGxuRLTGh/zZTJUyGObw3 yFBl0nmJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZW9U9gAKCRAk1otyXVSH0JJRB/ 9G2ggrdGUsuptbMXcksc0nGAzBLQ1pTnUcoaTAl4TOuVbMe4yKlRHcjTlRdfxCwq85aVKyiqb1MX00 P8OvQYkKGA/OYj0uiztlch1dGXh1CSWqKeeXvLdL8B/lOSKZspxRwdP6JEDS8qNsUrrXp3TtYCN6Hq tDJ581VLH/iki9SkugiOXebKqIzWG3RHb2ZX2oRtU1X+G8AVt6FkBptRx/PXsixdqBuccjSxGbYaWh FuuojFJsAdMyyEIkRJeVELNgl/itQTmxA+uSAjixwjpugc2aiY4Mzp9QG82DuYepM4OPiy2dPCSjUW xsae0hesxj91R0/xZnNco/vN/ri375 X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Teach the generic signal frame parsing code about the newly added FPMR frame, avoiding warnings every time one is generated. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/signal/testcases/testcases.c | 8 ++++++++ tools/testing/selftests/arm64/signal/testcases/testcases.h | 1 + 2 files changed, 9 insertions(+) diff --git a/tools/testing/selftests/arm64/signal/testcases/testcases.c b/tools/testing/selftests/arm64/signal/testcases/testcases.c index 9f580b55b388..674b88cc8c39 100644 --- a/tools/testing/selftests/arm64/signal/testcases/testcases.c +++ b/tools/testing/selftests/arm64/signal/testcases/testcases.c @@ -209,6 +209,14 @@ bool validate_reserved(ucontext_t *uc, size_t resv_sz, char **err) zt = (struct zt_context *)head; new_flags |= ZT_CTX; break; + case FPMR_MAGIC: + if (flags & FPMR_CTX) + *err = "Multiple FPMR_MAGIC"; + else if (head->size != + sizeof(struct fpmr_context)) + *err = "Bad size for fpmr_context"; + new_flags |= FPMR_CTX; + break; case EXTRA_MAGIC: if (flags & EXTRA_CTX) *err = "Multiple EXTRA_MAGIC"; diff --git a/tools/testing/selftests/arm64/signal/testcases/testcases.h b/tools/testing/selftests/arm64/signal/testcases/testcases.h index a08ab0d6207a..7727126347e0 100644 --- a/tools/testing/selftests/arm64/signal/testcases/testcases.h +++ b/tools/testing/selftests/arm64/signal/testcases/testcases.h @@ -19,6 +19,7 @@ #define ZA_CTX (1 << 2) #define EXTRA_CTX (1 << 3) #define ZT_CTX (1 << 4) +#define FPMR_CTX (1 << 5) #define KSFT_BAD_MAGIC 0xdeadbeef