From patchwork Tue Jan 25 15:09:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 12723943 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 C4893C433EF for ; Tue, 25 Jan 2022 15:17:45 +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: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:In-Reply-To:References: List-Owner; bh=JUxxif6H98U4dGaMvtG/om4EVSWSP/3Qc7qUFVprcDY=; b=iWe4IspyuWuy2f ngvqldERKRr+hZatlzLQ1hXq6FuPAoVJ+6PInDLLOBZ1v94fG3ZUI6tEgtaCNFbwpKcbjzUsWUmpM CUQw2wvKscRB/b86QlH5GfX2JN64tb2ChY6JxziYyoMzHNrppp+5KhIItxOVhwmarxxBPXYrDFVdd A+JDKfUCyRK5hzyWxZJoFdlhfxE+mVOm2VJn4yJZyhc1NxoYwD/hrEha4sAoixhV43pGnguonaso7 cUJSWhjCtLOfSbgw1bJpIsmdCCvcUM09WjZEcSuTYGGoU1vpiV4W3XHC+Lvxp9fHVJo2WjMqE+laD U4bHcH75FLaMwS4kirWQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCNXF-008JzN-Fi; Tue, 25 Jan 2022 15:15:08 +0000 Received: from mail-eopbgr150084.outbound.protection.outlook.com ([40.107.15.84] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCNS4-008IDG-VD for linux-arm-kernel@lists.infradead.org; Tue, 25 Jan 2022 15:09:48 +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=L6kz0zHlt683PAAm1LfMSc45O3R1OQJysv5I0iPJMq0=; b=yLr0iVT+oTA3ePCOC/yZ0lnas6b91GvGG1PZf7gjFLDG41F0i6fTIdsDpLNu/XPLS1bx3XqVzlspDgjQPAOVs2mPag/Jid2xz83crB59GlPwgjmPFMwUsWl0ApyJlRGIc9MxoDWv17cKcVwxjhBQ7jbCD5IvPgACE8bd6LmUNhs= Received: from AS9PR04CA0073.eurprd04.prod.outlook.com (2603:10a6:20b:48b::27) by VI1PR08MB5502.eurprd08.prod.outlook.com (2603:10a6:803:12f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.7; Tue, 25 Jan 2022 15:09:39 +0000 Received: from AM5EUR03FT040.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:48b:cafe::2b) by AS9PR04CA0073.outlook.office365.com (2603:10a6:20b:48b::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.19 via Frontend Transport; Tue, 25 Jan 2022 15:09:39 +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 AM5EUR03FT040.mail.protection.outlook.com (10.152.17.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.7 via Frontend Transport; Tue, 25 Jan 2022 15:09:38 +0000 Received: ("Tessian outbound 341d209a0e52:v113"); Tue, 25 Jan 2022 15:09:38 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 8aa0cb90b5984665 X-CR-MTA-TID: 64aa7808 Received: from 023dcb3a3b19.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 991C718A-F780-4361-ABE3-230E1B36954A.1; Tue, 25 Jan 2022 15:09:32 +0000 Received: from EUR01-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 023dcb3a3b19.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 25 Jan 2022 15:09:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hxa6rl7jvWQqo2Dgmfsnaz0yxX0/LbrIxJ1CipbliqEnXR+g04+chD2noarTzLWG+b/hTKpV90Dk2lVTlrh6/9Q/Bak5hhFfCKGlklW0YBlJ3+9jk7tTmSq+XFMZbZ4j8rIRzoewA9nt87uv26Gt+BARdmbfdO40NJwLtH1ZBjbLSdsfHm6b1iJtli4MLuzUAzMOPUv8F3+mRonoBAoy4D3a1W9XmoXPscKJPSJbTrsGhWbPUJoxmXwXGpJr+6kDxeEoxMSs/EvzLbMwikhDRhRoudHnAx6sC2B73kR6h6B1jzKHaig3vLl6ch6mPL5fECb2nG1LWlHFJFQscLe6OQ== 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=L6kz0zHlt683PAAm1LfMSc45O3R1OQJysv5I0iPJMq0=; b=neAHW17DimKHsZF71kxBqhoYkK96E++UIywC3GLw4OmWD7EGJVUyY9wTAfTZN4Rc4/itXI75o2tTy18phdwx6Armf1Bh6AX0DbC1+PpoHB6GxypXh3bVspsskEF314d6VZBkPoS02Vi+aQB/0ibXWedcvMdkTI+grVGz8WsHbTpZyFuvaO7GMImYL36M6FUQJRaYadhCEKllcI675BQ5pvDxsdHTZluRU7mPXkNh7mFUUP5gH45m+/Q0PoveNV+Wfim3X7eIfvbTHFo9LV+XO5cpAUowghgW/9Zf6WcMaMxA5/NGcoGRDv+NWhpGIrsyW/c0lLW3fETlSFKO9v4VTQ== 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=L6kz0zHlt683PAAm1LfMSc45O3R1OQJysv5I0iPJMq0=; b=yLr0iVT+oTA3ePCOC/yZ0lnas6b91GvGG1PZf7gjFLDG41F0i6fTIdsDpLNu/XPLS1bx3XqVzlspDgjQPAOVs2mPag/Jid2xz83crB59GlPwgjmPFMwUsWl0ApyJlRGIc9MxoDWv17cKcVwxjhBQ7jbCD5IvPgACE8bd6LmUNhs= Received: from DB8PR06CA0055.eurprd06.prod.outlook.com (2603:10a6:10:120::29) by HE1PR0801MB1804.eurprd08.prod.outlook.com (2603:10a6:3:89::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.17; Tue, 25 Jan 2022 15:09:31 +0000 Received: from DB5EUR03FT033.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:120:cafe::c8) by DB8PR06CA0055.outlook.office365.com (2603:10a6:10:120::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.7 via Frontend Transport; Tue, 25 Jan 2022 15:09:31 +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 DB5EUR03FT033.mail.protection.outlook.com (10.152.20.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4909.7 via Frontend Transport; Tue, 25 Jan 2022 15:09:31 +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; Tue, 25 Jan 2022 15:09:26 +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; Tue, 25 Jan 2022 15:09:25 +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; Tue, 25 Jan 2022 15:09:25 +0000 From: Joey Gouly To: CC: , , , , Subject: [PATCH v1 0/7] add more tests to MTE kselftests Date: Tue, 25 Jan 2022 15:09:13 +0000 Message-ID: <20220125150920.23955-1-joey.gouly@arm.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: 1f44fbe3-4b4f-4043-9f49-08d9e014b500 X-MS-TrafficTypeDiagnostic: HE1PR0801MB1804:EE_|AM5EUR03FT040:EE_|VI1PR08MB5502:EE_ X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:7691;OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 1F+JtKCl1m67Ght145T/nK4IXRORxGsUea99wKDhc4CpiMU1Jn1SJJ5CVhD66rPrkdb7QqZ52HZT29TrDR4fw3xURtUNDtSGWai5WQ5LXKHcsEAGxywjpNbZAQZNxjaz7CcpSmpT2dWGZyNX34p4N4qZYZyuEBtw76vEYDMzUiadsR5qLOUACgeoj8GkSHbrEAa8NFMcnYreVNjrIQzEzxodpcH7B6EbwK6IkjN+eXe1eTJXwq0IIFfzAthIywN7VTyx61qH87nfMktdTCtF3IpZzgEq+y/pbiWDJVJ5zswpuR/3oL+mUNYPfcAAZeJ8YLP9ULUa1DbGFzlnTpDXJaR1BeoP0Vhw/gkyXIcihUJM+1eoMk6d5W8ZQQw9CvzAxnTBCzEf2NUcuOEtOewBRyjYY7giowT27A3t39yuKGYYC/wYjC3lAUBSXL4zKPth+2sH/9isxoE8rBR6/gJmy6aTiGotSciEL5Ap0AMtf8uCiK+JpcwLCUx6PCYMntg+8q83YKhitfkD2YJTcf43uOKyIS0qssSf50epNUu5ckvudG5i4hqHLr1RauQYaKFU2lMuBDvrzh0OGPxMbzX+t4h0EyU/XsmAXMudz7ZsnzAssGPJKDb6dNruKq9SWQg7k7wnI3+qRRDc7XTMOCinBtcPrMzgQNaJtyvwwtXFqBKM08bT0coGBjXNvH9yLKr+IqbFgCE7KVHBUnPYP5VVG0QyZ1IauRhcXnM42OgisrZOFYuGTOQZMxOeNYP4V/Zv41ZaTdCK0HGEItDvZghJIVNqsEKDc0BZEfwJgzMCgVQ1LIRHjH+5fnr6lT/6bg5bd18NIujGjAwtXggJOnVTD/aqVZ6BW3SbGdV6QZfV4jOBWLFN8lt9rqaAYi5it0eZ 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:(4636009)(46966006)(40470700004)(36840700001)(40460700003)(6916009)(47076005)(81166007)(1076003)(26005)(70206006)(70586007)(4326008)(86362001)(54906003)(7696005)(4744005)(8936002)(5660300002)(316002)(8676002)(508600001)(6666004)(36756003)(2906002)(36860700001)(82310400004)(426003)(186003)(356005)(2616005)(83380400001)(44832011)(966005)(336012)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1804 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT040.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 2d65eea9-6215-41ce-23c5-08d9e014b042 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lvEw6R/GTMo4nKII2hSMSbK5GR0Kv7+sw4w7214fjx1uRLVMZlQHRey9XqyDIJl74YB3LocoKQQXycRPCN9JoUB8EMdZJKCR10ehT3hhCnx5FThBKI1e8Oi12oRMxWyOP0qFjnucOVU3EHv+7aduBg0FdW5vx41Ep5adNGHjsGSq8O0ROkg58dxPwYH0zgoC2toZhClfXrk/XZ0fB/IsfQPw4WjQL/aw9K/ybNI1/JHOBRg/1ixp/juSFTC9t3D3v+pqDsn+Ta6XlyEjYx4rX3Hmndu3K55cKSq7lR3uEviuqAzRrXEfZNQbKhSFOkXlpiiJNd6ZDFHP3AUZcmksbQ3NNphZ0Xc5w3/hgMUw5vtwY01mFdfEw8zItEKA/lXqopkDucUhUqe8z5Z4bvvSSxTVE2WOswcbG+kYwnrBN/7apj+3eIs8iz0+YSTKRGqCh6k3KO/J7xl2GEVh63mDDn7MYcI03JaeVgs99EuAOYbA9hj0W+1byWJkxYyi/5vkYjTUp+Or4nkL+nlMIQZdFm6PJpV+qwlJ8kWCVsILtLfqQaGHjZy7aZsxSIJiINDRhS6EG24wGKewvh1khNouK4YoIv0zef14mUxyrJjRMp0hIT/zPBlkeIpWSTGyf/pAZUoFkIABh2DnZSsnQ++gKzu9CyB21Yv/CoRt7HGLDkn2jBP/NzYhQ903uAOz0NOF/3ryyMuG5vRz0az2HFvFIqNny60dk6phcyEBhjcnxXQLAndrMw90SiFXWVN1Y33B7hkOm3dQePQKZpRlyuf4XSILQB8eNZMcPtMAsQUqG2C3U6a2uJoYxERGZZpq0xFwVmwUKno3HON/ji+ndGjfsYqWV4RGFWeg6eooC+A+CnEmA8scXfvMNCX5uNO8bGn/ 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:ErrorRetry; CAT:NONE; SFS:(4636009)(40470700004)(46966006)(36840700001)(186003)(8676002)(36756003)(4326008)(107886003)(5660300002)(44832011)(83380400001)(508600001)(6916009)(426003)(336012)(70206006)(70586007)(4744005)(2616005)(86362001)(316002)(81166007)(47076005)(8936002)(54906003)(36860700001)(966005)(6666004)(7696005)(26005)(2906002)(82310400004)(1076003)(40460700003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2022 15:09:38.9695 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1f44fbe3-4b4f-4043-9f49-08d9e014b500 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: AM5EUR03FT040.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB5502 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220125_070945_106838_CA22DA12 X-CRM114-Status: UNSURE ( 7.10 ) X-CRM114-Notice: Please train this message. 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 This is a series which refactors and then adds some extra tests for MTE in the kselftest framework. The issue that these tests are for was was fixed by Robin in 295cf156231c ("arm64: Avoid premature usercopy failure") and based on a simplified example by Catalin [1]. They test some combinations of pointer offsets, sizes and syscalls to exercise different paths in the kernel. Thanks, Joey [1] https://lore.kernel.org/all/20210624150911.GA25097@arm.com/ Joey Gouly (7): kselftest/arm64: mte: user_mem: introduce tag_offset and tag_len kselftest/arm64: mte: user_mem: add tests using tag_offset kselftest/arm64: mte: user_mem: add test with mte tag inside a page kselftest/arm64: mte: user_mem: rework error handling kselftest/arm64: mte: user_mem: check different offsets and sizes kselftest/arm64: mte: add test type enum kselftest/arm64: mte: add more test types .../selftests/arm64/mte/check_user_mem.c | 145 ++++++++++++++---- 1 file changed, 112 insertions(+), 33 deletions(-)