From patchwork Tue Jun 25 14:57:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13711456 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03765C2BBCA for ; Tue, 25 Jun 2024 15:04:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 904BA6B00AE; Tue, 25 Jun 2024 11:04:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8B4776B00C4; Tue, 25 Jun 2024 11:04:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 72E176B00C5; Tue, 25 Jun 2024 11:04:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 4EEF06B00AE for ; Tue, 25 Jun 2024 11:04:34 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id CBA1FA180D for ; Tue, 25 Jun 2024 15:04:28 +0000 (UTC) X-FDA: 82269732216.07.C01B401 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf16.hostedemail.com (Postfix) with ESMTP id AF6E4180011 for ; Tue, 25 Jun 2024 15:04:26 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=cQW+1DGd; spf=pass (imf16.hostedemail.com: domain of broonie@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=broonie@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1719327852; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=5eBWEluxA75mkTzkT1Wn6Xubbm059W8B8emCrmFOIYI=; b=HI4IrXGXzFPjJ6Egpv+DpU1w6GRFoC7Tw521Qgz/+rLr9NKR7kqsiA1IWVWqx+gvgdr9eT wUeUw+hVI+rExe+s+Jtx2g2v1BejhkRIdomcbVRi/bUY8aiQS+xUFTFmNRgD5cQOcHCENa eGxZMef9TZRA8C0JhfL/KjPGfqzR5sc= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1719327852; a=rsa-sha256; cv=none; b=A4WGcjUgnLFD3zc6tgPSu8E5jC58oZVEdA7BAcBSvK5oW3jzstiVC7WDnVdBz8ueFm+xRZ XzWaZPVvxxa17BfEibzbB3vWKWDwWDC9l+yZP+3nLPC5CtWkFvE1DcMlbraQwY0f1tthVY Lzr7l6rsd6qERYeaeguXAVIoOAnDpnY= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=cQW+1DGd; spf=pass (imf16.hostedemail.com: domain of broonie@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=broonie@kernel.org; dmarc=pass (policy=none) header.from=kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id C61DD6146C; Tue, 25 Jun 2024 15:04:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28EE4C32781; Tue, 25 Jun 2024 15:04:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1719327865; bh=sPSz542BQgC8GDr8WCulUI2iE6roG4Js5HwD3OcoqCo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=cQW+1DGduHcv0A53zOU9mfAkvXSjD6uSZXuyR4OKXGWJkSe/JriAuddCQb/ggMUBL 0EGV34C3BUnaImshIGLE24glyODnPPn8T7WFwDdWPn5JEje154cty0lc7tLYpED/l1 D9bxuYZ4Tu7Rsk+j52ugfBSqCcKh+8XvB4PQ/tnL4Jds8PAlIpkChK+E5+AjvWDo3w wqh77NwL/H6uXGSEtmExGn2I0I8oTZ0yXqT2ge7AUQbIfP+/X5/nF1euuESXoR/qa/ 0Xg5HK+T58BIRhFnJhafQRO2yVDu6PuqW7TxQklDNo1pZ7QQh4TzLWiPXdazVs14L/ Ztft5vY4vM+GQ== From: Mark Brown Date: Tue, 25 Jun 2024 15:57:59 +0100 Subject: [PATCH v9 31/39] kselftest/arm64: Add framework support for GCS to signal handling tests MIME-Version: 1.0 Message-Id: <20240625-arm64-gcs-v9-31-0f634469b8f0@kernel.org> References: <20240625-arm64-gcs-v9-0-0f634469b8f0@kernel.org> In-Reply-To: <20240625-arm64-gcs-v9-0-0f634469b8f0@kernel.org> To: Catalin Marinas , Will Deacon , Jonathan Corbet , Andrew Morton , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Arnd Bergmann , Oleg Nesterov , Eric Biederman , Shuah Khan , "Rick P. Edgecombe" , Deepak Gupta , Ard Biesheuvel , Szabolcs Nagy , Kees Cook Cc: "H.J. Lu" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Florian Weimer , Christian Brauner , Thiago Jung Bauermann , Ross Burton , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, kvmarm@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Mark Brown X-Mailer: b4 0.14-dev-d4707 X-Developer-Signature: v=1; a=openpgp-sha256; l=1664; i=broonie@kernel.org; h=from:subject:message-id; bh=sPSz542BQgC8GDr8WCulUI2iE6roG4Js5HwD3OcoqCo=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBmetuKW/krSUi8XYWUdlkG2nL4UDldJ4ug0xy0Dt+C W4gJvTCJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZnrbigAKCRAk1otyXVSH0Pc4B/ oDUyvKD7a4pekNS7XWWK1YnPOFpl+MF1Lc9i1fJ+v+jX7ID8koOws6d/YA7fanEdBdLjm1AFT3MQ+A 0sA4gEEV3BthoJ9ttQNtSDM/s6NsXBuzZJcrLe+aGvJAKB+c5oABVuLAICYs0Hu+AUnrxKLHgSB8tC 1NCpnq1budfoJzMXhiEztD66jlgC/Dvl2dIOMsIH+QYPiF7ehjMg09yHq1lOaW6LXzdzU7IrTy55sY KbV0yiOf2PWv6Dvl3Oh0PuQevpo3MtLHNILd4SLlP6fS8w7sqImQdqva8anP5tAZaKJQF8LP+x+J0t U+sLYT+F8OyWupxfKOrMqgzFDQpZyp X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: AF6E4180011 X-Stat-Signature: oq176c6zd1adhcfzmrrecwpzpga1j4aa X-HE-Tag: 1719327866-326816 X-HE-Meta: U2FsdGVkX1/6KVa68egy8100KQwzS0+hiec7nhq44XcqiPjxkLRQO4xKjzvRfaM/MHf57lWEy+ECZL8M1mjoS69N6+AxPfUsOqwDeoYGy5gwgSuYiUr5DlyDnWSeNYYycEphRVk7VAUDkogvIfL3Y7IKBw19v2V3Om6XsUV4W5xyCNnoWAbe/vLOfwRki/F3mdT0rN3HvVcxKQg7Vjet1zg/WYqMctKeXmdz03sa9VfhI2PWe+kYJugScWsycDq2K7SfSsFm6kNQAA/IgvvuEN2tBBrKbVuv6BJIPO+nO6KVreNRgi3SUa6+SQR+qBgP+NbAC1Y9r0SBl8oC6kT6jRElE1xgnAHhpuR4rhKPxq3Ts6HOPz7eYatudIHpNdRgwCGNXlm3JbCiYS452JvPISS8LVLlYQD8y2kNuv+t2UfVI+XUBzJkvpQjBAhec7PMoiSLKWvl51HusExXw3lcjEwX52DdBhf+z3Bxi1YC6PIQyyByunyqZbYJk5UYj/GSVBzsRYrraPh73OMGQo7Ui/JgiSzpzILPEaHw/RyiaD6IePOZwHpOg/rCgW/IoamFKfKytvhdyMU713n5LDv6CpZ7trxe++/29fz5usu8YIWVQOsyHV504Xitd2jyDeTZUE7+qnAJl+/PyALBTBCdV25ywxg3lcWFYNQZ+sD8Z/TXzrBxGIkJtrMi/eSLJqRAo7PhReZt5fG6ik4Ak/iWOK8Gg7Kk01+SNyMQL3DkTwcznW8TCkVZ4GoybQI3wY05Ts1M8+RflKYCfN7IZMpFQLjNEwL3HxzH6h+l/polyZCahy9JVNdEpNNZEim9ndSngusU6sWIoaqJnWYlfxdnp5152Cx+atM26HHgBImT8sNYW1hdzFZBZlmbUL5OfXuzAMXdTC/qe0/aqzWxYHt3x6EkYOjDDJvVf5WXuWtLpbBC9ZrwTVg9UXWvKE31swn7ySNa3UzHLE+MIX4hdf3 Zbl7fyUl YHAoSENk9yu8GmMQX2f8Nlrr10YGMg9V53JJrFldJe6Iy544S/rLNn47+gqmy3RwoNchO5BD5SmebOClVnsvwjs788ut6/QKhs/Tgy19w0jBSfeIRq1XhC3DEz/RW3+tHebzNHuHpFHV/U8QJbNVC7Hq0gD/7y5r3QWgo1d6aP5F5+NhBHTTvjxqJ7+aE4gQ8SQ9yzP5Bbu9t919gebfBXQl/PgQeDKHdDi9vjVkVa6k9ZZspUAWC4xBm09C6sN+Ht6T2nUMbfywgoAOsQQKDXrctK7owxOf+5fA0Et0Hy0ffsOEOGehrQ4jYgJtNyNXWuw5WfEQxQpUkxHjYcP7jVbGnRt1pHKqpllrem4zwCcDCi054UjyZbwhFl5YHT8GmXveQ X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Teach the framework about the GCS signal context, avoiding warnings on the unknown context. Reviewed-by: Thiago Jung Bauermann Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/signal/testcases/testcases.c | 7 +++++++ tools/testing/selftests/arm64/signal/testcases/testcases.h | 1 + 2 files changed, 8 insertions(+) diff --git a/tools/testing/selftests/arm64/signal/testcases/testcases.c b/tools/testing/selftests/arm64/signal/testcases/testcases.c index 674b88cc8c39..49d036e97996 100644 --- a/tools/testing/selftests/arm64/signal/testcases/testcases.c +++ b/tools/testing/selftests/arm64/signal/testcases/testcases.c @@ -217,6 +217,13 @@ bool validate_reserved(ucontext_t *uc, size_t resv_sz, char **err) *err = "Bad size for fpmr_context"; new_flags |= FPMR_CTX; break; + case GCS_MAGIC: + if (flags & GCS_CTX) + *err = "Multiple GCS_MAGIC"; + if (head->size != sizeof(struct gcs_context)) + *err = "Bad size for gcs_context"; + new_flags |= GCS_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 7727126347e0..dc3cf777dafe 100644 --- a/tools/testing/selftests/arm64/signal/testcases/testcases.h +++ b/tools/testing/selftests/arm64/signal/testcases/testcases.h @@ -20,6 +20,7 @@ #define EXTRA_CTX (1 << 3) #define ZT_CTX (1 << 4) #define FPMR_CTX (1 << 5) +#define GCS_CTX (1 << 6) #define KSFT_BAD_MAGIC 0xdeadbeef