Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp642320pxk; Wed, 16 Sep 2020 13:05:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWgDKG65cqbbdM0zOYroTlWGB0P8VCAdcubp1d6yqwQP5otJB8yj9y8KjAo7XaacfbX7ea X-Received: by 2002:a17:906:3c01:: with SMTP id h1mr27959561ejg.111.1600286744410; Wed, 16 Sep 2020 13:05:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600286744; cv=none; d=google.com; s=arc-20160816; b=yzxTNY34zZdeyxt+SL84LIr3X5dvl+MkWjvM1fVh6/PlvmDFYwRbcHPzJsYgUcDECz wLghHRRxaq1biLmNCgL9Zkfu9aKNAhaDhEPbBq9Rljhsax3VvqSXAM+VO8UzqUcUsTIX HUq3pQUm47OZVAfaBbTw5TR4P9cYiyAs+7GhDQOwMwlXPE4o2r6qlyXRC22eLqFZ6hG4 MfLbph8wf7P2lR70IJhSTpnLIC9tNZYUkB9zZjaOE1+r1JYRuEe5IuXxnrD+edontQaf NU8kFhh8+fYWAOJb4ficMC1p9BGarHSqkMR38IWtkUvsT8nAbhzlwhbsDnJVLEjeL7Q+ 2t/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=ofrv28GDs221wMGJYBrfrRr58D+jjp/iLGRqSjoX1SU=; b=V417eJrjwOMIMkRw9SQ8j2f/08OavY3bNpiIgnNPbM5j1Or7fk0dGNJ+Q2eCMjOBEi +LgV7S+I72+xKydrBG7aYN4mfPXZJT8USQsmd9B/NClDBrpMRc1uyvN5ywGOpbW1dRyl nApcA9TpZVhSXOn707VUzJYoec5/xF95RvU4ROjHUqjH7nrV7yVAE6cCpEeJXR1EpWhS lPsxy3xTywU5vf9IhcfXEuGmS7Rnm6yR6a0xKPph8tGX+ajA/s/rG+IrDz1Fw0VlNS3G fJkwU3d3xhUhR802l+AhP+5CrvpBTqQFMzoKXILPS/khenSc2lUaSHwQ/agozAdtugLU QVLg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t10si12859357edw.38.2020.09.16.13.05.22; Wed, 16 Sep 2020 13:05:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728185AbgIPUAk (ORCPT + 99 others); Wed, 16 Sep 2020 16:00:40 -0400 Received: from foss.arm.com ([217.140.110.172]:34560 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726661AbgIPRfW (ORCPT ); Wed, 16 Sep 2020 13:35:22 -0400 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 Cc: Robin Murphy , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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