Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1910CC43461 for ; Wed, 16 Sep 2020 10:48:14 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7E5BF20738 for ; Wed, 16 Sep 2020 10:48:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="z4ZHZFH5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7E5BF20738 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=NOKvBHLJaXHjT/ZMaLjWyy6+SMdU3bAmy2TyRsJhF0A=; b=z4ZHZFH5AsxofnSvWz5V8cbmpk yIN/SeJB6BgfEU2ApiiJCntim9BL4WQOMilcdH1sDMH1HxqugptnMQP7rpFGef0hGoIdfw0R20CJ7 8wHL8xmos2DLRdm2TKt7po2nNHRcNsUs6wcy7BHT0kcLq7raKWLMoESXf9WpWTjtM6efRywcI9oig ZUEWJsufpY2jnAdBR5CQazEsJM9WV8tryvTPHFrIDBLFe913J0kRGgaqFudMrHkEvKbDnFNQQgpNb ObgKYkmNXH4+JELxG2GPXIk417hKd7aMv1NaF4r+xpgIrv7IpSxCOm4gHUTAxyOUfv/LeSN2hBSWo Wt+4QvaA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIUxd-0000TG-Bd; Wed, 16 Sep 2020 10:46:49 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIUxa-0000SB-Ke for linux-arm-kernel@lists.infradead.org; Wed, 16 Sep 2020 10:46:47 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9208C1045; Wed, 16 Sep 2020 03:46:42 -0700 (PDT) Received: from seattle-bionic.arm.com.Home (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9D5033F68F; Wed, 16 Sep 2020 03:46:41 -0700 (PDT) From: Oliver Swede To: Catalin Marinas , Will Deacon Subject: [PATCH 0/1] Add usercopy fixup accuracy tests Date: Wed, 16 Sep 2020 10:46:35 +0000 Message-Id: <20200916104636.19172-1-oli.swede@arm.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200916_064646_727812_91EE3A99 X-CRM114-Status: GOOD ( 14.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Robin Murphy , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This adds a selftest subtarget that can be used to verify the accuracy of the usercopy fixup routines. The patch contains a test module that integrates with the selftest framework and can be specified as a subtarget for the arm64 selftest target. It can be invoked through the same method as the other subtargets, provided that test_usercopy_fixup is installed prior to the run. This enables debugging of modifications made to the usercopy fixup routines, and/or provides a method of verification across system configurations. Comments are welcome regarding the suitability of this location for these tests, and any other suggestions would also be greatly appreciated. This was used in conjunction with lib/test_user_copy.c to help verify the following usercopy fixup patches: https://lore.kernel.org/lkml/20200914150958.2200-1-oli.swede@arm.com/ Thanks in advance, Oli Oliver Swede (1): kselftest: arm64: Add usercopy fixup accuracy tests arch/arm64/Kconfig.debug | 7 + arch/arm64/lib/Makefile | 2 + arch/arm64/lib/test_usercopy_fixup.c | 276 ++++++++++++++++++ tools/testing/selftests/arm64/Makefile | 2 +- tools/testing/selftests/arm64/README | 2 +- .../testing/selftests/arm64/usercopy/Makefile | 3 + tools/testing/selftests/arm64/usercopy/config | 1 + .../arm64/usercopy/run_fixup_tests.sh | 4 + 8 files changed, 295 insertions(+), 2 deletions(-) create mode 100644 arch/arm64/lib/test_usercopy_fixup.c create mode 100644 tools/testing/selftests/arm64/usercopy/Makefile create mode 100644 tools/testing/selftests/arm64/usercopy/config create mode 100755 tools/testing/selftests/arm64/usercopy/run_fixup_tests.sh -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel