From patchwork Fri Jun 2 01:33:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 688606 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AB31C77B7A for ; Fri, 2 Jun 2023 01:34:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233594AbjFBBem (ORCPT ); Thu, 1 Jun 2023 21:34:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233510AbjFBBej (ORCPT ); Thu, 1 Jun 2023 21:34:39 -0400 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2044.outbound.protection.outlook.com [40.107.96.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B8C3128; Thu, 1 Jun 2023 18:34:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gdMP9KCsGhqmxDddDF2MrHOZrwLzj7AdoEcaYco6NAkYR7mjiDBB8izmbfxW+FdfBux27ZjVcCwVy6FHMVpFGnZPHbrm71B+K49JkJ0EYSWZxMKk+nia/Mc2/Zg0qFWY4Ubc0043rhmptdyWHf0pW/97bvvNUgu3EmPfEU44OVIAtD5G3MSm6i9+YpFZldptLJCnBNHAB3HfcpTWFsBTMhNHKEBDyVUcqjPtmR5gVt4CD7sdYYXvdu97C1GjfQBfCDtNPAPOrAiqJUduyrEhbjMC6aL0jI+G0PvUCeFz0QLcnCkFXeKfN+tU6G+kH2Lz50SFb4IVRF9YOpTz87E7KQ== 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=wwNMzjh5s5nkmclVLYm8bSUQkCHGK/n7XmDjG5AVmks=; b=eOUfX9hCYJEI3YJKXLi/TZUo4wvAv0vWTFeDexlwFD3CU/xsqs3f8vTWX0opIjSwbLIO5cYNrgGziGU6RbVNepHf28Qrnbe0ZDPoieVRHgyHvdo9UL4xbHHB+AWJNk/MZtvFd/1X3skY7DyhE09viCsmBskBWDL7twEz3SVzC+ogKr6qwRQ8Ext3AcWeTAOL6T6RjHsk7SdOEl9MPArjjWtcUohyR7Nv7Tv8T1kjxIMSmzaLmWOEB7Vx8cU0h5ZfkkmdMD3xoo/76jx7nDeYFKEHeNZ7+zrCo3XU8SdmeBi6mqo3WNwTaIRPCUK/DWZmnx+i+F+sKzRbMMghcuEOHg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=linux-foundation.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wwNMzjh5s5nkmclVLYm8bSUQkCHGK/n7XmDjG5AVmks=; b=jNY0dvAwQA7Y8omSa2I383o+pWSnTfzz4vLfK5ja8ZglBMnia5351hpOKlPlk4EBe6ZH5j5Vl3MiA8KTaqFJ9vIbB6O1fpwubM9v3U9IL4/Qlo2aiAyFhlY64hxYImT3PS9u8GRUNLEkE9n0WzfPPGiZ0GFGwTSCbKzGT1x7t/Cetn2ngH8Azj3Cb6jXx6Dw8zX/opVIGs92+2nBJfTl8Wk4ML1Decu5Zimbw/7Wi232o8D7jkdeQVGknS1GoCpjeZls5gB8DrvC8IyjsYvOhK9X3O8fkL2CpIuXOzu84JGrsEx6nNS/xaWA7rihcMplLgMAl//NdYczEjWWGKwyfQ== Received: from MW2PR16CA0012.namprd16.prod.outlook.com (2603:10b6:907::25) by IA0PR12MB8715.namprd12.prod.outlook.com (2603:10b6:208:487::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.26; Fri, 2 Jun 2023 01:34:36 +0000 Received: from CO1NAM11FT077.eop-nam11.prod.protection.outlook.com (2603:10b6:907:0:cafe::1c) by MW2PR16CA0012.outlook.office365.com (2603:10b6:907::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.23 via Frontend Transport; Fri, 2 Jun 2023 01:34:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CO1NAM11FT077.mail.protection.outlook.com (10.13.175.55) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.23 via Frontend Transport; Fri, 2 Jun 2023 01:34:35 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Thu, 1 Jun 2023 18:34:20 -0700 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Thu, 1 Jun 2023 18:34:20 -0700 Received: from blueforge.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Thu, 1 Jun 2023 18:34:20 -0700 From: John Hubbard To: Andrew Morton CC: David Hildenbrand , Peter Xu , "Shuah Khan" , Nathan Chancellor , , , LKML , John Hubbard Subject: [PATCH 02/12] selftests/mm: fix unused variable warning in hugetlb-madvise.c Date: Thu, 1 Jun 2023 18:33:48 -0700 Message-ID: <20230602013358.900637-3-jhubbard@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230602013358.900637-1-jhubbard@nvidia.com> References: <20230602013358.900637-1-jhubbard@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT077:EE_|IA0PR12MB8715:EE_ X-MS-Office365-Filtering-Correlation-Id: c4cd1ab2-bb23-49a8-30c6-08db63098608 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bpOeZFEoPonT5HtC2BW4kSCOnQK//f73J2chP6VRgMUErBUzvy5cA7Tn3e68NuUO223Gpq7emWNh/ddmAVgIwSJLYx4i2U32SmyB0BOI6IMuequ0uv1IyQZusvtPa1pv75EeGG6j40TLb/db/YrJApMzRnVzGF579rARyWbkEfxjQVlNso0BuYHQ/kKoD9bW4DQD7yT5KHiSDVNGWUGdzkRBcF/O2Ml/VtmnFGGMaIHChQQ9Fl98HXRQLGwXA++ahbppfMUcHaojZz+xhaw0rGWpDMchEuNTw3+NdLH3Fg48nf0GQ9Pweb+Sm58f6685QFrPZcnvO8HIpvOjIOcf4Cz4sgb9xvK0OJMAI2h+CTwq9LJYuhYoGLHfEIQ9gg13e1qNido86x1ecdL8fm/zNSqe/Qme9iiybjualL+n00CV6IiL6KhUzxAsFL9+bOy1lYviIf/YMQQGnba8CqTXgdDn+vQm7VwYPTZktV42nCh/e59mXAxLvOx5Y3Es8MNVAwCb85UiEP9QVoUvVkT4swfoGOmZXME6+vantvUptZ+dD1nVZjxYJub3HFC3tPyH6bwQmRF/gs9IAUyRLTQl0zbRcag3pufY7xvhKsjMLMc9aZ8tC4jwlnkPrIuX+SvsnKxben8UgjezGyqJEVgTLrA2QUa3RoTS3IlzWoIyFB2kKDCbXu5EeRfY8pvmbcfAq0PmdTvy6sFnG1t39aqqdslLHJ8yiCo5CEK/xOJrlvEMrYQ3TYVM6WXFwlUsGvUz X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(376002)(346002)(136003)(39860400002)(396003)(451199021)(40470700004)(36840700001)(46966006)(36860700001)(336012)(426003)(83380400001)(40480700001)(47076005)(70206006)(70586007)(6916009)(1076003)(26005)(6666004)(7696005)(107886003)(478600001)(54906003)(2616005)(186003)(86362001)(2906002)(4744005)(40460700003)(5660300002)(8676002)(8936002)(36756003)(41300700001)(7636003)(4326008)(356005)(82740400003)(316002)(82310400005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 01:34:35.6190 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c4cd1ab2-bb23-49a8-30c6-08db63098608 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT077.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB8715 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org The dummy variable is required in order to make this work, so declare it as volatile in order to avoid the clang compiler warning. Signed-off-by: John Hubbard --- tools/testing/selftests/mm/hugetlb-madvise.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/mm/hugetlb-madvise.c b/tools/testing/selftests/mm/hugetlb-madvise.c index 28426e30d9bc..3296ccaf7525 100644 --- a/tools/testing/selftests/mm/hugetlb-madvise.c +++ b/tools/testing/selftests/mm/hugetlb-madvise.c @@ -65,7 +65,7 @@ void write_fault_pages(void *addr, unsigned long nr_pages) void read_fault_pages(void *addr, unsigned long nr_pages) { - unsigned long dummy = 0; + volatile unsigned long dummy = 0; unsigned long i; for (i = 0; i < nr_pages; i++) From patchwork Fri Jun 2 01:33:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 688608 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5F5CC77B7E for ; Fri, 2 Jun 2023 01:34:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233404AbjFBBeh (ORCPT ); Thu, 1 Jun 2023 21:34:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231241AbjFBBeg (ORCPT ); Thu, 1 Jun 2023 21:34:36 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2049.outbound.protection.outlook.com [40.107.93.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76138F2; Thu, 1 Jun 2023 18:34:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n8SRjcVBLe7bgo0IAohbUAtvBXWOcJIUjKDjX12EtmFac2LQAag11f7vWKEEGq1zrg6FcZOI89Fh4rdfYhAxW8b8jp6cY5O04YVFlEnwSrWJ26ObpXWzHwUSFfBrNGDemxBmJoZGATfT0v+l9xfdFKSmPJjmQAW/djIy3vm0Gy/0iVwC29N/MUG8KXVaNNdgu4dFxO+qnGVO0L/mP2oMfq02vzSeMO19H6ylIzTTQp2hF/zTbBdXqzCIzEyAM+mTkYACjS/2PGsEFQd66SxkaC4Sn+0H6LQ0rrDZtCbq073J47M1BbVelHmE9WQguj2xvCpLTZUjrvrw1bqI8+Asmg== 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=QOB6h6NlmVpcehwBYy7nlOHDS8hc/dX6LTSzGmRC3Fk=; b=OGYYZUpQf9dC/kmS2QfNT3s8/0ExmJ7i2oC59HMOpxN2qnMfPimfNJHbxFF5xNhRQSNahsV2iY4FGXQp6f0iO6uVpBzbdpHNLSvL8ofLMbvjwtTJKPAVWjcup5LQp1XcCsGrs+7UMsfuL0c8IaKxf1rH4HUpDzzcMQLe++BlbxEbX4Fh5lqVay2aI7TbqnpQQDJ3wtM1I1fQRaQksMtkXPMP9ljECjVra7gI/rmAPMIOREjooNe56WyXjNKan+ydcDlCasQUqTEJFcOQrwoNzlSHAP78iS0zeI4hoL6Y8hha/fMoOaE34e9JsfQlC95ZZbVbqjeu8BfYnEMxyAyk9w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=linux-foundation.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QOB6h6NlmVpcehwBYy7nlOHDS8hc/dX6LTSzGmRC3Fk=; b=fq6UP2R+Gd1XpnNxbiE48hpZtq8HcED1pm7QQw77SruxbVgsAJIdo+YqQQ9BhVzkhdx9dRfMx+kEzWM85B36AUthGvEyRD5z6JHfDm2LWjEAyCM2XZemqERZQQGXQtN4myMKOizx8gctdtCnBZPQrrqKwy2YMmZGJeCDkj6VJ8HfGnPApq2i7auGjLUvqV7I/uvrqBi8cheTQNhLJJq06etwZO16BpIbeTqJUWjCKscAoSel5TI2q+SlvyZ5dNqmJtW+berdQKrBLxHo22qCsd5Z9B+q8qdof2+bkXBArNkoD/zuk1WAj/Cd0qNAp1Gt7Q7NkiukEV1h3Rap3olIoQ== Received: from DM6PR03CA0055.namprd03.prod.outlook.com (2603:10b6:5:100::32) by DS7PR12MB9043.namprd12.prod.outlook.com (2603:10b6:8:db::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.24; Fri, 2 Jun 2023 01:34:33 +0000 Received: from CY4PEPF0000EDD5.namprd03.prod.outlook.com (2603:10b6:5:100:cafe::dd) by DM6PR03CA0055.outlook.office365.com (2603:10b6:5:100::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.24 via Frontend Transport; Fri, 2 Jun 2023 01:34:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CY4PEPF0000EDD5.mail.protection.outlook.com (10.167.241.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.18 via Frontend Transport; Fri, 2 Jun 2023 01:34:33 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Thu, 1 Jun 2023 18:34:21 -0700 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Thu, 1 Jun 2023 18:34:21 -0700 Received: from blueforge.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Thu, 1 Jun 2023 18:34:21 -0700 From: John Hubbard To: Andrew Morton CC: David Hildenbrand , Peter Xu , "Shuah Khan" , Nathan Chancellor , , , LKML , John Hubbard Subject: [PATCH 04/12] selftests/mm: fix a char* assignment in mlock2-tests.c Date: Thu, 1 Jun 2023 18:33:50 -0700 Message-ID: <20230602013358.900637-5-jhubbard@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230602013358.900637-1-jhubbard@nvidia.com> References: <20230602013358.900637-1-jhubbard@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EDD5:EE_|DS7PR12MB9043:EE_ X-MS-Office365-Filtering-Correlation-Id: e2629734-a108-4852-d0c4-08db630984a5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: K7QI7s/VUJjVqtJXqeDnusKSCtDwxsohYM6Dt0qsQ78w0vw/IBu+tfRxc6bJEISQRMwUhcQQa3E1oncnWxRrzD8WhFDBWslBGO+atroCXFjwa5u/6TkuXZkiUJCqBDlySA6JmM3ytVOPYqIFIGgLWSrlTr1e2JvSitRTerMiSSh2WKANhIvyEP5BbLJd4QA5pbWlHD+2dxPWksbrc1EmyKn+AVb25bMqDfzr2r6AFOB24Kx3zSC6OVvxeRY+vSUVQZJJLRpFLzMXDRf/d/qZepq4L/Sd+EsQzBLBxV0f8tzS1q8QawaMl6678o4V1cIbOm4MKVVrcEi4+cnVhTYXUus9DwmWiXffeP75cgRL3Cb30obb+NdZdIh6Q35IykRg5JA51EnwA/UBOPoINbgVEhhl/QuMeQeo5ZOOJvBxdUnRaPiPOoGmbTSe1EDaLaAfCdOd75HxvtzYgqiTP71S3WMiTB81mB6NH9gnBl2lgdVO9T7RAKz+JFRdTofbuHzNQC4oohESGYSb1tNPBznSCDXgRxEfOFH3hISBI1cQPMJfczC4ZUOlwKsUeNMkQ1O5bNG32k42mdOt+R8Ae8EXfhpTProqdEY2PekXZcv45JioN1ORL1+kE2RCst6k61vP8OMC1s2DeXC5nxfHAMalsPdry5ldaF+xP+xU6NWdOumh6wzRqlsfQPUhE61bKLqIxW9AYGTxzx6cXzdt0bumYbT6ccd0RTWOqnhmtrPpruCM9PEhbkWlDzzV6NGPPGqU X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(376002)(136003)(396003)(346002)(39860400002)(451199021)(46966006)(36840700001)(40470700004)(82740400003)(82310400005)(356005)(7636003)(40460700003)(54906003)(86362001)(6916009)(70586007)(70206006)(4326008)(36756003)(40480700001)(478600001)(7696005)(6666004)(186003)(26005)(107886003)(1076003)(4744005)(316002)(8676002)(5660300002)(8936002)(2906002)(2616005)(47076005)(36860700001)(41300700001)(426003)(336012)(83380400001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 01:34:33.3122 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e2629734-a108-4852-d0c4-08db630984a5 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EDD5.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB9043 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org The stop variable is a char*, so use "\0" when assigning to it, rather than attempting to assign a character type. This was generating a warning when compiling with clang. Signed-off-by: John Hubbard --- tools/testing/selftests/mm/mlock2-tests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/mm/mlock2-tests.c b/tools/testing/selftests/mm/mlock2-tests.c index 11b2301f3aa3..8ee95077dc25 100644 --- a/tools/testing/selftests/mm/mlock2-tests.c +++ b/tools/testing/selftests/mm/mlock2-tests.c @@ -50,7 +50,7 @@ static int get_vm_area(unsigned long addr, struct vm_boundaries *area) printf("cannot parse /proc/self/maps\n"); goto out; } - stop = '\0'; + stop = "\0"; sscanf(line, "%lx", &start); sscanf(end_addr, "%lx", &end); From patchwork Fri Jun 2 01:33:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 688604 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00E5CC77B7E for ; Fri, 2 Jun 2023 01:35:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233495AbjFBBfK (ORCPT ); Thu, 1 Jun 2023 21:35:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233619AbjFBBes (ORCPT ); Thu, 1 Jun 2023 21:34:48 -0400 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2042.outbound.protection.outlook.com [40.107.100.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6369138; Thu, 1 Jun 2023 18:34:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ckQwf989ZTXULbnQLkaejzyJ1xe2eyF4vKQ0NH8J5Q0TwqUgpmm71FVTr2RYeqawXOx230VzoKBwgHd2Rbxaq+zBJoyJBXmeekW/XSo7GsxqoSgcDDSEXayTjJOkDAre9nD0p7kmUaiYPPB/YXdwB5ieh89iK9zuogQ7Exp/CeE9pHp84BvI1R+osuspZ2wOSCNKb3PvAqpJJCw2zVB5HewdpTWLHtuKCv99aKa79hP4oNoexmNyWewovBiXE3CwXaKsAV103ZB8rcfyFOQafO1zm6att7m5FOYH5/Pk4FEvENMc4fNVAcZVHSPeyQ2B+bqmNK0ZQC+VA+MaWCtNtg== 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=YmZVj+Qts14XOWi38dHOr6DxUVKKC0XpuAZpHeEnUuU=; b=TgpHZv9L3P2ZyTLmu9DrASCfuPmfax5C0Ry1oM73Rcq3yvB2lVQtH07Dmqr0Sufa1/Y/0ySYZC71HJKNuy4O0p/0opOjrvCmMgCM3LNoiBwNR7lVmEbTdnh4Y5etGYR1K+pfSoaxnUcNp0JM1OXdDaSBrQZTuUqNpyjP5HdLhb1rESACKO0vRpA4IXrKZ0kVkfKS5nsXY5gWRvC8On7XEYKtWI/X9Aeb/0rPiBBZlyozdcypjuZy/sgvcLTHaradJdnDlfzcBGc22yJUtG1L5FadBmXnseWZUi8kksIDaQOYFq1dhUvTeaN78TmequynLYRcftxPCLtyYw1pJBqR6w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=linux-foundation.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YmZVj+Qts14XOWi38dHOr6DxUVKKC0XpuAZpHeEnUuU=; b=BxpaWauMkLCRmZ6NFWCyoKBJ7+WhzlOlFB8MBPh29vo7MX2bM7YBaGKSCskcyl3PtF38jUA21HMBypT953lC8+QRVWCtVg6W8kQ4Np6dIY/9Gi9rstyVjKLwX3UtQMpN44Ba+j2ykld+ZawVd6DTqKJKs8xQSk5aLdmcvZ8jJaNKbKjGnxR6RfUdVidzBANr0AZ6Moigv5aiq38Zo+LHqD4xjplBnCLjpvuDvP8VioRVEA1AC1NWZPIwAaeOpEkzkp2090T8iHR/DFDG4TY8t1l4q5LezusWJHAyshn0aA0+tHVhN3ZqHxV/twla4PrmWqyU8iKQFM4AqwYoS0tOAQ== Received: from MW2PR16CA0025.namprd16.prod.outlook.com (2603:10b6:907::38) by SJ0PR12MB5676.namprd12.prod.outlook.com (2603:10b6:a03:42e::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.22; Fri, 2 Jun 2023 01:34:39 +0000 Received: from CO1NAM11FT077.eop-nam11.prod.protection.outlook.com (2603:10b6:907:0:cafe::9e) by MW2PR16CA0025.outlook.office365.com (2603:10b6:907::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.23 via Frontend Transport; Fri, 2 Jun 2023 01:34:38 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CO1NAM11FT077.mail.protection.outlook.com (10.13.175.55) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.23 via Frontend Transport; Fri, 2 Jun 2023 01:34:38 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Thu, 1 Jun 2023 18:34:22 -0700 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Thu, 1 Jun 2023 18:34:21 -0700 Received: from blueforge.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Thu, 1 Jun 2023 18:34:21 -0700 From: John Hubbard To: Andrew Morton CC: David Hildenbrand , Peter Xu , "Shuah Khan" , Nathan Chancellor , , , LKML , John Hubbard Subject: [PATCH 05/12] selftests/mm: fix invocation of tests that are run via shell scripts Date: Thu, 1 Jun 2023 18:33:51 -0700 Message-ID: <20230602013358.900637-6-jhubbard@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230602013358.900637-1-jhubbard@nvidia.com> References: <20230602013358.900637-1-jhubbard@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT077:EE_|SJ0PR12MB5676:EE_ X-MS-Office365-Filtering-Correlation-Id: ce607a4d-b166-4e9d-c651-08db630987ab X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NGJ15Pz/mXq4MJhGU7HflwVMbrnMxxr3k1ykK+v2cpE+VNDtqFmcqqS8C8AXv/n2eK9g65330YRHdnwVK+qujcIYzfwb2EGgUGeMJWR3o+qxWv/s92Gg2NieiLYXuIIJks9bzQXGWo8w6jrXQa2aWWMQUYYjT7iJRhJI+32n57fVNdqOKF7fHvqwLaMUZKZ+zvlI/FWlFEYhNDuG0smBsRJhxklxW4Mx2tJdebo0yffOdtmE6iwW0dWlWH6amIlcyI5aplvPvLoxQRFipMyuXn/6BSAjog6z2iSeIRKMC1P1SR8HieNShOG+GsuQIVO5IsNrz0Am/Xt4lnU6BVgHRdtTp/yksoKu+xSBqWGwO1Je+9jp924uZz/gBb5RKLwURQsWxvfb3ctxXn3tOUnwo++tgKx9Qz++heERH/HV10loK8I1mIGH1zCXb84z6PP6Tbebo5DtUQJUSeBYlq+VTGtGzHKTSNQ0bHY8WrmlJpGMW6+3kuCw26SjcIh2U39eRLghXMqaddqcVhB6HPIhENIQ3u1noY0OyZHWvZG880JsEjmek4xfyqianMl9homdny5TR0G6aIlzUxB/pMUSlIRLBQFdYsNc5TZ+EqtqnxRTd5EWtWqYN/FX1rpHhdcfjstwEGcJzdMCwnlhtZJiaBZSO/0DLF3xUQP7ewbBKqgEyViIS2bL2hOknIRSbMgdX0QBGX1jjnfe/wQlG9vTNkvRQHGglOkxtHF6mYRZ7MbalndxiIHxTfSHA4hSsivC X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(396003)(39860400002)(376002)(136003)(346002)(451199021)(40470700004)(36840700001)(46966006)(336012)(426003)(2616005)(83380400001)(36860700001)(26005)(2906002)(8936002)(47076005)(40460700003)(186003)(107886003)(8676002)(40480700001)(82310400005)(478600001)(4326008)(41300700001)(6916009)(356005)(7636003)(70586007)(70206006)(6666004)(316002)(82740400003)(1076003)(36756003)(5660300002)(86362001)(54906003)(7696005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 01:34:38.3531 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ce607a4d-b166-4e9d-c651-08db630987ab X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT077.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB5676 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org We cannot depend upon git to reliably retain the executable bit on shell scripts, or so I was told several years ago while working on this same run_vmtests.sh script. And sure enough, things such as test_hmm.sh are lately failing to run, due to lacking execute permissions. A nice clean way to fix this would have been to use TEST_PROGS instead of TEST_FILES for the .sh scripts here. That tells the selftest framework to run these (and emit a warning if the files are not executable, but still run them anyway). Unfortunately, run_vmtests.sh has its own run_test() routine, which does *not* do the right thing for shell scripts. Fix this by explicitly adding "bash" to each of the shell script invocations. Leave fixing the overall approach to another day. Signed-off-by: John Hubbard --- tools/testing/selftests/mm/run_vmtests.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh index 4893eb60d96d..8f81432e4bac 100644 --- a/tools/testing/selftests/mm/run_vmtests.sh +++ b/tools/testing/selftests/mm/run_vmtests.sh @@ -242,18 +242,18 @@ if [ $VADDR64 -ne 0 ]; then if [ "$ARCH" == "$ARCH_ARM64" ]; then echo 6 > /proc/sys/vm/nr_hugepages fi - CATEGORY="hugevm" run_test ./va_high_addr_switch.sh + CATEGORY="hugevm" run_test bash ./va_high_addr_switch.sh if [ "$ARCH" == "$ARCH_ARM64" ]; then echo $prev_nr_hugepages > /proc/sys/vm/nr_hugepages fi fi # VADDR64 # vmalloc stability smoke test -CATEGORY="vmalloc" run_test ./test_vmalloc.sh smoke +CATEGORY="vmalloc" run_test bash ./test_vmalloc.sh smoke CATEGORY="mremap" run_test ./mremap_dontunmap -CATEGORY="hmm" run_test ./test_hmm.sh smoke +CATEGORY="hmm" run_test bash ./test_hmm.sh smoke # MADV_POPULATE_READ and MADV_POPULATE_WRITE tests CATEGORY="madv_populate" run_test ./madv_populate From patchwork Fri Jun 2 01:33:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 688607 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB9BAC77B7E for ; Fri, 2 Jun 2023 01:34:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233588AbjFBBel (ORCPT ); Thu, 1 Jun 2023 21:34:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233495AbjFBBej (ORCPT ); Thu, 1 Jun 2023 21:34:39 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2070.outbound.protection.outlook.com [40.107.94.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2DC1132; Thu, 1 Jun 2023 18:34:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SSTii0ErIrgD5X+6Pd7iDfiKFJJjN1RpjbIQMoOzlKyhjwt4hsXPEWZoODMe2JkXAB5u8LAOuz1MhfUkORoO1aKb6pgD7PWuC1I9Gm3WxQnyS/osdLBBjBIVNelzxgVlZ/FixJfzE8sUVQWwSf9xu7WrzXU/7a19SCTbQOEtIuvgip+T/UjxvfNazPvkX7fZ+4P2YYHIgat8uz1SJDUTd+l+aMltMc+jYmJiCBaVcOkO731XdblMH743U3UZet04La1zm2vz4H3cA8J0k3U1Yx79Gu3gGEYfQyvCGq6Zo5e7JIwxGZeT2hdZS7Z7vPxBvmuw8DDxmiFK1+iOfxNGSw== 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=r5fkJHsQy/I9xsX+eBYUykMRunKRT8/bp1kU0wSayko=; b=KZBu7J5xDnYrm4w3II1jl36iniAlJx2d8DYbE+g82pbKGHbyHhYz6jAGSw+gpypPeN80cnNO4CfAWqye9NJf0YK9ppUJH9uU+X1HaA3tV0uYnzL8NaTrGtV5q2N2l24tH9jVbEYFB2b0WW9zzMAA8LzbynxR30KRAJjFw/Ux++jNr9Cjrlap9XJMEteam7Q8/Xw5WQHCQnLnmftKUNBgYwWoqWqoDK8C5/GRDTKPjvzblDgq3KP4FkSz/9LvYih/dJwC71RzDZGXOyiV75D87lh69siw+nbc+xj0IxQjTs3K58IyR9+RQ3aYt0BlkO8qQ8uhhGW9rtsVQ5C2dAuohg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=linux-foundation.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r5fkJHsQy/I9xsX+eBYUykMRunKRT8/bp1kU0wSayko=; b=pUIPDvP6NgpZE3Ol8QT5JqGrOsKURev3KCRAgLuJv11oNMTkSvx1/eyFvEWyIuEMuIX/Z1aI49n5UhkI9XnGxkW8AT+F2OyVDyxY2qH51tMDF9JJf4iVZAMS4Q6R4kFcv9iQukP7Bkjb/azqabe/HOX7f1ADFIgq8ibjzOS6eUaBQHga70VKTJe+eAFmGM+pzttKagDHFH9SwfGIpO0jOIKQThy0QPzHNlG4LfUKy55BlY1EYdnNU7NQWJiFq5AJj3S0TOopskJNIuHqGqYiIa1t+Skl+5VeIvWz5CghlbM0panSQZs3xp7ms5bFraAdO19vEWz5yeu1g2u60Ev87Q== Received: from DM5PR07CA0118.namprd07.prod.outlook.com (2603:10b6:4:ae::47) by DM4PR12MB5119.namprd12.prod.outlook.com (2603:10b6:5:392::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.24; Fri, 2 Jun 2023 01:34:34 +0000 Received: from CY4PEPF0000EDD2.namprd03.prod.outlook.com (2603:10b6:4:ae:cafe::99) by DM5PR07CA0118.outlook.office365.com (2603:10b6:4:ae::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.25 via Frontend Transport; Fri, 2 Jun 2023 01:34:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CY4PEPF0000EDD2.mail.protection.outlook.com (10.167.241.206) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.18 via Frontend Transport; Fri, 2 Jun 2023 01:34:34 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Thu, 1 Jun 2023 18:34:22 -0700 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Thu, 1 Jun 2023 18:34:22 -0700 Received: from blueforge.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Thu, 1 Jun 2023 18:34:22 -0700 From: John Hubbard To: Andrew Morton CC: David Hildenbrand , Peter Xu , "Shuah Khan" , Nathan Chancellor , , , LKML , John Hubbard Subject: [PATCH 06/12] selftests/mm: .gitignore: add mkdirty, va_high_addr_switch Date: Thu, 1 Jun 2023 18:33:52 -0700 Message-ID: <20230602013358.900637-7-jhubbard@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230602013358.900637-1-jhubbard@nvidia.com> References: <20230602013358.900637-1-jhubbard@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EDD2:EE_|DM4PR12MB5119:EE_ X-MS-Office365-Filtering-Correlation-Id: 417d5e84-43c4-4616-79db-08db63098548 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8rDcCRhqduIO1O+ALiGNNs9Z11lisuFjmqHOdFkMHrOgKD4i/6DQ1T0/YtJH6RlrkudcxS+N6SvAVbm3YQQRPb3BPLDSlQj4y81FRUJ97SZyj+uHm1O/gaXnX/e5Nj5upTenoJSiOAmHViF6kvFIjHS8QEotE93jTooA2wb/bb0zFX9EsEASvl4F7mX3hbKIqtMTVSOq45HbBm1Nio0nmtcauGSDhPa9Eht579ZYoHrALbmle0qRMZn7F8q0JQ1TStqqFRmcy3l9HPmfutGLumtZBKtFpbZaj7RhCLM+3NIXpE4Npdwua///mblySVxNMaAZoFW9lSlmMGlE2fDBEttaNpCGcv+Ofk/sPK+mpJXY42NN4JynjfTPAC1fZ9Clj7maX6rNCAqTV34R6oJ7UV0K3CDDTGQKLru107Wd33QevPEFLfzer94v4CBfSURn3EWi27r2eqjtFEkSRJ07Cxa4FS/aGhOrMZXQZfG4AAS7tW6aCxHXsFwIo1qqee4lzeoasl76NsRWTSIAvCOLO9CWwLU7Z2b9LEpUstoOHzjKvPdS+vw5NePiaDwjtSm3UZbKAMghvh/f4kE/X48nbbNtEI7OCKssfUCAOmsQlUDfpeBoSSsaNzzDWBRWU+WeFMdrGIFeHX59zrM88HUFQ3fw3XHdRdsa2tXxLhF8tignOHSukWWMlSDlfn0Hpw4WaAMm8wm+w7kqzDUJRomUPA+VQJMD3mveeYx9U1fxmy+EjZk7h/VbNouNepatdcgf X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(39860400002)(376002)(346002)(396003)(136003)(451199021)(46966006)(40470700004)(36840700001)(82740400003)(356005)(82310400005)(7636003)(40460700003)(86362001)(478600001)(54906003)(70206006)(70586007)(6916009)(36756003)(40480700001)(4326008)(6666004)(26005)(186003)(1076003)(107886003)(2906002)(4744005)(316002)(8676002)(7696005)(8936002)(5660300002)(2616005)(36860700001)(47076005)(41300700001)(426003)(336012); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 01:34:34.3938 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 417d5e84-43c4-4616-79db-08db63098548 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EDD2.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5119 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org These new build products were left out of .gitignore, so add them now. Signed-off-by: John Hubbard --- tools/testing/selftests/mm/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/mm/.gitignore b/tools/testing/selftests/mm/.gitignore index 8917455f4f51..ab215303d8e9 100644 --- a/tools/testing/selftests/mm/.gitignore +++ b/tools/testing/selftests/mm/.gitignore @@ -39,3 +39,5 @@ local_config.h local_config.mk ksm_functional_tests mdwe_test +mkdirty +va_high_addr_switch \ No newline at end of file From patchwork Fri Jun 2 01:33:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 688605 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45FA5C7EE2A for ; Fri, 2 Jun 2023 01:35:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233661AbjFBBev (ORCPT ); Thu, 1 Jun 2023 21:34:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233603AbjFBBen (ORCPT ); Thu, 1 Jun 2023 21:34:43 -0400 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2045.outbound.protection.outlook.com [40.107.212.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92CAA132; Thu, 1 Jun 2023 18:34:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PZdXS6Bxm7LxHhLxBKotR1fB9vf/hnxqV7YUAWH0kzVHNCHXJI1hlTQeMN+DNYGuZAIfbCoGREY4XiWFynaU94WpyjOmFxzP3RZNlrEKuPOSd1Z0QHhAOs2f+LyJkTFBIhdD3cnEJYTXMSCVHLWMdnuuglUDOnL2KX8aKwI3q89L/g7ZjeQc0Inhb1xHGpH4X1PdFWlwhBEZF9RIwnaetWfSYMgFBhcKlDITmTSFGU90q5lC3P9NREkho12UYGTeBm7b14xMtX0/0AF3r8EBq3qJM0fvpUC1ryQU/WN8OR6MbXsOf8Q0bxfyfPFSnhVPdgh/fmHQMuaa1TXAEziUfA== 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=LHHg0GeUqQ9D6ypa+gYCxOv4uIVN5myD0EE5yivIW5Y=; b=Jk2N4WUD28Qcd9Tl3S8/p7Q+MBdWGiE/8+K5vDhr/CsG+GMhxtsZ4Mxb6HiDol1l1HPqSRKwHDjFAnWYgEYaXqtKm1cHERf203EQfWm6MQKfEP65WDfigqi3EQ0zkvKuOz2o3Sag/JQa/HwbkbFEYaDAeDc68GCgE8/R5JmBypeLSwU+uO3UgXhy0+pmLxR//1AISr8w9kUEdmkJroJiCDNWYCM7QDwKMHxmGJPHfe134grlL/KH4HV15JmWFMaobJvWX3m/mkZGqI0QgkXnsmieJlY4pWUBREjhF2Ujg3PR9goCrjQrbjtwh2YSJL4q3aVNVFh4rRirtTqX0GBsig== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=linux-foundation.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LHHg0GeUqQ9D6ypa+gYCxOv4uIVN5myD0EE5yivIW5Y=; b=EA9duJZBZustQFBioeABrIah4pKPWXzqnl+1RBmuBwW3kL2HZOyyds4gVfvp2oApaR6Slep4LyKZYOH0xJX7ngHiMYMfiHRMmTpBuvfrMIMG5GzhghhllesuZwT56JqOMIg5QYF3ptF31NnwsoNcALkc3wQkPMH4X2U39SxZIZhxNMni2/+hm9FLqg1OlHY2XnGakzLCQ28AmEM7IvFtusqtU3hvUWMnESH081BNJQq8ziIW+lfNOP4taQN3z0oOiCdE12Qt1eXPjV9BbriT+D2Fbu57KJqsHnh4DoC0qW3MIUBtBBVjcRi4xVXT34cuEEo/jB/GpHsL7lOSyE/0DQ== Received: from MW4PR03CA0257.namprd03.prod.outlook.com (2603:10b6:303:b4::22) by DS0PR12MB7777.namprd12.prod.outlook.com (2603:10b6:8:153::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.27; Fri, 2 Jun 2023 01:34:40 +0000 Received: from CO1NAM11FT070.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b4:cafe::f1) by MW4PR03CA0257.outlook.office365.com (2603:10b6:303:b4::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.23 via Frontend Transport; Fri, 2 Jun 2023 01:34:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CO1NAM11FT070.mail.protection.outlook.com (10.13.175.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.23 via Frontend Transport; Fri, 2 Jun 2023 01:34:39 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Thu, 1 Jun 2023 18:34:23 -0700 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Thu, 1 Jun 2023 18:34:23 -0700 Received: from blueforge.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Thu, 1 Jun 2023 18:34:22 -0700 From: John Hubbard To: Andrew Morton CC: David Hildenbrand , Peter Xu , "Shuah Khan" , Nathan Chancellor , , , LKML , John Hubbard Subject: [PATCH 07/12] selftests/mm: set -Wno-format-security to avoid uffd build warnings Date: Thu, 1 Jun 2023 18:33:53 -0700 Message-ID: <20230602013358.900637-8-jhubbard@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230602013358.900637-1-jhubbard@nvidia.com> References: <20230602013358.900637-1-jhubbard@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT070:EE_|DS0PR12MB7777:EE_ X-MS-Office365-Filtering-Correlation-Id: d0daccb8-1f97-4620-2a75-08db63098865 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Jgp4J2ItNaBKBZAB0bFP1EdveiZqOCxTamGMlUkrlMAbqxeXyuptjWOyebofMXJZtVSAEbJjeMorLo8L0oL3ueYRkpb6tGaFx49wCNBpFlOcZL0ooQb7afRyuI2azFuhfg+6XxsPCB57W/HqkZfcL3fvhFE2ieNOC/D3sBRK0VqbORcR652bb2QUtbovEeXlqNn7xFzx3khDoxMj94ajtDplqGw791YRSovDRnuWM/Ib9r7Q3cFgXRI+VqK0tlrba/PmCTIOAN7XdeNteo1n62YcAKBOFp0NJNYTu7bOGSywP0/ZGG0x3KUc91Zg0mELZWCVdvBov4t2MiV86GgpTPo5yrplNecwHlS58X0IpVMtuHoVFrm6jnB/d6b0o8ft01mg0iGxfemCM0+q8wFeewHkv5p+ggQ01pNeXUxWvB2MOCzXOzL/Z0qy+lrZIouwA8I3UMie+ytDFaKlvEPIXWsJqM2uREHlncronweuA80aDb545mjMrvw1bVaZ4fHepw7su1KvBLJTVZOfAB98ihLiT45V2gApPAGR5wxaY3PIyYxXngZvVWGI8dMZ2S0T4R5kCZ1P/6SncvC60Jsk3dLMRMs/lwnOyTOpjEY7aOj0ZOYyHfx6zb0rsXJS0slvcgBSLnNjX3BH0xKTN/BPndKWlQH9taXHVVjWfs+9Q4eFsJPTkOCd3qyoq1m5r4cToW41BPrjOGnPlJI3ow47YL6PVS9esQYOXVCte1cVwj0hVg1+edwJzPiHhJ3WyV44 X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(396003)(39860400002)(376002)(346002)(136003)(451199021)(46966006)(40470700004)(36840700001)(6666004)(426003)(40460700003)(336012)(5660300002)(26005)(7636003)(15650500001)(82740400003)(83380400001)(2616005)(8676002)(1076003)(186003)(2906002)(36860700001)(40480700001)(47076005)(6916009)(107886003)(356005)(54906003)(41300700001)(7696005)(4326008)(316002)(70586007)(82310400005)(70206006)(36756003)(8936002)(86362001)(478600001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 01:34:39.5837 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d0daccb8-1f97-4620-2a75-08db63098865 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT070.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7777 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org The uffd_test_start() is perhaps a little too elaborate about how it dispatches tests, leading to a clang warning that looks roughly like this: "uffd-unit-tests.c:1198:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security] ...note: treat the string as an argument to avoid this. uffd_test_start(test_name); " However, it doesn't seem worth it to rewrite the way uffd_test_start() works, given that these tests are already deeply unsafe to begin with. Fix this by just disabling the compiler warning, but only for uffd-unit-tests. Signed-off-by: John Hubbard --- tools/testing/selftests/mm/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/mm/Makefile b/tools/testing/selftests/mm/Makefile index 23af4633f0f4..473bf1811552 100644 --- a/tools/testing/selftests/mm/Makefile +++ b/tools/testing/selftests/mm/Makefile @@ -170,6 +170,8 @@ $(OUTPUT)/ksm_tests: LDLIBS += -lnuma $(OUTPUT)/migration: LDLIBS += -lnuma +$(OUTPUT)/uffd-unit-tests: CFLAGS += -Wno-format-security + local_config.mk local_config.h: check_config.sh /bin/sh ./check_config.sh $(CC) From patchwork Fri Jun 2 01:33:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 688603 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32AC7C7EE2A for ; Fri, 2 Jun 2023 01:35:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233638AbjFBBfN (ORCPT ); Thu, 1 Jun 2023 21:35:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233606AbjFBBev (ORCPT ); Thu, 1 Jun 2023 21:34:51 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2086.outbound.protection.outlook.com [40.107.244.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 897821A2; Thu, 1 Jun 2023 18:34:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AglRFIm+qSBZscSUWSbU5kIQ08iI8uhEdif6pZGyl9F4zFCUKYEKFkMsfJ0EyiiNb0zZtf3+a8+tOIQm31yBdViyGka+6vRYy/w7A5r+shudbvGpafe0FIBiqRXAXd3lNuAZmVZzwCdYPTqduM/Si/vC63m26odGDlwWZzS6KeT6chxIK7ipivCV5R0LGdovD0fEBW16vWMo4Hh07L64lCW3bLhBuX0IzYT7vaAhp+O6DxfNZgzLeLPT1dsssD583JgrYd8swk4LxOspOJzxzeoV5VK71PCvIWSbZKtaZC3I9fLz+FQ2MeTvSu+6zVTkJn9NQr5Z+VrPx++MDX1TYA== 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=HSj/wHWVVrHTw92AisT3rGa5w70JG1HYobjvIzezNpw=; b=F+4S1Ztx9yaDRInfW5AYAUbLCc8Parf02l98JGLWKo2vmNEb45MZBdJZYbajx3yV7h4UQtp9P3X/tjiGiSJgOIskFNHIfAyg8ID+ZYKYP7X4GF1SRhGefL0iogo3z7OaKz/VM4CCK6TEwwPgK6IQKBntB893Jgr4wDJKKIOfscoPackp1n05w/wKMF/lSYrUKRdVXC8ug6p9I/lfgCrI+cBO1TElwNvNB6aNzhlvHj4HJfezue419z9u8za1YV803TflyiVbnyZKSXx+FGNzjzuhoSa5LLg2JMSMjGxDZQA0kjkzOg7S3rgkEIEL2QCWoxkCIBfg3MwexhhfnKZJFQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=linux-foundation.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HSj/wHWVVrHTw92AisT3rGa5w70JG1HYobjvIzezNpw=; b=mbLOle6BEWar0koouPoDh3d3g0K7N+tmi74JBTtyWTW0+uAdQnB36SXDQSOju3xyyDsLeWfQEth6K5SD8s0ZRXgYjGk98J5VNhZ05JnH63Eb1hQFNH+ANuN9pO2CcJHnKNlpMaJL8L1hdjayRSO2z9s57vKmZgyEb2u6KTLlfrOazXyt77+EA/hwAqcoP4K4q5rYT4cQ+OHBNhSxWDkvZiB51+XZxfSFIlMqVF4mPHhUDUjcZgkgEa2sWp3HmLqppxnOyavUcI1dwK3jSiUsgidmOdM7FtYd0s5O8ERCZe4wNUJBt9TfDf2bZkSCXX2rArYJw3AhGjru6JSi6DefTg== Received: from MW2PR16CA0032.namprd16.prod.outlook.com (2603:10b6:907::45) by IA1PR12MB9064.namprd12.prod.outlook.com (2603:10b6:208:3a8::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.24; Fri, 2 Jun 2023 01:34:42 +0000 Received: from CO1NAM11FT077.eop-nam11.prod.protection.outlook.com (2603:10b6:907:0:cafe::5f) by MW2PR16CA0032.outlook.office365.com (2603:10b6:907::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.24 via Frontend Transport; Fri, 2 Jun 2023 01:34:41 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CO1NAM11FT077.mail.protection.outlook.com (10.13.175.55) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.23 via Frontend Transport; Fri, 2 Jun 2023 01:34:41 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Thu, 1 Jun 2023 18:34:24 -0700 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Thu, 1 Jun 2023 18:34:23 -0700 Received: from blueforge.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Thu, 1 Jun 2023 18:34:23 -0700 From: John Hubbard To: Andrew Morton CC: David Hildenbrand , Peter Xu , "Shuah Khan" , Nathan Chancellor , , , LKML , John Hubbard Subject: [PATCH 09/12] selftests/mm: move psize(), pshift() into vm_utils.c Date: Thu, 1 Jun 2023 18:33:55 -0700 Message-ID: <20230602013358.900637-10-jhubbard@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230602013358.900637-1-jhubbard@nvidia.com> References: <20230602013358.900637-1-jhubbard@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT077:EE_|IA1PR12MB9064:EE_ X-MS-Office365-Filtering-Correlation-Id: 2964d185-02ac-46f0-4353-08db63098999 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FNdFJ0JplC77gejZMpWXM7Zz6uWgwriI6JACJTt+nRbjEqXKLH26zcypFxsvEsU3SH3wOqORYJ42cYlvmS4YlsxjY0eKn9BfJklJNwtLm6Dx9aRQBGlp7yCqqGnIujLNf1kRMRwZKnVY3/CwF7XwVinxasyQ/CjssrJ2GAt4tw9AEzJt1VUKaKL0CfTVyFpCS2UNn4ifmNMHDyPulOlAuQOwXD3o7Fj/KgjpkI4gtknccZLfv5LpdCIPIxd9iT5gneLWmA2efAiLnI3ExgMDlamlmrJQ5pjh8a9mKDifMQW09GjUMtP0/ZEeVEVZw+5gcTFljbDJLuOYjcxOew1MZWxdzW7xuVCgNpSGZ46o2pHo3krt9E7BqcdKZsLnq5quJEc3vYnI1lYeqcA7DqQLjm/lkyxhF+o3D68LF176WxszFhyNDqtH1p3QdHHPIOkbU2lOJzByTKi/XhdqOB08r39oEzfyy/z1ZGx3gVFOYZlg+xACO2G7+FErKeHfrQHDWd72QxMSua5+Bbw9Ws4ZMGyczvxlEGhFFawFmlXXBUQA3+f7+RlqeCRJp9VyiI5xRcktjqM+5j3hlyDfF0n4QXtSZKaST22PYbnLe3zIouuzSc/MDzTvfJV8Biz7xkHZ3AfRZlcLm4Dp3U3+PtamM54LN/oo1cJQe96OsxKqmIolDYYSuPNe/Riw+Wk0KJDaY7GIEuh6ulqaKZiVaePChYCdp93lB5tjef4Q61t5vqs= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(376002)(136003)(346002)(39860400002)(396003)(451199021)(46966006)(40470700004)(36840700001)(54906003)(8936002)(8676002)(2906002)(70206006)(70586007)(4326008)(6916009)(41300700001)(316002)(5660300002)(478600001)(36860700001)(7696005)(107886003)(40460700003)(6666004)(82740400003)(7636003)(356005)(40480700001)(186003)(26005)(1076003)(426003)(336012)(47076005)(83380400001)(36756003)(86362001)(2616005)(82310400005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 01:34:41.5873 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2964d185-02ac-46f0-4353-08db63098999 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT077.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB9064 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org This is in preparation for linking test programs with both vm_utils.c and uffd-common.c. The static inline routines would prevent that, and there is no particular need for inlining here, so turn these into normal functions that are more flexible to build and link. Signed-off-by: John Hubbard --- tools/testing/selftests/mm/vm_util.c | 14 ++++++++++++++ tools/testing/selftests/mm/vm_util.h | 16 ++-------------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/tools/testing/selftests/mm/vm_util.c b/tools/testing/selftests/mm/vm_util.c index 9b06a5034808..01296c17df02 100644 --- a/tools/testing/selftests/mm/vm_util.c +++ b/tools/testing/selftests/mm/vm_util.c @@ -301,3 +301,17 @@ int uffd_get_features(uint64_t *features) return 0; } + +unsigned int psize(void) +{ + if (!__page_size) + __page_size = sysconf(_SC_PAGESIZE); + return __page_size; +} + +unsigned int pshift(void) +{ + if (!__page_shift) + __page_shift = (ffsl(psize()) - 1); + return __page_shift; +} diff --git a/tools/testing/selftests/mm/vm_util.h b/tools/testing/selftests/mm/vm_util.h index b950bd16083a..232ffeb5805c 100644 --- a/tools/testing/selftests/mm/vm_util.h +++ b/tools/testing/selftests/mm/vm_util.h @@ -3,7 +3,6 @@ #include #include #include -#include /* ffsl() */ #include /* _SC_PAGESIZE */ #define BIT_ULL(nr) (1ULL << (nr)) @@ -17,19 +16,8 @@ extern unsigned int __page_size; extern unsigned int __page_shift; -static inline unsigned int psize(void) -{ - if (!__page_size) - __page_size = sysconf(_SC_PAGESIZE); - return __page_size; -} - -static inline unsigned int pshift(void) -{ - if (!__page_shift) - __page_shift = (ffsl(psize()) - 1); - return __page_shift; -} +unsigned int psize(void); +unsigned int pshift(void); uint64_t pagemap_get_entry(int fd, char *start); bool pagemap_is_softdirty(int fd, char *start);