From patchwork Sat Feb 3 12:25:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13544155 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 98EB0C4828D for ; Sat, 3 Feb 2024 12:33:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 301436B00BB; Sat, 3 Feb 2024 07:33:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2B10D6B00BD; Sat, 3 Feb 2024 07:33:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 179C36B00BE; Sat, 3 Feb 2024 07:33:00 -0500 (EST) 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 0557E6B00BB for ; Sat, 3 Feb 2024 07:33:00 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id C507C160989 for ; Sat, 3 Feb 2024 12:32:59 +0000 (UTC) X-FDA: 81750432078.26.DA45279 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf29.hostedemail.com (Postfix) with ESMTP id 1111B120014 for ; Sat, 3 Feb 2024 12:32:57 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=HGYfE4kQ; spf=pass (imf29.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=1706963578; 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=dq+jcN5GMg5Lle2kiMLPNS24YEsjylZTVcQUjBnRNs0=; b=5DzIV5kEzDdWtEm3hWubpp3Ny3ve4t+NXdx0wjvAgxjQnBoXgWcmuTGXTHh2qygujQVKLS kncl6axCLKHwjpsZGnXSbWNTN9VnXWkuYCY38u0YBtLXHAIvYx3ZXE6R8v+UgmdbJx04NP BneiPUDEs8zGgCaDw3Act+c+6UNWT7A= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706963578; a=rsa-sha256; cv=none; b=WxgJuyCCQ1o235K79xXA4uAGSodkONkPs0CEw6S3391QMQH1gpxJIHN1vBoS1eP+zSLPsD 7PLljSBN8FhUrTH9KklO39bCtEac4lHpwYpyjj00ttrl8dQSK25DyzDdpTMUewejE8iSM2 4jTUDIHJDNk/dhWh0HKgM4+cM/m0xqE= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=HGYfE4kQ; spf=pass (imf29.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 3067A60A0B; Sat, 3 Feb 2024 12:32:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 898ABC433F1; Sat, 3 Feb 2024 12:32:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706963576; bh=DtrqsekNxnVEUxJ8rAESK/JTguJ8OvysbbylOwjoIT0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=HGYfE4kQfFJTkP+Wqk8QZtSm5RueAXKxjESpueLeH7HPY7j4/myKGkfJ/UO+kZLh7 VmEtxEktqR5oV7tLUjrqVK0h58wp6sqQVThoC95tFeif4sRU53w7Ohn0PxU45EF1rp +aRmnGvth+vUGx1hOYgwjOnEb39QVh52CSZcozaGFHhiNcmycgW7u+/U6KxX4vqJti ioyuktkoRfEolu6A2hd4MrU/LlzrhXmXnT1Jd4pNNHPm9NtjDWKpJ9I1n0MW5Cw1XY C485bROd/xTJIrAV+3TsH1rv+AIz9rhWjehFzpLEgi5GutqJI/ZaSELkEuAzvECzPM EbRR3wYBa1LpA== From: Mark Brown Date: Sat, 03 Feb 2024 12:25:55 +0000 Subject: [PATCH v8 29/38] kselftest/arm64: Add framework support for GCS to signal handling tests MIME-Version: 1.0 Message-Id: <20240203-arm64-gcs-v8-29-c9fec77673ef@kernel.org> References: <20240203-arm64-gcs-v8-0-c9fec77673ef@kernel.org> In-Reply-To: <20240203-arm64-gcs-v8-0-c9fec77673ef@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 , Kees Cook , Shuah Khan , "Rick P. Edgecombe" , Deepak Gupta , Ard Biesheuvel , Szabolcs Nagy Cc: "H.J. Lu" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Florian Weimer , Christian Brauner , Thiago Jung Bauermann , 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.13-dev-a684c X-Developer-Signature: v=1; a=openpgp-sha256; l=1590; i=broonie@kernel.org; h=from:subject:message-id; bh=DtrqsekNxnVEUxJ8rAESK/JTguJ8OvysbbylOwjoIT0=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBlvjDnOVaHEEY7+NXAHmCg/VtR09vNp/bX1TdG9fwL Tx65GRaJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZb4w5wAKCRAk1otyXVSH0FlKB/ 98DOBU/u0IXok/Y7pavvt27Ga+5AFK+X7M4Gm1LULE6Yd0z4a1VMfHZnEMGqp8Pzn3n8zAItI7CBIP ewOFrR5SPZbvYqb8s0OQxWwzHGWkqrz+6XiZAtdY1z+ijSFOEm2fJ3Qrb3QMaqlI3yUst/QDAfSR8W 4vPxCYl/hSoqqlWbEXPMcR9P80SnN/grc5/vx0SerNYmyYKrOvJ26hngl6HIpgBJ1LiC7s3vEzfRCj Yq/guQu9c0fDL3JCGOxha0pESNb+rwBL6mpBWC6gthrLRNSAOcdlT6PjxpgYvzWVjA/K+P5tT/mM1k VATLPwnO13OC+VbJeZiCnFuMPgU0Zy X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-Stat-Signature: sj8ek5hikhreb5w7nra81hg9ccdxao61 X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 1111B120014 X-Rspam-User: X-HE-Tag: 1706963577-195088 X-HE-Meta: U2FsdGVkX1+LeqEJVLfmmHxJ538sR1n5wATmKc+nkI1dKD+vEbMdEsznUBKYtR2+TKOmkkAKsombTesVuOY53oJ8QFP18lJXu/x+EHfZuzkUDaORJW8U0i3aSxPkKNyvEPQWO+zts8dRRsnS89OraGbosoQKJP7w0rSmRkBqDCtfsLGfLQ5aTkLK/Hzt89ph6eKej9aOmY1MZuKOnyZ/veaItaUpl+2M7kFWXIgYjFuzKqUdrkfahaKBzEVbPQNGfFlLjHuGWmzD2YY3P/0r22tMxAsCkJc1WTObtK1D3kg3A2hRioN8r5KLxFWZTtBLOVc4d+bFZJVfTj7/g+OBJJTWnf2zLruSey1GdxaVOIsbwrlBZ0jkQv62GdfjUO0XTj0nqVcd28SFWcq+VVDzG8khHdFf+SjWVAA2z9/c0w3DV/g0BQKkEBwRQJ5/WUSqVE7iK3B6RX5B0MZRKbjWAZQ7/uKyEQtrTSeX/RkL4adHt39Vr7Abd2YYmoYT5cPwqp0b8GDplr5kTPwHwUPxnX7xqx0YEvBPJXohiJqDAgzm2gSHfatzbaMQZ2uvP52IaBuJFLl7s7ZtmfYX6zD46WU0wCfrvzMCEf25rLt4Yk+h7beq007W1InffzWZQGJwloHgmZbFPwMh9tbvG3dVDjcqoTWTN7sYbKHPuG7cMdETEC3ENWiP/QfAGxdAfXkWD1xfdPKYpNBN8ULRxAsoQl+fHdbjF2d4mPWBSOz3tSWBRRVC9hv7fnKDW01rJifVNhOHpWmhdp5rZqIarf264n76bl/d2dxv/Vk+v6e1auFVpn3qbTDAV91GWjH5a03o9RBRJ8HgDNFLEr0lCOsGAO+EhO0mXNPNFztixJPZGCnGpV4xl/AlHINiGzOdQqAbpAZiYmgeVynq1XSe+7Zf22c/QmGxUG+FeefDV4i27d/VwFJ/ZLMBbUXOrmMyinhEs6ojDfdyGZTe1JkrHg3 FHrBfLwT /GhpYkUkN3ISQ6zKuwkflE3P7MHZAk46Q8nQMqDXpY9+aj7NX6BSe+VjsuITDsTYFXGgSpUj+y9yoqIlfqkooKdk9MKsXZhetPtR2Ekjd4YLJVN2J6CMc2jSb5xqdijyO0KsM5EvV6tuGmedrN6uHAkuGRuIE4sfuOqMrlfn4DQGvmI1luNGhKM6begd401XYOdkL113mbHk67d7xckAyirINxKFTuQzuGpfnefdeqqu2axL9l+O6vyP1cIhZl35sjzc4pB3J6sMPrkqYPeB4l2J24G7pxpC4ERHy1y1KvXTIvltCxfuhiM8mY2K8rd8MCSLl 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. 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 9f580b55b388..1cd124732be4 100644 --- a/tools/testing/selftests/arm64/signal/testcases/testcases.c +++ b/tools/testing/selftests/arm64/signal/testcases/testcases.c @@ -209,6 +209,13 @@ bool validate_reserved(ucontext_t *uc, size_t resv_sz, char **err) zt = (struct zt_context *)head; new_flags |= ZT_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 a08ab0d6207a..9b2599745c29 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 GCS_CTX (1 << 5) #define KSFT_BAD_MAGIC 0xdeadbeef