From patchwork Mon Jan 24 17:55:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 12722617 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04BB5C433FE for ; Mon, 24 Jan 2022 17:56:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244557AbiAXR43 (ORCPT ); Mon, 24 Jan 2022 12:56:29 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:47618 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235526AbiAXR40 (ORCPT ); Mon, 24 Jan 2022 12:56:26 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AAF8A6134F for ; Mon, 24 Jan 2022 17:56:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7439AC340EC; Mon, 24 Jan 2022 17:56:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643046985; bh=pQntHB6oEhL5YPB0I6MtdXcFJL95M2mYHCwTlgAkBsM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=liVefTSBIGk4mLL4G16I36m+SJV4/rxgVgklIeA6t7p7qa4Sn9QUsZGnukHeoeHHG vjQaNLpRhwGWqjRyQQJT+BVZG+PkaDxu5l8AC2QcIwz5cFWiTrHjvsNQb0kZmZGSHZ vpe8R1m/a5Igjc7ZX9bIitW9ltbNlSRqLmgHg/dj1+7AOtNL3qgr7Eh6saRUGvsRpY NPWFy8ipQj0E5R2wVAQ1aKptQQ3gASOaSHtHyP5cO+mI/fwLLLUsodYDCszO55uAxt UCRszVYkJQNJs1DcxxrtDYOFFXNQ6JsukED81/Rj82dQVMmax1t4KyuXfydQ+s5ayL 2MZLRh5rJam5w== From: Mark Brown To: Catalin Marinas , Will Deacon , Shuah Khan , Shuah Khan Cc: linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, Mark Brown Subject: [PATCH v1 1/2] kselftest/arm64: Skip VL_INHERIT tests for unsupported vector types Date: Mon, 24 Jan 2022 17:55:26 +0000 Message-Id: <20220124175527.3260234-2-broonie@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220124175527.3260234-1-broonie@kernel.org> References: <20220124175527.3260234-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1383; h=from:subject; bh=pQntHB6oEhL5YPB0I6MtdXcFJL95M2mYHCwTlgAkBsM=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBh7ugNWenywsGYZOEebcFxeTxwO6ygoCOXkNo8iaRF PpW+4LKJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYe7oDQAKCRAk1otyXVSH0PzgB/ 9mbw2VQ8tbh4B6YR+VLg15/gWqNx4t0Sheq4sSBx8TsBYO/TGkwuI0xzE/7dHGxuJw1xivpSXm+MGn jgd3v1MobnfDHPmdv8521ZLdXyuSI0SfJvwjSFqyw53Zt2fYpk8vtnUA0Fge7whamQSsyH9EuqF5u9 uW6FDcztJ9qzmFPWvtRfVD/suk52+Q9D33wQv2hDLuekV3500dWfnWRmKW6olAoW6eOxRr9S5HfYWG u9lci+pDzf+FHZGYFUYOhL5zI55NWhTNf533jmSpls/PTcOlMfppCk/ICRiGBzoFT8c+X1h8MzOUDl xJaYDINB0WpDPY92Aw2gLDKWdemXFu X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Currently we unconditionally test the ability to set the vector length inheritance flag via ptrace meaning that we generate false failures on systems that don't support SVE when we attempt to set the vector length there. Check the hwcap and mark the tests as skipped when it's not present. Fixes: 0ba1ce1e86052d ("selftests: arm64: Add coverage of ptrace flags for SVE VL inheritance") Signed-off-by: Mark Brown Reviewed-by: Shuah Khan --- tools/testing/selftests/arm64/fp/sve-ptrace.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/arm64/fp/sve-ptrace.c b/tools/testing/selftests/arm64/fp/sve-ptrace.c index af798b9d232c..0cf78360c5bc 100644 --- a/tools/testing/selftests/arm64/fp/sve-ptrace.c +++ b/tools/testing/selftests/arm64/fp/sve-ptrace.c @@ -557,7 +557,14 @@ static int do_parent(pid_t child) } /* prctl() flags */ - ptrace_set_get_inherit(child, &vec_types[i]); + if (getauxval(vec_types[i].hwcap_type) & vec_types[i].hwcap) { + ptrace_set_get_inherit(child, &vec_types[i]); + } else { + ksft_test_result_skip("%s SVE_PT_VL_INHERIT set\n", + vec_types[i].name); + ksft_test_result_skip("%s SVE_PT_VL_INHERIT cleared\n", + vec_types[i].name); + } /* Step through every possible VQ */ for (vq = SVE_VQ_MIN; vq <= SVE_VQ_MAX; vq++) { From patchwork Mon Jan 24 17:55:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 12722618 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2F2DC433F5 for ; Mon, 24 Jan 2022 17:56:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235526AbiAXR4a (ORCPT ); Mon, 24 Jan 2022 12:56:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244618AbiAXR42 (ORCPT ); Mon, 24 Jan 2022 12:56:28 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F38EC06173B for ; Mon, 24 Jan 2022 09:56:28 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C751A61342 for ; Mon, 24 Jan 2022 17:56:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8BA1EC340E8; Mon, 24 Jan 2022 17:56:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643046987; bh=A4dTcxdiMEpob7Qjo6ALcqtb9i+y7Qv74WWLMA3iZLU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l5nCZE08xeto5ZmnoZ/9pryHAT0mJVqZqBLoDZGibJpBEdcjmsvp/uTdpYxkKWCfT RNh4FQeph+JiGr9hH+GtiCmBIuS1LUIeondAXk7gTI0HStxmBoEYupJPxIM+IxYIbn YE7Z0DOHoTG4VkqvaU12zL/UOTbqPunHP7kV6jrpXSX+Hc+f3bH3pAwM3w5PkZWvgW jg89CgjiX4uqdntTitbJWoyvCJbOqJlSTer7Kqyc7UVP8Miz4wQW6od1XUDRuIyBmk aE0yAwkVJa+Kd/66ejMpEDxPCKqvYLl1HNeVuzSRRMFjl2SwYmirRzyL6+gxx7AX1U t6bgPpOiS5yZg== From: Mark Brown To: Catalin Marinas , Will Deacon , Shuah Khan , Shuah Khan Cc: linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, Mark Brown Subject: [PATCH v1 2/2] kselftest/arm64: Correct logging of FPSIMD register read via ptrace Date: Mon, 24 Jan 2022 17:55:27 +0000 Message-Id: <20220124175527.3260234-3-broonie@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220124175527.3260234-1-broonie@kernel.org> References: <20220124175527.3260234-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=942; h=from:subject; bh=A4dTcxdiMEpob7Qjo6ALcqtb9i+y7Qv74WWLMA3iZLU=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBh7ugOqKrONxgzpSuS/PO069iwpnfj7MvwdzEI5KK6 bYAYF/+JATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYe7oDgAKCRAk1otyXVSH0MRJB/ 9kgYGlNtHXmC6I+1cmXJSZs0opRewqELV7HzZBaE1QeWK9TkFL17BeDxPU7ZdBf6gsrYt3Q1yAkmxA L3wTeKAE6CJ4EegrxvUnQoJO7vvcEGpOP6wOdvRo6U2tG93t1Rd0lfMhaZc7EKnFfMIDmlf96nCkjx OyTaz0Jmtb3ER+4GxBSrdTjeOkX0UxXx9Gb8lFXW9OuOFFxku+v4L0ti4H9VRYfGM5zUPflB76DuaX N6DaI4/f/1uvoPt5zINz2W1lAASia3P0I2SZwg5Olw5S/kP7f0wbXS8UC7eb47CdChr3jvQhbeOSiL gL6LwT3u1hePySGM+5/qBNdwy1jDZP X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org There's a cut'n'paste error in the logging for our test for reading register state back via ptrace, correctly say that we did a read instead of a write. Signed-off-by: Mark Brown Reviewed-by: Shuah Khan --- tools/testing/selftests/arm64/fp/sve-ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/arm64/fp/sve-ptrace.c b/tools/testing/selftests/arm64/fp/sve-ptrace.c index 0cf78360c5bc..a3c1e67441f9 100644 --- a/tools/testing/selftests/arm64/fp/sve-ptrace.c +++ b/tools/testing/selftests/arm64/fp/sve-ptrace.c @@ -261,7 +261,7 @@ static void ptrace_sve_fpsimd(pid_t child, const struct vec_type *type) } ksft_test_result((sve->flags & SVE_PT_REGS_MASK) == SVE_PT_REGS_FPSIMD, - "Set FPSIMD registers via %s\n", type->name); + "Got FPSIMD registers via %s\n", type->name); if ((sve->flags & SVE_PT_REGS_MASK) != SVE_PT_REGS_FPSIMD) goto out;