From patchwork Wed Feb 9 15:22:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 12740382 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 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 E1A1FC433EF for ; Wed, 9 Feb 2022 15:25:48 +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=amtYIRYt2AYtJn89b6encyqVRSwn3WMu4K5H7xbFqnQ=; b=jYMxonHz9OBxoc le3sDC9Y4RNFnASq8flrBDeZeFxr6CVFKLDfvFVznt1puGetK7txrRewl4ccGldnxmRziitoyH0bI RM13ycVagvEKjIS/Iie5JighGyhtkArDuAPu/+Jz8q+c15C7ettf9+qiiPd7gpvp1NCTeaiwfIxpN oaIKfkXFGSp5OxxjzNGNl4XbZGgNLXsPe7lyaFCC6AdaXPQfFhapC4jka74+AjaQqoi8jmyf+tglg 5foSnyiXXhVrGmMoSIR6zNdNMYFa0ofALSMPXVGN1CQBhxqupSGpziONar8/ivBmvImVUI77UuInl t1ZyT320cz/VqYKxi68A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHooy-000YOn-8T; Wed, 09 Feb 2022 15:23:52 +0000 Received: from mail-db3eur04on060c.outbound.protection.outlook.com ([2a01:111:f400:fe0c::60c] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHooH-000YBZ-Ni for linux-arm-kernel@lists.infradead.org; Wed, 09 Feb 2022 15:23:14 +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=+rFtWJxLVhYuLjiP61fT9Jzk8/FSoAfCPlO+An3ySwc=; b=vnujyJ6NJQ5Qi3moFlGJhZ84M4+kihDSDQW9zihgGWEj3EJr6E8c+246KGKg7mhAEmYdFycDANHlcwhbTh9whdWRJe6RnvUIdzB6cqB+9wOfO+eY51JKl+X8zIHADqqcWHtLMjus04h6nGCyGrhZYgJdUSMyTjZHH13rGewz8Wg= Received: from DU2PR04CA0283.eurprd04.prod.outlook.com (2603:10a6:10:28c::18) by AS8PR08MB7321.eurprd08.prod.outlook.com (2603:10a6:20b:440::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Wed, 9 Feb 2022 15:22:59 +0000 Received: from DB5EUR03FT053.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:28c:cafe::25) by DU2PR04CA0283.outlook.office365.com (2603:10a6:10:28c::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11 via Frontend Transport; Wed, 9 Feb 2022 15:22:59 +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 DB5EUR03FT053.mail.protection.outlook.com (10.152.21.119) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12 via Frontend Transport; Wed, 9 Feb 2022 15:22:59 +0000 Received: ("Tessian outbound 63bb5eb69ee8:v113"); Wed, 09 Feb 2022 15:22:59 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 7e58cded069838b5 X-CR-MTA-TID: 64aa7808 Received: from 7e25753eca15.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 5769496F-6A58-4D61-87E7-9BDDC57C399A.1; Wed, 09 Feb 2022 15:22:53 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 7e25753eca15.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 09 Feb 2022 15:22:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YJhX0R608cIjVEXRGVgRQfciptyOmVAtvffvu5Ls5qc7/+KmCFFqqyG3IZIp0Dp+F6YAWZLeXLTRraO5FaryDFNjZpj6ZN2fGcqzlZxe5Yn3FXBzn9yFTQ9JUqsYRFfw50qHoHl4bd9Z9+Tdqr4RYN5zogvOufqMXaf7kudgo0Jys3ysPupktv7E6QGPBxwCOiEwq987hvl/GY3onfhZByiqaOXnM7lHtK9Y7uN5N4WONW9f/8dM7TF5BEetLW4AtxqeGFhe9OMRMhJi5+pRyLdRgcAPCQwQVQnXrdZSJ4vjwwPl5MXsUwDxTHuinE2xj20i2I6G1BT4C/Fycwkw8g== 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=+rFtWJxLVhYuLjiP61fT9Jzk8/FSoAfCPlO+An3ySwc=; b=bfEisWYGFCGIMeqBiXlUKIBUj+D28smsy3Cbb2bf68QYGzKLNwpwdpJ+Cc+spiRrqbwfnqATCi35TTolG3qPb5pSqczqbIvg1UOFjKXLUGrp8XA33aa858X/0AbSM9LE09dkDlOj7B1bEoI9jLTbk/0cqSJxmrdUB3Ha2ysQ/whWlzG/pCWTIRWeb7BeynWtuxKoKvpVbchK4v8ffc3vvk1SomLa7sz4hMvb1o8/HytELQ5jg3KJbNSyg9/RGUh8d+tfRC705D0pL/I9+9EnAg35kBzBuLVr5xpoyzoWl5LkSygJR38fYGK9EkEoQXr1EB61qr1Oe+f3+Yn0JwPUXw== 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=+rFtWJxLVhYuLjiP61fT9Jzk8/FSoAfCPlO+An3ySwc=; b=vnujyJ6NJQ5Qi3moFlGJhZ84M4+kihDSDQW9zihgGWEj3EJr6E8c+246KGKg7mhAEmYdFycDANHlcwhbTh9whdWRJe6RnvUIdzB6cqB+9wOfO+eY51JKl+X8zIHADqqcWHtLMjus04h6nGCyGrhZYgJdUSMyTjZHH13rGewz8Wg= Received: from AS9PR05CA0045.eurprd05.prod.outlook.com (2603:10a6:20b:489::11) by PR3PR08MB5609.eurprd08.prod.outlook.com (2603:10a6:102:81::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.17; Wed, 9 Feb 2022 15:22:51 +0000 Received: from AM5EUR03FT014.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:489:cafe::65) by AS9PR05CA0045.outlook.office365.com (2603:10a6:20b:489::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11 via Frontend Transport; Wed, 9 Feb 2022 15:22:51 +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 AM5EUR03FT014.mail.protection.outlook.com (10.152.16.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4951.12 via Frontend Transport; Wed, 9 Feb 2022 15:22:50 +0000 Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2308.20; Wed, 9 Feb 2022 15:22:51 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.20; Wed, 9 Feb 2022 15:22:46 +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; Wed, 9 Feb 2022 15:22:51 +0000 From: Joey Gouly To: CC: , , , , , , , Subject: [PATCH v3 6/6] kselftest/arm64: mte: user_mem: test a wider range of values Date: Wed, 9 Feb 2022 15:22:40 +0000 Message-ID: <20220209152240.52788-7-joey.gouly@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220209152240.52788-1-joey.gouly@arm.com> References: <20220209152240.52788-1-joey.gouly@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: 586a087a-5ab1-4175-65e6-08d9ebe00e11 X-MS-TrafficTypeDiagnostic: PR3PR08MB5609:EE_|DB5EUR03FT053:EE_|AS8PR08MB7321:EE_ X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:989;OLM:989; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: FKd1cpuMxDz4udbUMdzQYeZYFfpAun7ycxLdWXBUSiHLDw62nJ1eGuPZNB4i2Zb/xRXoCeRs5ayNmywMtRcrDQpZmQ9EcWcR+u6B2NXJ5IyFDvKeoy5PxSDLBJ+qVdDdzx6SK4OedJawzp/AshHERq2aNSaqN5Ml4nu2KHIiSm/1aNl/tuz9bahwzqjVPtYhrYchU4ZxRIt5L+wxEBXkBLUu6NS0UmVojtwfzODF6n4MVyPyPJWT6eYyBGpdhYXfi7WPjZhGMMEouvC2QGHc0uEP/G8/fxf2rQCBn0DxWv5O9b/rvc+VybJgTqoF0ia0pSBLmiWv1eW/BcAVWfrL9R/hMLDUptjxcOzjRQL1OKZMNskyUUedBLRfFaU18TVfIAmgMxceNyiYxjPJsR2Y2mKXjsXhzca/zNlretP9cWxnQz7AvkanzJ/cjQ90Oc0R1WcRIhvC7eqXRiFw3Ybu7W860aAgx6/Bn3tY4yK4IpNHIbvwt+1HGLZKe33xC9Jw0LFxGlkYeXwZaAi4JZZW1WtgmQnecZslCXqIm7HL0k4AtgkEUncYhU+TE4Soh2wC0VkB7oDItN6kiUX+fx/v0CNozv5wxA7eVwHfEgHLHoTOepyhmIXNdNUMYJRAd6rffu9AEyfFOHUjN+DBQj+q6RBVbHFBbAv0EC3vFvwfy0H9xklcD1Rly28EQLWm1dRgfwj5wDOOtP1NCNFEbiyD7Q== 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)(46966006)(40470700004)(36840700001)(47076005)(5660300002)(4326008)(44832011)(508600001)(2616005)(356005)(81166007)(1076003)(26005)(8676002)(8936002)(54906003)(40460700003)(70206006)(70586007)(36756003)(2906002)(7696005)(6666004)(36860700001)(82310400004)(6916009)(316002)(186003)(83380400001)(86362001)(336012)(426003)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5609 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT053.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: f3b3c1a2-c09d-49ae-2df6-08d9ebe00913 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CnimKlltxhEgvPa/gFqlrftJktI3pWujyRHOIVYCf/cVONKnCCeiF1chJ4kthPoV8Tj8KKwH4+HG8eiUSCfAuX1WTrwp4hMdJMlsLDVFIoWQ0GcnAwJRe7OmiBmiBNbYt4IJVBTzDkTXskXPBtwpHO3Q6DENNJQJkiI9e0kIIr2zRtjOK0y5AqlY8n05eeViPX+YzORRS4FLBfIOeEMNtZ16VAvZqijFZRoolPrVEb7apfukpR4PoRadB2gBrhNtOzYKBNV7nncLvrBGBOL324uFKvJX0oqoMs+URqluXB+MYUkuqXcKFJJisLBt18AXlz5PRbhDA81+Bz969WSc0npaMnmOCLWn9rReOpE757agzCWfgbJDAYrqWQfeE+YL+FIIN/a5hm918orO3raFc6/1Ocs7BDhwxie3zJb9udayTxX3ntFWbVECga1ep8GG0PWSyvNA8TRhezTzyqyoKwe+sB1EFraEWGIJQKWEr3zO6q1rrJnXp2wAlydaNrwGk3h8KpGyl29qI2HXe/Z4/8GgLTauA1fnFiBmm5H2NvPGa8nS8EzVmo9dpgiBbWymkb3AZNMhWH9bkkUdRJ9HckReUIR2gT1pDpLFzmpgB+1PokYB35nGrvvfFih/FG4k7Gw0cQOXZbfYXqcGZPBrExFZUNV7vmU5EzeaRZ+E5tLtsE4v+g9Ath0KlACvG6vW 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)(36840700001)(46966006)(40470700004)(186003)(26005)(508600001)(2616005)(1076003)(82310400004)(107886003)(336012)(7696005)(86362001)(6666004)(36860700001)(426003)(40460700003)(83380400001)(70586007)(47076005)(81166007)(4326008)(70206006)(8676002)(316002)(6916009)(54906003)(44832011)(36756003)(2906002)(5660300002)(8936002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2022 15:22:59.0783 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 586a087a-5ab1-4175-65e6-08d9ebe00e11 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: DB5EUR03FT053.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB7321 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220209_072309_994143_B95567DC X-CRM114-Status: GOOD ( 14.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Instead of hard coding a small amount of tests, generate a wider range of tests to try catch any corner cases that could show up. These new tests test different MTE tag lengths and offsets, which previously would have caused infinite loops in the kernel. This was fixed by 295cf156231c ("arm64: Avoid premature usercopy failure"), so these are regressions tests for that corner case. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Brown Cc: Shuah Khan Reviewed-by: Mark Brown Tested-by: Mark Brown Reviewed-by: Shuah Khan Reviewed-by: Catalin Marinas --- .../selftests/arm64/mte/check_user_mem.c | 94 ++++++++++++++++--- 1 file changed, 83 insertions(+), 11 deletions(-) diff --git a/tools/testing/selftests/arm64/mte/check_user_mem.c b/tools/testing/selftests/arm64/mte/check_user_mem.c index bb4974c437f8..f4ae5f87a3b7 100644 --- a/tools/testing/selftests/arm64/mte/check_user_mem.c +++ b/tools/testing/selftests/arm64/mte/check_user_mem.c @@ -3,6 +3,7 @@ #define _GNU_SOURCE +#include #include #include #include @@ -20,6 +21,8 @@ static size_t page_sz; +#define TEST_NAME_MAX 100 + enum test_type { READ_TEST, WRITE_TEST, @@ -136,9 +139,67 @@ static int check_usermem_access_fault(int mem_type, int mode, int mapping, return err; } +void format_test_name(char* name, int name_len, int type, int sync, int map, int len, int offset) { + const char* test_type; + const char* mte_type; + const char* map_type; + + switch (type) { + case READ_TEST: + test_type = "read"; + break; + case WRITE_TEST: + test_type = "write"; + break; + case READV_TEST: + test_type = "readv"; + break; + case WRITEV_TEST: + test_type = "writev"; + break; + default: + assert(0); + break; + } + + switch (sync) { + case MTE_SYNC_ERR: + mte_type = "MTE_SYNC_ERR"; + break; + case MTE_ASYNC_ERR: + mte_type = "MTE_ASYNC_ERR"; + break; + default: + assert(0); + break; + } + + switch (map) { + case MAP_SHARED: + map_type = "MAP_SHARED"; + break; + case MAP_PRIVATE: + map_type = "MAP_PRIVATE"; + break; + default: + assert(0); + break; + } + + snprintf(name, name_len, + "test type: %s, %s, %s, tag len: %d, tag offset: %d\n", + test_type, mte_type, map_type, len, offset); +} + int main(int argc, char *argv[]) { int err; + int t, s, m, l, o; + int mte_sync[] = {MTE_SYNC_ERR, MTE_ASYNC_ERR}; + int maps[] = {MAP_SHARED, MAP_PRIVATE}; + int tag_lens[] = {0, MT_GRANULE_SIZE}; + int tag_offsets[] = {page_sz, MT_GRANULE_SIZE}; + char test_name[TEST_NAME_MAX]; page_sz = getpagesize(); if (!page_sz) { @@ -153,17 +214,28 @@ int main(int argc, char *argv[]) mte_register_signal(SIGSEGV, mte_default_handler); /* Set test plan */ - ksft_set_plan(4); - - evaluate_test(check_usermem_access_fault(USE_MMAP, MTE_SYNC_ERR, MAP_PRIVATE, page_sz, 0, READ_TEST), - "Check memory access from kernel in sync mode, private mapping and mmap memory\n"); - evaluate_test(check_usermem_access_fault(USE_MMAP, MTE_SYNC_ERR, MAP_SHARED, page_sz, 0, READ_TEST), - "Check memory access from kernel in sync mode, shared mapping and mmap memory\n"); - - evaluate_test(check_usermem_access_fault(USE_MMAP, MTE_ASYNC_ERR, MAP_PRIVATE, page_sz, 0, READ_TEST), - "Check memory access from kernel in async mode, private mapping and mmap memory\n"); - evaluate_test(check_usermem_access_fault(USE_MMAP, MTE_ASYNC_ERR, MAP_SHARED, page_sz, 0, READ_TEST), - "Check memory access from kernel in async mode, shared mapping and mmap memory\n"); + ksft_set_plan(64); + + for (t = 0; t < LAST_TEST; t++) { + for (s = 0; s < ARRAY_SIZE(mte_sync); s++) { + for (m = 0; m < ARRAY_SIZE(maps); m++) { + for (l = 0; l < ARRAY_SIZE(tag_lens); l++) { + for (o = 0; o < ARRAY_SIZE(tag_offsets); o++) { + int sync = mte_sync[s]; + int map = maps[m]; + int offset = tag_offsets[o]; + int tag_len = tag_lens[l]; + int res = check_usermem_access_fault(USE_MMAP, sync, + map, offset, + tag_len, t); + format_test_name(test_name, TEST_NAME_MAX, + t, sync, map, tag_len, offset); + evaluate_test(res, test_name); + } + } + } + } + } mte_restore_setup(); ksft_print_cnts();