Message ID | 20220203143620.30629-6-joey.gouly@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C0FABC433F5 for <linux-arm-kernel@archiver.kernel.org>; Thu, 3 Feb 2022 14:41:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3mmGu9Sfo3CP+yl0JI3Mr8kFnZO2UXbqROZdDaXYY+o=; b=TaLLUXC44jg/0n sWZ8Kd/wyZuJafS13YjlPSu21fsuVmzI7RnZlwDGF+nBbWHlpejvfomCeY521vMlj8vQ6Y6yizh1s hBoE8KLIIKHIfQYuNGau7MIHElad0Ch5AwcznlJWqSKS2Tm8VX5Misa6BjJ5zR3TMQby0zQ4/GJ4n zjktn1OZov+cJWJm4nTFvR/8PoUJ8EA8LGLfMulIWgs9ByvG48/T5GWF/S07r+1FToVSHpoZdOrch 3yTiAOos9OSUmvZjEu6v0Ruc+T7pSNhdZAAMVr5RvGs3EsNujiHbP9Le/vQ1vN3JSFUGteENFT0uv l9p56VeNh8cyruG8DxwQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFdGm-001erE-Pa; Thu, 03 Feb 2022 14:39:36 +0000 Received: from mail-vi1eur05on2057.outbound.protection.outlook.com ([40.107.21.57] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFdEK-001dz7-N6 for linux-arm-kernel@lists.infradead.org; Thu, 03 Feb 2022 14:37:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+A+YaFUtTbKA4wC6CFhD5JfIeW6mEUyAs6nLmr98KvQ=; b=8tFu2gPuMknn2je0bA2BWc/cpQTPUnIkxyIKY+kw4lfP4vkSOh/sUl+BqtNba+o43DbgMPqnWOyC7tsFfe7Zf18qT6q4Osz5HJ35lKxZJDm6HUCY6dz619nD6Gh6PysXOr7SBt6C6ThKM13MQ65IjH3GCrNJFVSr9esgdnz1VnE= Received: from AM3PR07CA0092.eurprd07.prod.outlook.com (2603:10a6:207:6::26) by VI1PR08MB4079.eurprd08.prod.outlook.com (2603:10a6:803:e4::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.15; Thu, 3 Feb 2022 14:36:56 +0000 Received: from AM5EUR03FT009.eop-EUR03.prod.protection.outlook.com (2603:10a6:207:6:cafe::e7) by AM3PR07CA0092.outlook.office365.com (2603:10a6:207:6::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12 via Frontend Transport; Thu, 3 Feb 2022 14:36:56 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT009.mail.protection.outlook.com (10.152.16.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12 via Frontend Transport; Thu, 3 Feb 2022 14:36:56 +0000 Received: ("Tessian outbound 341d209a0e52:v113"); Thu, 03 Feb 2022 14:36:56 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 9ab38ae07b9cfccd X-CR-MTA-TID: 64aa7808 Received: from 308d2697568c.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 2679B3FB-F5CE-4775-9399-6399ACF3BD7A.1; Thu, 03 Feb 2022 14:36:46 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 308d2697568c.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 03 Feb 2022 14:36:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ffyonNuVz4MqmasS5O/SmnF+XXj4BTDJOrXXki9KGIFVo2VzfgOQPi7iee+TOKE2Z+zPGuU48Q4n4RyOL71uqFo171K//HipLyhZlr4B0hBMtbRmMM/QjSeFSlvzdBmQO7LpZTjWr11r/w7cXIQMO/I05iOhgn8U2RP3q3tOhevpxrJpEPrXu7Xqc+znbsZJZZsOdu7TBPWhJ4pnI5frL/tgNouKJR4UKqj57oku1YC5Q0r24w71SHl8FjF9uNYl+LR84SLe49GXGScLwsIAxRcVIXLz4Hi0QAaf5y0SG6zhN8pUeuQw68uHwRdiP97Q59JtsMBJ/iaBaAsCmbjJbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+A+YaFUtTbKA4wC6CFhD5JfIeW6mEUyAs6nLmr98KvQ=; b=Nub4V58QdTd4TQAla78zzf2cWTaNXV7EXo0aeDyaGB8/Af+NB/t4QffKkcOLDc+jx+EXv4gOSkvcRN6sBXBIepn61MIo0toJOZJ2YjBaLpAfgtGD3MdZGAEC6FxRbmWtq3ExIL3XM7txaXuo4Z1Y6vW9F6mkIzcz4l0NT/T80wwVm9eQjr3nrBfQ5mD398KwvNzlj2ENVydyWqDXeLdyzVshdgtN8Z8qvFhylvJakhnWvr571EfyPqVdEh15SnLKBpKNqyQGhC76zRFytu7Elz5KO2+szU9UIRK/Q9DodptAu8qewSLNypad05Dttkgb2z6ErydTOABY0glfu2iveg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+A+YaFUtTbKA4wC6CFhD5JfIeW6mEUyAs6nLmr98KvQ=; b=8tFu2gPuMknn2je0bA2BWc/cpQTPUnIkxyIKY+kw4lfP4vkSOh/sUl+BqtNba+o43DbgMPqnWOyC7tsFfe7Zf18qT6q4Osz5HJ35lKxZJDm6HUCY6dz619nD6Gh6PysXOr7SBt6C6ThKM13MQ65IjH3GCrNJFVSr9esgdnz1VnE= Received: from AM6PR08CA0005.eurprd08.prod.outlook.com (2603:10a6:20b:b2::17) by VI1PR08MB3375.eurprd08.prod.outlook.com (2603:10a6:803:87::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.20; Thu, 3 Feb 2022 14:36:33 +0000 Received: from AM5EUR03FT040.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:b2:cafe::22) by AM6PR08CA0005.outlook.office365.com (2603:10a6:20b:b2::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.15 via Frontend Transport; Thu, 3 Feb 2022 14:36:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT040.mail.protection.outlook.com (10.152.17.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4951.12 via Frontend Transport; Thu, 3 Feb 2022 14:36:33 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 3 Feb 2022 14:36:33 +0000 Received: from e124191.cambridge.arm.com (10.1.197.45) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2308.20 via Frontend Transport; Thu, 3 Feb 2022 14:36:33 +0000 From: Joey Gouly <joey.gouly@arm.com> To: <linux-arm-kernel@lists.infradead.org> CC: <nd@arm.com>, <broonie@kernel.org>, <catalin.marinas@arm.com>, <joey.gouly@arm.com>, <shuah@kernel.org>, <will@kernel.org> Subject: [PATCH v2 5/6] kselftest/arm64: mte: user_mem: add more test types Date: Thu, 3 Feb 2022 14:36:19 +0000 Message-ID: <20220203143620.30629-6-joey.gouly@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220203143620.30629-1-joey.gouly@arm.com> References: <20220203143620.30629-1-joey.gouly@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: 6d8bee01-b12a-4234-0fe5-08d9e722a0d2 X-MS-TrafficTypeDiagnostic: VI1PR08MB3375:EE_|AM5EUR03FT009:EE_|VI1PR08MB4079:EE_ X-Microsoft-Antispam-PRVS: <VI1PR08MB40799508CD6E80997099210094289@VI1PR08MB4079.eurprd08.prod.outlook.com> x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:1079;OLM:1079; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: +E4PPJ1Gexd/9aPVxEftTyV12IufxAwak1aEb2KUKTRjGUQZiL3PvZwx8PVeqGPxN+LfeytM5V70deOCibkR+PidNIv9Hg3HlEGx6f4DRPFxuSRKb9rkGyIrNjpRW+GmISlyHEntuNr5V4c6/rlP1+KIrlNqVEIa8jxWSsNzqZX4dsd//6O9TY1GL2uKVyQdvjl4rCdlpSO3gy1iFCsdmBXwZH8Dam1nitGdw2yvIA/NYm+liDWPjuMA8JgjxnBU0GpHyDIceoCRx14fj7rrvteacv2HeVIHHnB1lLR4CGNRVaaYqjCktYc+uF5KbAfE4/hXxnW8Vj6RwJayvymH2rkh6QH4tQRJZolfftLmEwQ1HjlnKVeVe8SA9Og+27XyZbeYaguWuqIfEfupHwASEx4GtFnAR1dbygTZ3JHcF1J6VEiYb+ZFr/5JuvL0XKG6N9m8jIdOXzeFnjC+LuNOUBuTnjzd4SlLjk2HiJS0BHfMQ329JGWyQX/WCPa78/3fW8ZD3ATSifgO4ncaaEj8DlpaduD03ve/y3xT0nwpuVGZw1RWvivTF+W5f/sbpHCx5f/tuEzrYHdHhMdulgExeC0hgaGyDcSyk2P1dJXtidQbhY0+If8z3ljQ1rG5SHzfDyKvVD7juLKGF8hD2uHAINB5oURTfn8U1jgQLV17R0gMRJHvl/kQxLO5rfwNz5nQOBeraxLN4GjHjDhoAN0wip6whRcbUPKl/Ot5Jost8Qh3To+K2yNocS2mibDsGdYo X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(40470700004)(46966006)(47076005)(83380400001)(36860700001)(2616005)(6916009)(36756003)(336012)(1076003)(186003)(26005)(426003)(508600001)(316002)(54906003)(8676002)(40460700003)(8936002)(5660300002)(4326008)(356005)(86362001)(7696005)(6666004)(82310400004)(70206006)(44832011)(70586007)(81166007)(2906002)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3375 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT009.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 17edb797-d850-4a59-6a04-08d9e7229348 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mkxxWHHIUirqZYUwZDpnP6BVxtx48bcpCRPUSdtAhbLa6U6eURHQZlstrMi480zUU5SZEoYBYqIrG05AjIdfdPduCdAv/+VTVmcQBjyS88VlckFOH2b0/OWXbA3PdZM1wso3PiziHyuHvK1h85vHUm5S81g+EGXahPztnBmZ4R7eW/l2+70BPgWLhHJ0CN2wcnrg6B2n4VHdiCUQFvdKNsA2LdpSUOH6Jgt17EBMUjaNschXPgKTCAvqPnNVjgbDAmegtU3VmWk7qqN9pRXPkyN6FtADCsK4sj/by391xGU2KkChiZUHfEbAKwih9Lr/r8DxYVZ/sBmcb95Gdm9rPFnyLw/hb9c1uyFBgUDgkr6rn2fHddlF3r+gIrDY9DHE9+v/mGlPhtZt4qaEEZdsI/kRzYKS94PXtKPEzVpfXwH3tihrhDUudubKi0Q2y/ABaCEFVsPu1mNjG6tweIQ0UYPLcGtG2qEdHUIAOPfUaZnZAXr0799xJ5jdnCoTjCTlj6+LmHW24fu6DVZeoinU6U92z3xL0JfI/fvqFdctwKD8443tgXRigN8IiOBYooqOBGXjG2Ue7GHFhJ0eYxWXsaD/3PrmgptPtUyIx6Z3FLpSNo2xkD4XXasR/ixL6IyRuxNwXxTod7RqTVz16XULj7U0ftb9xUdZjuGO9I1dMoM= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230001)(4636009)(40470700004)(36840700001)(46966006)(8676002)(82310400004)(54906003)(6916009)(8936002)(6666004)(7696005)(508600001)(4326008)(40460700003)(86362001)(2616005)(70586007)(70206006)(107886003)(316002)(44832011)(36860700001)(426003)(83380400001)(81166007)(36756003)(336012)(47076005)(26005)(1076003)(186003)(5660300002)(2906002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Feb 2022 14:36:56.2092 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6d8bee01-b12a-4234-0fe5-08d9e722a0d2 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT009.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4079 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220203_063700_784544_BC5BD223 X-CRM114-Status: GOOD ( 10.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
add more tests to MTE kselftests
|
expand
|
On 2/3/22 7:36 AM, Joey Gouly wrote: > Add test support for write, readv, and writev. A bit more info. what this adds. > > Signed-off-by: Joey Gouly <joey.gouly@arm.com> > Cc: Catalin Marinas <catalin.marinas@arm.com> > Cc: Will Deacon <will@kernel.org> > Cc: Mark Brown <broonie@kernel.org> > Cc: Shuah Khan <shuah@kernel.org> > --- > .../selftests/arm64/mte/check_user_mem.c | 21 +++++++++++++++++++ > 1 file changed, 21 insertions(+) > The rest looks good With the above requested changes - Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> thanks, -- Shuah
diff --git a/tools/testing/selftests/arm64/mte/check_user_mem.c b/tools/testing/selftests/arm64/mte/check_user_mem.c index 6d4aeb14027b..c128bfa81502 100644 --- a/tools/testing/selftests/arm64/mte/check_user_mem.c +++ b/tools/testing/selftests/arm64/mte/check_user_mem.c @@ -11,6 +11,7 @@ #include <string.h> #include <ucontext.h> #include <unistd.h> +#include <sys/uio.h> #include <sys/mman.h> #include "kselftest.h" @@ -21,6 +22,9 @@ static size_t page_sz; enum test_type { READ_TEST, + WRITE_TEST, + READV_TEST, + WRITEV_TEST, LAST_TEST, }; @@ -85,6 +89,23 @@ static int check_usermem_access_fault(int mem_type, int mode, int mapping, case READ_TEST: syscall_len = read(fd, ptr + ptroff, size); break; + case WRITE_TEST: + syscall_len = write(fd, ptr + ptroff, size); + break; + case READV_TEST: { + struct iovec iov[1]; + iov[0].iov_base = ptr + ptroff; + iov[0].iov_len = size; + syscall_len = readv(fd, iov, 1); + break; + } + case WRITEV_TEST: { + struct iovec iov[1]; + iov[0].iov_base = ptr + ptroff; + iov[0].iov_len = size; + syscall_len = writev(fd, iov, 1); + break; + } case LAST_TEST: goto usermem_acc_err; }
Add test support for write, readv, and writev. Signed-off-by: Joey Gouly <joey.gouly@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Mark Brown <broonie@kernel.org> Cc: Shuah Khan <shuah@kernel.org> --- .../selftests/arm64/mte/check_user_mem.c | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+)