From patchwork Thu Aug 1 12:06:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13750411 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 B3DF0C3DA64 for ; Thu, 1 Aug 2024 13:01:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 48B066B009A; Thu, 1 Aug 2024 09:01:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 413E96B00CA; Thu, 1 Aug 2024 09:01:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 28B7A6B00CB; Thu, 1 Aug 2024 09:01:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 075206B00CA for ; Thu, 1 Aug 2024 09:01:01 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id B4F5B1C4098 for ; Thu, 1 Aug 2024 13:01:00 +0000 (UTC) X-FDA: 82403686680.14.2EE76BF Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf25.hostedemail.com (Postfix) with ESMTP id 57CF0A0035 for ; Thu, 1 Aug 2024 13:00:58 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ZAUnG7gy; spf=pass (imf25.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=1722517201; 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=XmPtlx/FxBlzGB8bkRsL848IxLxJ+HS+8JpjQ713upXY2aqTOHF4Mtq6s13+5C5HvCo07/ cm/VHZfRQcbVCpqU5+DFLsZvtEFc0/16S++r0haWHNyltmcy3DdZsXQfXIdkzMcrEj7K8V oa0SVSS7gZ8j3xSsQyYY5e7PqDH3apE= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1722517201; a=rsa-sha256; cv=none; b=8hf5xLoMRyO3WRMU6nqJ/t3MH4hvW/QZPMZqJqYPRENXd2O5Dc5VzIb9NTDiWh5/uNZbN6 U3D6jvfovUQ7PqT1N0zxf9zPhtg70f5QzB+rQ+JmdExnKK5HXmpsbYYe9muMTyGbos1xEP qxPC7Phb6/jYEuYCbHJLRhb5wsTQE6g= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ZAUnG7gy; spf=pass (imf25.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 7346E62850; Thu, 1 Aug 2024 13:00:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C837AC4AF0A; Thu, 1 Aug 2024 13:00:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722517257; bh=sPSz542BQgC8GDr8WCulUI2iE6roG4Js5HwD3OcoqCo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ZAUnG7gymw3ama46N4/FSDxSkR6dolweB/eurjLYlAnm9DLowUGKqcj7YqINGC+uj 8HTwVpyNStWp08+y3E2ISQEhbnaEsEDOOsMyJDIMovAiFVpgrUVzjTc6Fzff1xAo6P NsmhUz3gsA3y+FnV4UnLlGhUyOzmRgpnZtLqrP78J8DCfwokXMbOzvXajVyn/14NjF ExlFSy68rqNsm05R8bNTJfpJwPwchXZNvHkOxwVGR3TaweNxzlMfILcTC5tAnFHizm F2vIDbFxuDuPBfG0wHbwGaUjWnz6X/l+Se/Es9JGGP0GW3nCRoB7wv14Fm8VG2uM7B cSyLTYYRcdj4g== From: Mark Brown Date: Thu, 01 Aug 2024 13:06:58 +0100 Subject: [PATCH v10 31/40] kselftest/arm64: Add framework support for GCS to signal handling tests MIME-Version: 1.0 Message-Id: <20240801-arm64-gcs-v10-31-699e2bd2190b@kernel.org> References: <20240801-arm64-gcs-v10-0-699e2bd2190b@kernel.org> In-Reply-To: <20240801-arm64-gcs-v10-0-699e2bd2190b@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.15-dev-37811 X-Developer-Signature: v=1; a=openpgp-sha256; l=1664; i=broonie@kernel.org; h=from:subject:message-id; bh=sPSz542BQgC8GDr8WCulUI2iE6roG4Js5HwD3OcoqCo=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBmq4YehzAb9JAu3bcFU1tOhATrFl7Jobwqpz0k6Kx0 4Nt/ApiJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZquGHgAKCRAk1otyXVSH0HeQB/ 4r2nNmyla5byu5l9a+dzkSs2P7VDc57ojHjMgUHaxYSGDO5UZe7asC3ePZ0AjtK1zU/AepiUi5IEvT ZG3t5pco4RLuWa6DfFqJyzCiXyhzRq3ydh+yaptLtFfdBWMp0mMp+uXLHNRFjsu55OHXS6bt2eP3am ajrJDyiATeO/DeDHObUcHTJX+aFIk+V7urQv6jeJaZdyB0mL0wEFHuwQ0RA2No44U72IFcrjY5U+Wt bhYy+0SykeTjQc+Q7ob9QIwQqnnd9KxRv2qi482zdXbC1wc3F6P7b3PHZHGywBZdDNS2ptnfL22Ed+ wtDYRLVKGjK9pDzEgdKczzr6s1FElI X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-Stat-Signature: wixb9nncuobbgm4kfjz8ykt53k4ykana X-Rspamd-Queue-Id: 57CF0A0035 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1722517258-830160 X-HE-Meta: U2FsdGVkX1/M39aJTem493qiVrgRu8vL578zQ1Hz4KpUEU//lmHGUNExiPf7EeBaDQUtSFt1HZ7nqcsnRm6pvY558lCmACzFw5T8S9yDm+B+f/bsl7Iz84xNnWOB097/smkRw9Or0CgK+0xZ/AGhovXzsDMyQQlvVzV9+ZlwkPaitzgfLCjCjUj5XiEctwNzaCXbanmRYrriyP/B5q2XUEIyvfs5XrNe+u55tmf6t/qCh5bfDoQ22tXvFBefPWP2eee+EdAB21+hBnQ3N/CnsIeza8bk/IuDsj6tnP6538a3jTU3jHMJLrU+1YFmmGM9cGtQ1ii22b2sXjEORxwLq1vq6r2nhlxuUllXJCE3G74unrmrv3JM7Bef+8Cno9MWG9jo73wcsdpWBzrKJBXKrISIvydfiXQp8sibUGufOLgwvPMmm/70E5Nq6A7l9tMOC6wouIQG1glCD6b8mBtRDI2hrktKf1Mc5zyldXJxyrMZEmTuy3zTnik4ihjkN9uxSh8U0JosW4xy4Kmx/3VX5z+f5Dr4mUjFmgRaS+PEICZH+cG7P2IK6k95Oc+t7lnq7N2Rw1hboqwro9Dv5pOXUSKjkKHGLK2i6BrwXd1f09UlR3/sW+2NzhmGEk5Shq1Kgkkb5iVXH4+vTb+K6i0WQsfFZZMdyxmeqVB+56kAxs8M4jh9555oOCGKjAi4DXSkUEepBPYOwDpEIVa4u3rz6Df51cHRXIlyO5+4zodOjwSGv4qnnuZy2+SGWiY7+DlTpRNchrmvSKnk4d8Uqmavg3lkTRnyphWMMA98JpB7i8a1CvcYSLUj7h0GPQaEpbQhRSI7yQO+Xa6XI6SaF4BJfCbUqOmNOXnEyyxVb8TxHQhukLeM0SB7eN5kjpFKrOiiljUJ9DTOiiCSiSGKYkfSukoYc3pjF2Yi/Q2ezo2866N2DUov7m03VVraXBB2InIU9G2kqtJI0gu9pzN8jzs mrgpNWIy Y1DY8VTVb6sc2dtyaxOPQY20N1G3XMLgFEaV3fJdPVBBUuCxk5yGnFbU6zBgLMBevCOu2euLC3atV0Rf04M+y8XCceBm15t1O0F/bD1mAnZZGIRLIn5VqEUFoGHdMf789QCaSpb5z2YqOToLfDj4TixYrQs6EN1myMSMp9WZq99l5Le6pyM7g0NG6PI4Zn761kzy5rkGLcZQHkxCCyhMIyvIlo6K8HFg201y+WoFfaUqeSyu1nSG724MaDQbHC3WWFjcG5sYCK/F1rNu2geVvbZOLD58t94C3l/TmbHAehzMgXNWbr1mlKR181D8e+T8Wus0TY4fmXzQk52g9VP2rMkav8osYCy0z/XXZiZ4JP3SVDWNS+dhowrvILYbSCjDr+oGP 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