From patchwork Fri Jun 2 01:33:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 102263 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp728172vqr; Thu, 1 Jun 2023 18:35:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6nYoH1q9ecAOc32ZqojPNyltfEJe7Aa4lmJU3y0GMMXBpveuP8DFQlLctx2/GVICu5xfoS X-Received: by 2002:a05:6a00:1f96:b0:64d:2a87:2596 with SMTP id bg22-20020a056a001f9600b0064d2a872596mr2894266pfb.10.1685669748176; Thu, 01 Jun 2023 18:35:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685669748; cv=pass; d=google.com; s=arc-20160816; b=Mkk5CaXg9rspOGn966HhgX4lgXrs+KoNVg6jI+y1uis/Z0AP+/jlfkBTyfVbsbOepN u+sSjXO6V6BXV+ZEihE9Y5sWO2OdhGVt8UK33e7/OBxlY91TQ0TSn0XFlGwuI/elc7F9 0seqPfCJb5By3bMzBFvcsJei7zGgeprs05r5mS4A2C59DLsKW3R2xuDTHVd61Wj/KDF8 Gav2EcMfeoaBnDzIvJaOutvKKYPSHiatZjxndkh1bBaCi+dklWIWlwZioSs2+AoRuTwY hVC13BdNmvGsTVkRM4blUywmwHfKX24/iWTVRQAV+GQR9AkTQiN+kBro6DzdCFOxXQdS 3gBQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tMgl0DkiCy0u8hqwUZJYdqw2AWjIMAntZIkehI+DBoE=; b=tybvWhPLi9pPu8Ogp2OzTnA+SaZRGDaLPzkziKhWkgzgz+qzImoYFLypfSRCCmHYyk udMblqKp/GTEFgqSb5bNviHOgwJBQBk7I+Ph6f0aW5hlIKLjPvhBEHqIVi6BGv+1+Jmy cfnWmPwvh6AiNoH4NiyuWN5QtnQWr9gcMkxX4WL4GN4q9uf1mR8DNROVAEr4N6iSZcaU goMWM238qi/HeCfSki4Bu67aeQDWGzRi9HjfLC0XxwX4qI5XLOGKFLxfYjrcSbM+eMGe Z/fhAn8HMffYp1HyPpotp9SVxolLCGq8us/AzGUlleiPpruTIVBQfB7pAXZDWKhbTEzS 7K/w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=iu+WKdfP; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z13-20020aa7990d000000b0064e1b65f01dsi1519051pff.237.2023.06.01.18.35.34; Thu, 01 Jun 2023 18:35:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=iu+WKdfP; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233283AbjFBBef (ORCPT + 99 others); Thu, 1 Jun 2023 21:34:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231241AbjFBBed (ORCPT ); Thu, 1 Jun 2023 21:34:33 -0400 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2081.outbound.protection.outlook.com [40.107.100.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60154128; Thu, 1 Jun 2023 18:34:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PCBHbt5YIOodjPfUOjDIYxkC8de4r+fTDA3RuBhqCkmRs9hoYwZg1on1+TNLwUMWXMEUcrZn8TZo6G4Lx7cUK7YmsoxxJ6YcYV4fZOmLuxKZUFM4DD8amoudRlgb5C4FIWTUmRfu9JsStIj6rTGjeJKn/zDY5hfaqBa9f9ZGwM4agNFMGF9ZTyVgch4UajmQoVlYVdmSkmDvbNw2pv0Fgxlt/oMb8oMRqPzKPI2zhIGGm+XTEuJfF2UXrwFT4YdXTzvTjmoBC+Ijj4h98E1+DtKnlN/6IB2bGe4ihQFWau7ZM/OwSVhO62gmoJz1kyf5VY6xyZd4zF2+cWc7yN3Cpw== 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=tMgl0DkiCy0u8hqwUZJYdqw2AWjIMAntZIkehI+DBoE=; b=M4UtwI3DBX5+naKT5viVFBZlHI8z8O6Sn1MTVdtwKGR1iyF84qvX9ZIkQ5JYPWooOjOX1DSAllJcGW0ntLJ6BZkrroXRIf6SLfyKNHLk6ejGKlzi+s3sdJi7rn3y1hiDM3Tc9xfL99UjL7gBbf5rDwOt5DcFkn2a6enybh9yti986hn/7dbIwoKG//NfWmouejz+Cn84Ul3YLtyLOrMWE7v0N+fOmaiH/WVVwu6E8y7km1zKZylv+MYZhIrXlLNKMgo7BMlDK5M/Zg/mZjWlN804H8W013+Dxs6ath0cjHZubCS63rXE3KK2M/gdHkdq7auAPD+QeHwUT7Y4Y0tzpg== 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=tMgl0DkiCy0u8hqwUZJYdqw2AWjIMAntZIkehI+DBoE=; b=iu+WKdfPHy6xQA45EDYiAm8KyWSoOven0if53qufV2C0cQ0JhyVoq+qjoZAnxsywHwdcSEjsYtcKUKonXqAtkChkPEwMwJacrmdu6Ed2XPXfZiBbHvupcQOIr+f2kxa7nb7Bxyi8bV0jcPabaGLtaI7bHoIy3jl3DGjWgejvpEnjE1njDypBLdHTjLiZ69MydWx+yzOzfbjEl8tEsEMJtunCEEIPXfzzlGfMxGHqzQ5EINjJVIU3O3KK2wsLjHJ5b+9YX2r57qfwBTFt9ECnV9zSE+uyDCJvKJCIOWJ20iRVi6gEP3lMhlX6WYExhgRy0YjAiPfBeLB94AazXjyZGg== Received: from DS7PR03CA0066.namprd03.prod.outlook.com (2603:10b6:5:3bb::11) by BL1PR12MB5825.namprd12.prod.outlook.com (2603:10b6:208:394::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.21; Fri, 2 Jun 2023 01:34:30 +0000 Received: from CY4PEPF0000EDD4.namprd03.prod.outlook.com (2603:10b6:5:3bb:cafe::91) by DS7PR03CA0066.outlook.office365.com (2603:10b6:5:3bb::11) 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:30 +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 CY4PEPF0000EDD4.mail.protection.outlook.com (10.167.241.208) 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:29 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) 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:20 -0700 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail202.nvidia.com (10.129.68.7) 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:19 -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:19 -0700 From: John Hubbard To: Andrew Morton CC: David Hildenbrand , Peter Xu , "Shuah Khan" , Nathan Chancellor , , , LKML , John Hubbard Subject: [PATCH 01/12] selftests/mm: fix uffd-stress unused function warning Date: Thu, 1 Jun 2023 18:33:47 -0700 Message-ID: <20230602013358.900637-2-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: CY4PEPF0000EDD4:EE_|BL1PR12MB5825:EE_ X-MS-Office365-Filtering-Correlation-Id: ac14170e-9fdd-4c10-e96d-08db63098292 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: afidxTc0skUtYIJV8NCzn01xbip1EvVEiMeVpotyRY/6TOrHS3KnVeSJQHducfggHUTsmCI6v/d0w9eeI8JmWoV+gkUnn0xP+h2cLhdwcGkc1QVoaR1wyzaZ92mPyEfVoVZ9solQsCvvYxSH0VfHkSxw1d4hS+OvVH4wE3yCkSNEgkYO7UolEcO4eTHA7TJbtau3W4K7ELVBghOtr2NAI0Mxog0NB5l7xpCsmFL1NvJPMfTw8LjJOg0ngefIRr+hjVYcECJzAYleIRo4BHHmEMNNQU5NIRIKaNlJpxsYHtk78UfKtC6aahhNwo+ExJUPazl7OQCFLD1S670HDfUVIzjbsrSNbcCnrqX3tUQgsovLxekWXELq/VJxFhlDxM/MIM9nRmuII883Uo4MVd8gEAI42Cji6VdEYNLPcUfzFTRc9XlsTqQ7WiTKXOM6m8RJdhzEY1HPcdxSuSKca6qaKM2sVWTnjb2/nuoM+/8ID27yjC1cRmeXQpdU3VDADIch6fXjSQMAfVFVVfsb/OBqNhsuJpAa1x5Du7sw0PRTwrMPyrcBlAsL0I0qsBjuZsWrJkz0J+rIANAbJ5fpYxq0ORuRijmxw04WF9xPP3zrDt9T3Fqo+BJr7bhZPFEf26Pkkalxfb0GxxlN8zfEdyNzANczZv5+7gshnOpBHn9HQeN/c1Gcdk3ZD1elY4y4y9mesJ/r1L1qWKnYiQM8CsceCmKcOJmIM0oMjxXHDO/wnfmN9k6h8DPgmFk5haFV6lqa 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)(136003)(39860400002)(396003)(376002)(346002)(451199021)(46966006)(40470700004)(36840700001)(316002)(40460700003)(82740400003)(7636003)(40480700001)(7696005)(41300700001)(356005)(478600001)(36756003)(107886003)(36860700001)(336012)(86362001)(82310400005)(186003)(83380400001)(47076005)(426003)(54906003)(2906002)(5660300002)(1076003)(26005)(4744005)(4326008)(2616005)(6916009)(6666004)(70206006)(8936002)(70586007)(8676002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 01:34:29.8484 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ac14170e-9fdd-4c10-e96d-08db63098292 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: CY4PEPF0000EDD4.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5825 X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767552841677095605?= X-GMAIL-MSGID: =?utf-8?q?1767552841677095605?= uffd_minor_feature() was unused. Remove it in order to fix the associated clang build warning. Signed-off-by: John Hubbard Reviewed-by: David Hildenbrand Reviewed-by: Peter Xu --- tools/testing/selftests/mm/uffd-stress.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/tools/testing/selftests/mm/uffd-stress.c b/tools/testing/selftests/mm/uffd-stress.c index f1ad9eef1c3a..995ff13e74c7 100644 --- a/tools/testing/selftests/mm/uffd-stress.c +++ b/tools/testing/selftests/mm/uffd-stress.c @@ -88,16 +88,6 @@ static void uffd_stats_reset(struct uffd_args *args, unsigned long n_cpus) } } -static inline uint64_t uffd_minor_feature(void) -{ - if (test_type == TEST_HUGETLB && map_shared) - return UFFD_FEATURE_MINOR_HUGETLBFS; - else if (test_type == TEST_SHMEM) - return UFFD_FEATURE_MINOR_SHMEM; - else - return 0; -} - static void *locking_thread(void *arg) { unsigned long cpu = (unsigned long) arg; 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: 102272 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp732658vqr; Thu, 1 Jun 2023 18:48:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ60MRQeDJuKcTFgnnXhLxEAiACzfhYcnJ5t3h9IMujiQ1kIYRhWgLwCi6IU2PizE/Y0tdjE X-Received: by 2002:a05:6a20:1581:b0:105:f8e4:7214 with SMTP id h1-20020a056a20158100b00105f8e47214mr11414499pzj.42.1685670523102; Thu, 01 Jun 2023 18:48:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685670523; cv=pass; d=google.com; s=arc-20160816; b=u0S2iV97uNz2lOCEw3tYX9JlO5uHngP9rR8hibbcbJ5GGB+xyCpRgUbHpNQf65dzHX qWm1/zc53nfh/Nycn+i3TqhMhNJ+A6IB8rAOA5Bu6/e0rg/U5o07Zataf1O7OIWkkEDm BlUowINf6arsfPSl8oVjvDL4IKfSBJEJcsRk+SY0miXIkVb1IbqDrehBH0Ac0Dj4fIX0 PAG20Ea7SxOIkg3+VayZ0EwpQb6U84rT40ZiqRaaRHnHD+QZ+TqlCz9UqV12T5qGiCo2 Lcs9Rg1VVwlk+NLSD0cWDS4cJxJ/VCO/AVsyl9SjE+dWgpmKkvcZcdmb7jQqItxgmyhx 9siQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wwNMzjh5s5nkmclVLYm8bSUQkCHGK/n7XmDjG5AVmks=; b=IhsW2ROibktYAM3L6mU6EseICz9Vf59YrnMyE7X4ZMDaz8/hy2g242X1BXxSdX5+Xo z9uMZzAD3XzxsnEgiDc9Tnqvh5YTQmobNF+r06852lSwDvFcomc7etem5I7L2yvUHcvg n5KAEgedIjhmCb/jRt+GE93P8a51H5+0VMyMsLHiJ/g/7d5vSUP7sY08gXEAnjIZJ/9Z bZqC37xUrcJwAkbnnnRalOzn3N4JQI409bwcqd1O0dtQHk6vswz9efCP2qdFB9IkTTjR LWQgza3grrzNh0NTqDbOLM/e67rIN0bMbGgjepm7g8newj1gKXLpQJfJVYXvYPvOqZ1j jq5g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=jNY0dvAw; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i8-20020a633c48000000b0050be067284bsi138862pgn.556.2023.06.01.18.48.29; Thu, 01 Jun 2023 18:48:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=jNY0dvAw; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233679AbjFBBew (ORCPT + 99 others); Thu, 1 Jun 2023 21:34:52 -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 X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767553654367253460?= X-GMAIL-MSGID: =?utf-8?q?1767553654367253460?= 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:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 102266 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp728317vqr; Thu, 1 Jun 2023 18:36:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5obG29nDKvOZopBxNVlJtbVMt8o1wbz3IMAg5lvRRruobG9EMHhOcrdKBJ6tT2qIPRWkbX X-Received: by 2002:a17:90b:4f88:b0:250:2192:1bff with SMTP id qe8-20020a17090b4f8800b0025021921bffmr784740pjb.23.1685669775737; Thu, 01 Jun 2023 18:36:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685669775; cv=pass; d=google.com; s=arc-20160816; b=mqP+EDDbgKJx3JGNY3AyfqS1h6Q/1ieqrjuOR75jATddC6sG//adFfj6YDzJaOGvW3 qrFXjKNFQonqPhDG5G020FNCfFiw95Qsm3MIEEWwHp+sv1ambmBJmTuUI2xhMcPJqpfi pKIzivUTaLBm3bvrLS7HBZREL83KyOlzSgYU10CAGn0LkxdRkioVdjvm713dpEPTEJTm E70okQy5eESMils88X6GZE3vuy1F+aBa778uFKOKfY9lHtFsMuMtTwxKiDUh90NkpvSw KpAp+tl8F41cLIjmw7FivCOJKdR7xWrmK/A+T5Y+mjSw2EbA2u3i2gu7BKi6xSo6d3Wv Lk4g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IfjU4ULTGJNdH3DsNoYwiGJtwv8DiHV2FeugHiw+gqU=; b=LuShXuKkczll6pAlU9TDSzLcbSaF81x2lPQH1WHF+E9iAcbe2lZk7ui8YGJobJAk3m OH7Yg83j7//dwjN9fXUi9rC4rrKitFUsilix/orEfn1I/SYfRikoYJj0PnfMFfKK6GdV IsoHX8wbKpzRnX4mA6RceMKWo6eW3+DXsiHz1hMHKw7JvzJAc5rt7zRg6o3QojnJPqRp xiUUm6Q8aqpqcPawEgW17ujtIY1iyqM40siPjXyh9th7TXa/wKpx/FKsgQf4BE0FKl4Z LTr1Z2KIdxFp+1ScwYtsf/3tdalgWTIFimkNWHkzLtZajA5g1I/9muO4P8sV6vcvNzIo MMAg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=UmrA7dWm; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pc14-20020a17090b3b8e00b00250c9a70af9si224353pjb.63.2023.06.01.18.36.01; Thu, 01 Jun 2023 18:36:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=UmrA7dWm; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233723AbjFBBey (ORCPT + 99 others); Thu, 1 Jun 2023 21:34:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233598AbjFBBem (ORCPT ); Thu, 1 Jun 2023 21:34:42 -0400 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2054.outbound.protection.outlook.com [40.107.96.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0A0AF2; Thu, 1 Jun 2023 18:34:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oHG1pH++37QPNtBoApFjEBI8BwePdDx/OsXVxISNvVIE9LAJv+GF5ax78FULk2WcFb4O/ruxV2IPQ5Ua2eIDAXYEaHN1q8NPwYRnwySFaxXSp+6PieC3p37a+7zAg/rxve5ZJYDF+bTMzTaJxwe3f8VowV2OJcocveL5Dvn1HnOaJNfNO8lIlAWEqHQxvEFP0yNo5C8bFGEK/10ZQdFsEbQIXySSqo94cJBvjj0bWAIs4JuJyQpYppCN+Is6V8X4kcVukVtJ/3SBxMKr6NYBIYVhxr3HvjojFdsZ79kE7iD+aXxFvC5qFHkeMccbYPbP1hJ6Q/54cThOgkTnHPTO6A== 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=IfjU4ULTGJNdH3DsNoYwiGJtwv8DiHV2FeugHiw+gqU=; b=DSBMpue8LXQHxkkeoTcN4SHphDguCcUeH3cPKfpxxJP7RCE4GL1lRM5F7R6PEboWMBSdOVf4B+i7+gPMx/dVFsO4/PGc4fWZcZ2KsuYFGL7wQoz4HLA3Yw0TRRILL5dyMbqV4yeUzYjFLXTJVl/v8TY7ziEMOtEJqKd2e9sFIXhYukLwb+mnxsTxH2taQ9Xs8f9GTi8+KL6FNplBEeJu7YdF1WegAOQiDIskBiBydoaN+zUXb8F0cf3IDW0I/uQvSFE8sbd0d386hh/PXNFNJKfAg3HjA1p8xJWyeMLIv5vOpc/CN1sCHQduRH7Db/H8zLQomiLE38mktwm3nzj+Dg== 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=IfjU4ULTGJNdH3DsNoYwiGJtwv8DiHV2FeugHiw+gqU=; b=UmrA7dWmkhwpwjYSfEhR3Jz6aeAcamT2kSBjCMdvEO8/jJV/EP6Sw1t2cEc77lX8EOL/frdoVE48EFfqZejgdCcSzOsxqUnVfEJL75onwfvH/fcSXcu9mh7W8RjhER22zXDAAnT0D1LoT5m6/7ywLJOQH1FCNBFLdBG/jnwUg9Fixb96oLM7aW2gmftVSMSAqrYjoBO7c/1KVpBTcYmQg2daG2X25o3HFTcibIN9HJQy1fhp7nz8aeO4EvsVFbVhkQGzVtMaEiFg/JJkQf4WUw4TvHSjRGGrR2EsCvU0ZjkWYsE2rNS+Gq8BeZroupRpyjYkyrbeeDlJ8hXkQsgYdA== Received: from MW2PR16CA0014.namprd16.prod.outlook.com (2603:10b6:907::27) by IA1PR12MB7496.namprd12.prod.outlook.com (2603:10b6:208:418::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.23; Fri, 2 Jun 2023 01:34:37 +0000 Received: from CO1NAM11FT077.eop-nam11.prod.protection.outlook.com (2603:10b6:907:0:cafe::93) by MW2PR16CA0014.outlook.office365.com (2603:10b6:907::27) 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:37 +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:37 +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: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: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 03/12] selftests/mm: fix unused variable warning in migration.c Date: Thu, 1 Jun 2023 18:33:49 -0700 Message-ID: <20230602013358.900637-4-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_|IA1PR12MB7496:EE_ X-MS-Office365-Filtering-Correlation-Id: 16567e9b-afb6-493a-475d-08db63098707 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5dP5bJFBM1q8WREPFPiCeaDSHDQcpAMG5mM4MDjEqwyOPypWs1VdoIM5FVx0hYcHmYp8IyZJNxX3ms2OOUmrDm+8g2HgqKVAbiHpMEoSeGK2or55vMKcCLmVKmMrjr5in1fZGBM9YxrkXJRgDnqLzSTnl36c+Yu7SbFKHojzDKwdLuTWQkIoJCEt5l8ypk9U6nimYSp3dAGc/UnJuQfGpUXdT27r3sQxwIhXkNsKLNHRZ4kJOWhF5a0bxx3wQ7/bhUeykCtrPdmJ+ssnyYyfq7hrLTPpzeP1YEtzwJg/AUyN8U2V0WcpsDF7r3qVC54U2/C86DJEViNr7bqScj5BVWBdQWsCCNxJ4sIrbn5LjuXmi+/l9HQAsUfdxlWEPJY2XfBQ5Bqv9HVOwJS+9I798zb72Ty6XBZD2tS93P2ykTdGBpsvnRxtxBkOyzNxbUoJg8nEhRzLEBrF6hiJlggszR/cOTKfgPnF5FZhSXJPdLexP6U3AxcpgCFpeQ+87OWYgaW5+PNT7qkCJMmS8XJpLX8Isbq4DA0oPbEGS+TFuwcW2+E0LbikOQs2JRyVvebmywLFuqIUnlGf6ItdSfsGdHCE01syLzbWDmBcOGEOnNze17/2Ovj5meIpt+A3+evFnfaSKWE9p6rwj/nCj+OGydf11Oj4gAFjlKyKpSKTsOHq/L48jtiRK7C7RurTBXwrmmW9TE9PcG1Iabicmy/2uHeSjr7D90oVIT6fHXUh0JMRnWleozX+2KSl8uelp4m+ 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)(39860400002)(396003)(376002)(346002)(136003)(451199021)(36840700001)(40470700004)(46966006)(40480700001)(7636003)(356005)(36860700001)(47076005)(2616005)(54906003)(83380400001)(70586007)(478600001)(82310400005)(336012)(70206006)(6916009)(4326008)(86362001)(426003)(1076003)(2906002)(6666004)(186003)(7696005)(316002)(82740400003)(26005)(36756003)(41300700001)(107886003)(5660300002)(4744005)(8936002)(40460700003)(8676002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 01:34:37.2751 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 16567e9b-afb6-493a-475d-08db63098707 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: IA1PR12MB7496 X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767552870782902865?= X-GMAIL-MSGID: =?utf-8?q?1767552870782902865?= Declare the variable as volatile, in order to avoid the clang compiler warning. Signed-off-by: John Hubbard --- tools/testing/selftests/mm/migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/mm/migration.c b/tools/testing/selftests/mm/migration.c index 1cec8425e3ca..2dede662ff43 100644 --- a/tools/testing/selftests/mm/migration.c +++ b/tools/testing/selftests/mm/migration.c @@ -95,7 +95,7 @@ int migrate(uint64_t *ptr, int n1, int n2) void *access_mem(void *ptr) { - uint64_t y = 0; + volatile uint64_t y = 0; volatile uint64_t *x = ptr; while (1) { 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: 102264 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp728174vqr; Thu, 1 Jun 2023 18:35:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7fWEY6gA2RmJfmDMIpZQVdMaZUC8nf4H5qgoTasJzwckDjK9HQ5ITHfaP8chgtI+aaj1bp X-Received: by 2002:a05:6a20:3c8e:b0:10c:b1b0:3ee3 with SMTP id b14-20020a056a203c8e00b0010cb1b03ee3mr4194138pzj.21.1685669748459; Thu, 01 Jun 2023 18:35:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685669748; cv=pass; d=google.com; s=arc-20160816; b=V3LwE0YY/2L/mrk4nBEOBIGaTH42KMhKlSVM2D37gHkVHI3ZnsoPhqef5z5V3TtUmV 45cx/qtsa4q7SRK5EClcYMSSeSfKX0h3jEkKQK4tcFgtMQ49623EGZtcsebRdUBLWxZ8 TCTc4l8jIOgH1oPj4t5VmR3AgzKAbZ+ovGZsNxHdXz9JQjGUpCDCYUW/qDTLEst0sPrh rSyOr4ZUR328SoCsvQ1r0NjwyGmOFoPRHcSv6nHWp5iBqhl12toZDiwb86n6zkzqvCP3 mzpWC8lq3AvJMNZXReVg4E37uPBMhfqN4t31GWvI5LclhUdLWb6V1U8+3ry/PqS8ndDm 3wRg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QOB6h6NlmVpcehwBYy7nlOHDS8hc/dX6LTSzGmRC3Fk=; b=AoGYnlioSCVmvXOTio0MM5pcCDJC3F9W1S2wrEM1AnX9kx9CGucWkYX9fhV0Jg/y1z 1U0rqfy11UwVUsLH+XP7vogXt0kY+tcXqlNH7Xvq1+yas6o6iIkhq2sEP1ZYkFAiqFLW ansuYQdp+n9SqKz826x0aO6j7RQ+GB+AXnhlvCdNflzelzfK/qBL/pAVFhQpXb6x74E9 6QGEDLES6z+1sL+JTMeLhP1ZueFEFZmfMsfmYpxaCXs9ClIvAcsioqsDc0UucF2v10B7 WGMuvMqgHolO7qq7jme2lDTt55rqO3RIh8HI3eKoCpDhRKypDQUtbaf7dovBp1Fgs/WT oqZA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=fq6UP2R+; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 77-20020a630150000000b0054033bf35f4si99242pgb.773.2023.06.01.18.35.34; Thu, 01 Jun 2023 18:35:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=fq6UP2R+; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233416AbjFBBei (ORCPT + 99 others); Thu, 1 Jun 2023 21:34:38 -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 X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767552842330389590?= X-GMAIL-MSGID: =?utf-8?q?1767552842330389590?= 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: 102267 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp728402vqr; Thu, 1 Jun 2023 18:36:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Rf33u0x/zjrBQbaH/jGVShdoooGfCefLmd1SwFfJWA9qZATgJ0l3wT+4OqN6GiLbFVLme X-Received: by 2002:a17:903:268c:b0:1af:a4f0:bce2 with SMTP id jf12-20020a170903268c00b001afa4f0bce2mr1116734plb.20.1685669794432; Thu, 01 Jun 2023 18:36:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685669794; cv=pass; d=google.com; s=arc-20160816; b=gOahcwZooOpEKnkbvZSTMwqVUUpral/PfEtTugnljTnuNQ9cxU8cpP1IakCibxCe5j AV8Y1JaVt7DbeEh5pZnrEBN+jj832lg7nMfb14LrCAnd9yEAyoSDQcwQHkG7/PXKIXfz r810/erfk0o2y7dLZeD/UmI0+gPAgosf6PyTvVNW1yfHxqHfLH9dTOAotrZG8/HFjS84 9dJlt8zWe0vp7YJpw/hWnN+ih2v4sd/AdOrC9hW96NGQXLne8L25qUCSvG2hdbDQ1TQb hmlAy2XeTjmJoNevevT/m/3iYVsmPs5vus6fxOiqG0lZNwQ1cX2Ki5RUaGVX5aWM/xlG p1oA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YmZVj+Qts14XOWi38dHOr6DxUVKKC0XpuAZpHeEnUuU=; b=HsgqEnZ3IOi0E+AXXiFOFJZWtQYfOvR0Wd5ldEDFucjcuuOt9DsYNrGRGBgPduYdt2 q8Gya4gnB0teV62Lad2t3GYlK2E/xUD2GTfq5ei8ByjaZUvch+/Rs+inekaBvhDtSYlS INWqXdsPdfDPyAdRR1yC+iMMoq7v9BYU3MaDZjy949Tr27xDKn+bw4AUDQEiPgHsS4Ji xlO+UgjVHGxmXE+jXzJmTI4qra7LGHg+IwQBiKap6e7ppVsK9r1Oh/zwr3Kmjnl2ks8O RT385ZWyA0BcS8ip3BSS7R9nDxIIa3ALvDnRv3Apq7MM5UNdcPFq6O7UgNjKRRwm+YIK oSjw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=BxpaWauM; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s5-20020a170902b18500b001ab0c00aec4si9353plr.482.2023.06.01.18.36.20; Thu, 01 Jun 2023 18:36:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=BxpaWauM; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233612AbjFBBfM (ORCPT + 99 others); Thu, 1 Jun 2023 21:35:12 -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 X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767552890287872036?= X-GMAIL-MSGID: =?utf-8?q?1767552890287872036?= 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 Acked-by: David Hildenbrand --- 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: 102273 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp734395vqr; Thu, 1 Jun 2023 18:53:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ72zxL7bW13vSjAHZee6/tJCoKp6qMGBktGngLPK+5qPJ1/1YVoy0buF7KL/U14IHSekVB1 X-Received: by 2002:a05:6a21:9992:b0:f8:1101:c074 with SMTP id ve18-20020a056a21999200b000f81101c074mr12927740pzb.54.1685670798817; Thu, 01 Jun 2023 18:53:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685670798; cv=pass; d=google.com; s=arc-20160816; b=INoighzU5kJhEwHxYg72yqdKzI6d3OfLMHM/KwAuPHgBw3LAAsl0CaeVDvI7hmB640 HjfBUDYnhCzl3IIHjjgHPBjSr4/e6DOr8xoCQKQdcZPrkvZRYaiN4iopFrNL+s2Fsbwz JrQZKnZ0Blr1Fr86lmxUT549xnCdpzrRDzvvbe/Dc65e59bV1MaUwB05UcAKWlZCl71J 2GQllwPIp5rYMN3sQ2Sd8TkFqHg367C5QxeQzniQSYWx0ANA6+C9wBZIxvo8DPyBsgWx H8//lLRpkj+tB6XkMXz0T5+j2Hx0vNO1hXvKvjylAOxYUmsuzkgP/9TuQObkcfnzsSH/ LVEw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=r5fkJHsQy/I9xsX+eBYUykMRunKRT8/bp1kU0wSayko=; b=OT5fr7AhrwYvjRK5Hxk2gxUYtq/e1R0kIewWaSXqoK/stVzhxe2pmAsJJL4+cLwvCz rMjXKseUWCIUhMQsWCvsmm6zk9y3W3bnL0EqiFMtmxNmIhJOanIGswDVyKArxjm1aTRb q3ojfUgpUnYBQmWDoO+5F/wtuJ5IDktJ0shYwfAHfFjErWbN4C9HufzH+XZ6vB8w6QAx ywsya4WM5MnFpI5mbtYUy3bv7eNIcQSQqkutT5y8MKs754Cs+KXoq4lTO3avYJtVmocQ fkpEAU4FWFyAa70HswHbsufu0iOoEx6JlMFxmcqkLoEioSSgoAAKQRYQdMflzQavdfNQ obRw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=pUIPDvP6; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h26-20020a63385a000000b00535bf852410si165400pgn.313.2023.06.01.18.53.04; Thu, 01 Jun 2023 18:53:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=pUIPDvP6; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233631AbjFBBet (ORCPT + 99 others); Thu, 1 Jun 2023 21:34:49 -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 X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767553943315212503?= X-GMAIL-MSGID: =?utf-8?q?1767553943315212503?= These new build products were left out of .gitignore, so add them now. Signed-off-by: John Hubbard Reviewed-by: David Hildenbrand --- 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: 102271 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp731939vqr; Thu, 1 Jun 2023 18:46:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5CXrr5iArlI/jYrxQegAgLc89zgEEFT+D/Rm4DReG9pkFMsroUoadImtukZtaODOOghcsB X-Received: by 2002:a5d:9a8f:0:b0:774:7cdb:1fe4 with SMTP id c15-20020a5d9a8f000000b007747cdb1fe4mr1053858iom.13.1685670399640; Thu, 01 Jun 2023 18:46:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685670399; cv=pass; d=google.com; s=arc-20160816; b=wDLb0jMB8hUjnJ3xNLnC/lb/AnoRP8BirPsRo+PFSyXq2AdN8C+g1ZwXqcEn46ut/p fbTkosgkEiXe28bYYMPFOr7oc4uhCjsACgNav12vTYCDetYYujKacPqmSdK/HL9ua9eg NhVIzbuxHIjrAML7G73ZqKW4ID+KeeHoBeyuNyjs/+JrYmqe5y61OmF+w2kozEaSZW5J o9vw9QcZ5ZWklNukKGouWlsweU/lLxE7EwLi4hr3ho91rzxQwphDxvAbhAMhCNZ3ht63 HVONnTapLfUAE9mMjVYIA04VaLrF1O01qyG/u5P7bOVnPNv5T9J4HXzippLjG9/y45Cq 0cfQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LHHg0GeUqQ9D6ypa+gYCxOv4uIVN5myD0EE5yivIW5Y=; b=nokXxhbKy5AJTSu7prK4C5cT4HvKdh/9BuWRMvAGGuf4XM9OFhzCyd1oElyaW4YPAk RfVBojEKgiiJsXg2qwMgWvWpunDwMg1mCvt982J7q5mfnlldyHVk0sUU1FmwBOg0DLBg txvKlNNo0bazPv/BkKrOHAWFhswLQYY2pySW1FWJEWDrSSky+Xk8z+ak7Sei+VsHTU3e m7JSTfjk1QLl9yQ+giNF86Q1dlOAHagq1WblxXGXikT4JJs2kEKwOO/LAWXhxrMMAUlB KZSuRmri188t54OM07RSYKJrklwGUVF6IQnpD/OYb6SvhnQhQr1mVEGUiJDiP+v+iHrb fRkA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=EA9duJZB; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j70-20020a638b49000000b005348954e07asi182598pge.1.2023.06.01.18.46.27; Thu, 01 Jun 2023 18:46:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=EA9duJZB; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233747AbjFBBe4 (ORCPT + 99 others); Thu, 1 Jun 2023 21:34:56 -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 X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767553524997588808?= X-GMAIL-MSGID: =?utf-8?q?1767553524997588808?= 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:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 102265 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp728193vqr; Thu, 1 Jun 2023 18:35:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Yvz2tiLgksWhZnJ79k/MOxiVcklasNKDoF8l18UeufxIiYuS8SFJOgJsKjmcfjb5aW+gG X-Received: by 2002:a05:6a20:a120:b0:10d:6dc6:32df with SMTP id q32-20020a056a20a12000b0010d6dc632dfmr13775373pzk.34.1685669752046; Thu, 01 Jun 2023 18:35:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685669752; cv=pass; d=google.com; s=arc-20160816; b=E6EeWgUBj2yLTI2C7U8beuG0WhkD1AjE+NozFjRP2EaNcRRtr6weItp7NPSFr8go8n hVa/WLVNAyk/wljeESQEMXodmnwMQovgS+sKrpc45MtvGoiLOvcr/WatRnf6XGjl1+Uv QB/8MUCshqYUX1pDA348TRCOMOkFH+FSX2EKhYME+IvtlGDldeL1WerrP4StxauQp/vh fZx9ZAweg4488QFFQjaWFRfBcddgehpRjtYk+oHqDvOGwwQM0j/cWmmgt2xGxe6qKd1H BjxonRi5q3kUezUD8kCbEx7MvS3h1ccWV50Wrt2wghfYDSttqybyz5ereZJrknT/Yblb 2NbA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=z1uW6Kf9/Kha/rUkpwTG1ftY2f4dCVs//lh76DXglAs=; b=T1IlrQdweZ9tbPM0lOOIjk3OEUC7UA/AZ3vTtDUKjm3MqTI0fqDg2C0orJvbiVCCRz Kbci+G4MQFEB2vaaM9bbvQ+2UnRrFkGMYtada2J4DFwD2WkGuTitHVislldXNN7DlTVk oDy44mbRl7lIkUJJmB0Sgkm/+H3Qoy5mHf09EgSN5r2DIQYplWiHa+MryMrGwRyRPzyF lMIZQAdNhKEwsxGNoAY4ZQhXYjNGkOYaaXo1LMpRhcm4JT21XI4FZfli+h8pqC0yRDZS fMeiFgj1t01eLosKoWeupNE2skkbEGs9xvLemmn2PCi8WBnndOoEJNYPVTSUHAkYDWOi OW4w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=kR9g9yGF; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m14-20020a637d4e000000b0053f24deef14si140101pgn.319.2023.06.01.18.35.37; Thu, 01 Jun 2023 18:35:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=kR9g9yGF; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233609AbjFBBeo (ORCPT + 99 others); Thu, 1 Jun 2023 21:34:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233485AbjFBBej (ORCPT ); Thu, 1 Jun 2023 21:34:39 -0400 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2071.outbound.protection.outlook.com [40.107.101.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25A65F2; Thu, 1 Jun 2023 18:34:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W7YFww84kNcRUrhBWjVUyt577NpdzHrq0QSOGiyiQqdDlptLU+z1L7mhCT9bBX0GHdO1pQoma2K5X504udlGXF0Si84fNcunnQxFleMZ4Z8fcdkR5v7LMr415/FQvQ6FFD0MAGSJ44jZE6jjuWqQeII7stSMzJ/968RsP4r8r2rceaUtQiyG2pFBjpt++SFsRiPnuKL++i7XzrcntCLkRoYN2uG92EQLpRK1M5So5ojvil/yhZOX4o33gCI2+TMZd/+0YRZdZnbpiU01IBgknDbgcDSbmfAKYbN7c2/k6bcR+Gvw9pJTc595HhrFccuCPiIQgs84dzj75cWi1TIDxQ== 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=z1uW6Kf9/Kha/rUkpwTG1ftY2f4dCVs//lh76DXglAs=; b=ilmnOtAM7mlCk3Dg4VD+aJ+xL2WTUpW45OxisQafFwu8L9UXAP1u7MAoQ42MqRNId2npNY+uFEdT37Cb9ptnh6t+/UlM+di0OQvbeTOPyFElSPMjCB7+kY2+Kg7ui4cFyDFGv/hRxXz9BHBqwBJVQIF1ls4T9WFMTW1/sjP8QecSqkaxcbMYHXR9uWWIpscE+6XIGyW282qh4sQYLNcqLiV2cMcp1rlkLCFGShXr1grNGKOzVlspK4Wxha+Uim2mZF8h7s/c7GiTx4+2muOQJnBjqvoqM8HqU/QlRf2jKyUEDrhwPqLSw3T2Bnm15GVBaXPQhe5BsM7JQhg8oWhrvQ== 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=z1uW6Kf9/Kha/rUkpwTG1ftY2f4dCVs//lh76DXglAs=; b=kR9g9yGFk7fjLLK2oHlTitICAeZKu1WRq/mp5PCrdmve6S6qrSWyUC6bPvTLs2DONOoVMAakq4AnmqVGx1oFpemUWioBk1tm2M0PBjndwhaX5U0epbQDJe/tYdA60lSsC2w1XLknFARyTJXAkhHwQmTsHFQ+H2PVMwG/98RXuA9mv/Pj11C/IrmPjp1f68PKJbcB+4rAIpGujMiL2r16XF1vUjgCO3fNhfOEOh3FaVm1wHpI/cEAMtD5HAIlL1uI/TIsBNNGyMmGMZjxHrEvBeG/7moiK41SBYAXnwwkr3YvRe2dwpmTzVUYdJjaiAgV3Wv+yGyf+uY1elooe+C/lg== Received: from DM6PR08CA0029.namprd08.prod.outlook.com (2603:10b6:5:80::42) by DM4PR12MB7671.namprd12.prod.outlook.com (2603:10b6:8:104::17) 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 CY4PEPF0000EDD3.namprd03.prod.outlook.com (2603:10b6:5:80:cafe::a7) by DM6PR08CA0029.outlook.office365.com (2603:10b6:5:80::42) 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:36 +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 CY4PEPF0000EDD3.mail.protection.outlook.com (10.167.241.207) 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:36 +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: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:23 -0700 From: John Hubbard To: Andrew Morton CC: David Hildenbrand , Peter Xu , "Shuah Khan" , Nathan Chancellor , , , LKML , John Hubbard Subject: [PATCH 08/12] selftests/mm: fix a "possibly uninitialized" warning in pkey-x86.h Date: Thu, 1 Jun 2023 18:33:54 -0700 Message-ID: <20230602013358.900637-9-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: CY4PEPF0000EDD3:EE_|DM4PR12MB7671:EE_ X-MS-Office365-Filtering-Correlation-Id: 4cb7bf36-5713-4b5a-e1af-08db63098657 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QYqbbpm3wpqjO5Gtck3nXuKmdUyyk5koYVkwL3pX+c4LzFkorFcPXQ2eMBRDY9PxAyyHldAGuhXX5DC3mo8RI5MRAeYgz4IsstD1MdvAdOPLuas1tXEAaN01cOTtd+8X28+p4KcAaen2aq8jxtEUAACCiPVG7qGhi11kz6GsstReRf5QA1CkzFRedKuRMro7WmdtVairWobw6ut9epwWlepSpWaAj3PS4kbFjvP+ZvJUpydcpL9hEG3zsIfbyur4mhbguU/g6aldfblgCjO0X8rHgseCJY4AZrf+NVZ/u1N4WelWAScw4D3u2qyGe78sUXZMclivs3eLvZFes5+7PMSvzb8/qF1DOmsBRXcyMrjuszdg2Cu31p1GuQtfd4VrhqjeMsmJ0wafCMgMii9uhN+3pL+WGrpX8PXIjphvXau9kcDfc80/uz4ipFckVI8ooefhe29gqsRopBNsdVODDImkdWX+DydJHqMiQkc0XGoPuvRWXO85eA8394zzmv2Dpeu2GPD8YmgRWUNwa5iXR4uXikmsFL5IsM2ToYGOu3zrQ0y1+n9nMY2y0n8zdGYoNMdqO5c9iPHhOWyQgP68Y36+wgDNuC5M4YiLKOA+hvSoVXRaKbodEyDm95N9Krl2B97WAmsMTeTui5CFo9vMrb2ws5AGbq8h9Yfy1Ga3VCKW+7wYmg6sjCNL16m+PqNxiGGR/3XN+jQpaAVEG5YJltQ+DZg1FUIGiaJPqapUaJKRPnGZI3ZujrXjPIlf7l41 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)(396003)(39860400002)(136003)(346002)(376002)(451199021)(46966006)(36840700001)(40470700004)(2616005)(36860700001)(36756003)(426003)(47076005)(83380400001)(336012)(7696005)(6666004)(1076003)(40480700001)(107886003)(26005)(40460700003)(186003)(82310400005)(2906002)(4744005)(316002)(5660300002)(41300700001)(86362001)(70206006)(70586007)(4326008)(6916009)(54906003)(356005)(82740400003)(7636003)(8936002)(478600001)(8676002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 01:34:36.1725 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4cb7bf36-5713-4b5a-e1af-08db63098657 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: CY4PEPF0000EDD3.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB7671 X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767552846166473293?= X-GMAIL-MSGID: =?utf-8?q?1767552846166473293?= This fixes a real bug, too, because xstate_size() was assuming that the stack variable xstate_size was initialized to zero. That's not guaranteed nor even especially likely. Signed-off-by: John Hubbard Reviewed-by: David Hildenbrand --- tools/testing/selftests/mm/pkey-x86.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/mm/pkey-x86.h b/tools/testing/selftests/mm/pkey-x86.h index 72c14cd3ddc7..e32ae8a1cd99 100644 --- a/tools/testing/selftests/mm/pkey-x86.h +++ b/tools/testing/selftests/mm/pkey-x86.h @@ -132,7 +132,7 @@ int pkey_reg_xstate_offset(void) unsigned int ecx; unsigned int edx; int xstate_offset; - int xstate_size; + int xstate_size = 0; unsigned long XSTATE_CPUID = 0xd; int leaf; 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: 102276 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp735003vqr; Thu, 1 Jun 2023 18:55:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7CkKBQ5JCvwTJ0GyenU/+5h5Eh8WHl+ms2xJ6GomJd87TaIBV/lRTu5Lk/QvDmELnSnWHU X-Received: by 2002:a05:6808:606:b0:398:4465:ed25 with SMTP id y6-20020a056808060600b003984465ed25mr895211oih.37.1685670902467; Thu, 01 Jun 2023 18:55:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685670902; cv=pass; d=google.com; s=arc-20160816; b=dW6TOvLWZuLS8kpr0mHOsvRJoApzr/XKzf0hDBiyeeit04Kk1vWLsdWeLqSPWKhwQ3 Td4tKfl8133hw2y+rBmXwF7EHCDfgrr2hJLd6tp2E7nHC+VmCjAWeyRdaz6XZZVbL0pT P8woz7OZ2PYdiux8psUkBKyn8l09RIoldMSsx6KOPTWzQfouyiiYhedXoriPMI2aXqfT j6g5NY+KqJT77kVmA3PpgwSx35o7fv5S6eIUt8Ld5QKSF4DQjCpfDET+BQPKC5ejrMW6 USdrK6MPaK0EDntcyvJoHf3CaM1KegOh8NW1E19JsY1ZbHMVoEE5jIAc8EE35n6qGpow qzWw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HSj/wHWVVrHTw92AisT3rGa5w70JG1HYobjvIzezNpw=; b=u7E+Y4oV+NQhc5Nvj8YaIxtPeUSwwq0nfnyIpEtzR3iM7dZSllk0tOt+h4XBG3eEr+ t4tGp8VvUlcICuZbeJ0hHwJ915HuCSf1Hphg1HWVZWzlLZi8vYGWHx5vWRD8HPzOYsi8 1XKBaiqKaXmAAIgKYlnOPzH8MM7M9+G2fSQBeKspWXcFuCHwH+tStXu4XuzK2zBXN1IK JVTWC/xtC1ZDDOGm/s5aS2ZmNhghOLNEucOpvOZd6QSmZItoC9HLcfuw9SlwEC+FzuL0 1BEnejUvpVVqMxTkFXJ+u5wFc48GTI7HI+DIHvlB0VpoAfYAQnbT+qF09sNjaWYyq+jw DsZg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=mbLOle6B; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r9-20020aa79889000000b0063b60063f55si4924319pfl.382.2023.06.01.18.54.48; Thu, 01 Jun 2023 18:55:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=mbLOle6B; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233301AbjFBBfc (ORCPT + 99 others); Thu, 1 Jun 2023 21:35:32 -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 X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767554052326824711?= X-GMAIL-MSGID: =?utf-8?q?1767554052326824711?= 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); From patchwork Fri Jun 2 01:33:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 102268 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp728927vqr; Thu, 1 Jun 2023 18:37:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6ANF6bqx0V8woGUlSC04+iQFR32ixVq/vIGMfqoM12sQRk2qfUhC9YQ4PgQ3OV7+AF8CS5 X-Received: by 2002:a05:6358:7203:b0:123:12e4:2734 with SMTP id h3-20020a056358720300b0012312e42734mr4957186rwa.5.1685669871984; Thu, 01 Jun 2023 18:37:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685669871; cv=pass; d=google.com; s=arc-20160816; b=EWrgXaVgKmTb1QJTeLujq9Kn9MSnR2SBCEcObI4qtNWoHioouVLphQbqe8vHxe+ffN iiY/hIiORwTXbzUP+JYVrjJlIBvkeCK1De8XIzSqdntgfMaUdXC9xehrNT/Ukcfx6vPc Iz5i4KuGDYQJbE4JH4aozx2vnf+DePFzJRDMBjnxZ4HnnnW694GGr7tyWqKbhYOG0wQq Jj3C+VKuzmsfnARs+oJiI8g8q01IwE5v0TNQY88wrS8ObhI7Bp3uxs9H2xowWroxrXWj Lq923F6fbxxOR+As+wIzPYgm6ztRAmvmchkmXyrlzehxyxt4mnbJsbXQei+UTTrlRtjw 0W4w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BwVcUOMqZLM7gwVoTqIEsDPdbuxXOZ2xBf9Z8mxq38g=; b=Qw3cczslo4X62abfhIsEUtCyqWIkC9zIl6dUtgBCq27dwvi51aNXWkLeVyw8UKgY6C e78dCB7rLct9jdpGkgXCnH/MRzU3AmGpjC+SnowJhShBdRfXuiidB3hahqNp+JG6KtjP SA4Q0Z1jj8kfLBCpFi6+yG0ofmJ+xreuNAJLcfQ6AMvIrllLNZz28gg/h+Ya3Ddv4bNO FfuHrWfQKk7AtxX5M7fv0zk35skNE4Wav8rFw0Sf5WPgK6pCYHkqADi8bYQbYvuf2aek 3abTYPIIFIJ6gTiyGcPwT5xyw169dm5fOrG2Cj5Mb0h5TfsNWTeXXWulEw6Y2hc/VbMW wu6g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=fe57i6iG; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e4-20020a636904000000b00530b7ef148asi100407pgc.894.2023.06.01.18.37.37; Thu, 01 Jun 2023 18:37:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=fe57i6iG; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233084AbjFBBf3 (ORCPT + 99 others); Thu, 1 Jun 2023 21:35:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233655AbjFBBev (ORCPT ); Thu, 1 Jun 2023 21:34:51 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2083.outbound.protection.outlook.com [40.107.92.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6917E19D; Thu, 1 Jun 2023 18:34:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XVGIelF0HBoANuS+V83zdySgkAEufBq7QwA6DfCQDQV6sl/ytDoyh0IpO0S1OCIBs5+JSOe/z1MNa1TUZHYDSahdyze8c+IUc3JRn3nEtVn85EkC0nFIRQojdADbiairKnG3WnFlXF/5uK3eMQSWAK0aOAnt9myhPRuFzfl8L3cAsTamA1ZrHEUBOFYT/0zd8WDzsZxHiLqvNoLGwSBEGfp1PM8VgdusQ8E0CBkk0eefOOtRwDb/1TqiJVjGAsCuoR7Bk0vICdoqM+Dg/PfkaBJM2nmIRL6NYdAZ1GOMrWZZyIu/2p+XAPEtw9d02zd0VPlDiMqkWCMKrx5BjCQzWA== 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=BwVcUOMqZLM7gwVoTqIEsDPdbuxXOZ2xBf9Z8mxq38g=; b=mVLwpPC2O56O3oY/9K5QB7CSHyKp2ye8yK2dyUC4RNjzbbNaRmyM4mjzACTDh4OIpeKU+gNFhW5fncIGaMwbBZtMiVv5XRb+tWh/BnEUlkTjuTvXdRJT7mAv6QRyMqELs+BaHhEGYzvQnSysmiTxJyD+u7qS4ue3Z2f2l+pGhMk+qsxR8uz8I+eeloy887hw2uY+TAupn9eHH4x1/kB4aLsnUbB9S7nDELuuI+sMNeLo7jJcyd4Pp1rF1BXyUkR8Cr1Fnmr2D+GzBV6PeGdLrYRoWVI+giTTgjSy3rtbvoJoDo2kOLK/fwACe3HFwfufvvmsy4QAGSKemz1M3iKmrg== 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=BwVcUOMqZLM7gwVoTqIEsDPdbuxXOZ2xBf9Z8mxq38g=; b=fe57i6iGd6XvPpkO/bmz1ideUzkAHfnv+JaqkSTsG+PgydbXRupoksg8bIRMWrC1TgKRVtbj7nl0gUx8FQh56a2jo0g/keIixkF/6lnIubzMvqZ7W5SJioX0RN6bdue5s+kK+yTYpXiQBOOPmTNwgNpnaeOX7boIwmoVXz8E1F6T64L4SXoeldTvt4eXLYJplYpWRrENJk3ePjWOza8L6kD85aIkwpG/pWDQf/xhZpIh6tdLkP0nSOaU2cMcYUvD8pE8T9e9oWRvpNoxSn662Piwl4xSQC+ZeOBilk+U/R9YK5wtZ/qI0ZGwyd9Wr9z2srvq21y5DXBwwQatILIDew== Received: from SJ0PR03CA0267.namprd03.prod.outlook.com (2603:10b6:a03:3a0::32) by MW4PR12MB7382.namprd12.prod.outlook.com (2603:10b6:303:22b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.22; Fri, 2 Jun 2023 01:34:42 +0000 Received: from CO1NAM11FT022.eop-nam11.prod.protection.outlook.com (2603:10b6:a03:3a0:cafe::52) by SJ0PR03CA0267.outlook.office365.com (2603:10b6:a03:3a0::32) 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:42 +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 CO1NAM11FT022.mail.protection.outlook.com (10.13.175.199) 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:42 +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:24 -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:24 -0700 From: John Hubbard To: Andrew Morton CC: David Hildenbrand , Peter Xu , "Shuah Khan" , Nathan Chancellor , , , LKML , John Hubbard Subject: [PATCH 10/12] selftests/mm: move uffd* routines from vm_util.c to uffd-common.c Date: Thu, 1 Jun 2023 18:33:56 -0700 Message-ID: <20230602013358.900637-11-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: CO1NAM11FT022:EE_|MW4PR12MB7382:EE_ X-MS-Office365-Filtering-Correlation-Id: 81779cc5-11c5-4d4a-a888-08db630989ff X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: i/NO7+cycqIntGtCd6g7ClKH86vxHUe1GHVNbPuP+W5hzUjPhZd+aU3Dk+py9DVqGK/MV1kEvV06Zdp2eQIY8YJDbq4NqT5o5+tTo24PvBjBq4XjbqyuhHzabLHZUKskSzYdjNLtOpJTo3BRucmJG6GmWpvuWkMzCAWj+zjxmFS5t8r/jZcNxQR8R2ph87mYAPxwEXjZzhwhvibPYsC1FARAkpRmVj9c/EUW5FKNg8021/rwIx2d7hOagpppCyRvkxcaD88QCikqa/eC8jbQGbhxW34X3QxLvlUiwuAQ7UsJ/sWCwbJZZdR/3fWYLiW+YMqNmYlaICbxFFisHSHbHPzoFAvN1c4wndeBvbqV63ScV9XTnmdunlx2xn12cYzuMyuxgfEV/DwVpTfiPVn2x9z9PpOES53tKkBYHtCRaujWNU3p/pw1k/DW9n/OkX9s+DdQCtmaqzbKXZpWwTQBx1mFhfGx63rQ9TtmuPQNZH9bzeceuQIoEa6y4LELkbThQ8eYk0yqGKlywAOAaOXqTf+ZCf6kvKdx771LjHvhAF17kyw0YvmKrJPTTWFiFN3VZ8cwMAsibgoHfYS71pcISHDrjy+KN6ck1p9Hji/6ujDecLJC981VxCgyFTN/HUtf8aXtfie3iur9d7wz+XFhEdiRhGZ+0lPJhGZzIID5b2f47ZiRxxm40rpvdlMvxXoZWg7kiCRrr4TnFyqCAj4ALmiGUszp4vCm5usqckv5cwJ/fdgHfZDh08iqiOGyIl0R 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)(39860400002)(136003)(346002)(376002)(396003)(451199021)(46966006)(40470700004)(36840700001)(83380400001)(40460700003)(36860700001)(86362001)(47076005)(316002)(7636003)(70206006)(70586007)(5660300002)(107886003)(4326008)(36756003)(6666004)(82310400005)(6916009)(40480700001)(8936002)(82740400003)(356005)(8676002)(7696005)(41300700001)(54906003)(2906002)(2616005)(26005)(186003)(426003)(478600001)(336012)(1076003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 01:34:42.2583 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 81779cc5-11c5-4d4a-a888-08db630989ff 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: CO1NAM11FT022.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7382 X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767552971698620021?= X-GMAIL-MSGID: =?utf-8?q?1767552971698620021?= This is where they belong, and this makes it cleaner to apply a follow-up fix to the uffd builds. Signed-off-by: John Hubbard --- tools/testing/selftests/mm/Makefile | 7 +- tools/testing/selftests/mm/hugepage-mremap.c | 2 +- .../selftests/mm/ksm_functional_tests.c | 2 +- tools/testing/selftests/mm/uffd-common.c | 105 ++++++++++++++++++ tools/testing/selftests/mm/uffd-common.h | 12 +- tools/testing/selftests/mm/vm_util.c | 104 ----------------- tools/testing/selftests/mm/vm_util.h | 10 -- 7 files changed, 122 insertions(+), 120 deletions(-) diff --git a/tools/testing/selftests/mm/Makefile b/tools/testing/selftests/mm/Makefile index 473bf1811552..9bf3305b7dea 100644 --- a/tools/testing/selftests/mm/Makefile +++ b/tools/testing/selftests/mm/Makefile @@ -109,8 +109,11 @@ include ../lib.mk $(TEST_GEN_PROGS): vm_util.c -$(OUTPUT)/uffd-stress: uffd-common.c -$(OUTPUT)/uffd-unit-tests: uffd-common.c +$(OUTPUT)/uffd-stress: uffd-common.c +$(OUTPUT)/uffd-unit-tests: uffd-common.c +$(OUTPUT)/hugepage-mremap: uffd-common.c +$(OUTPUT)/write_to_hugetlbfs: uffd-common.c +$(OUTPUT)/ksm_functional_tests: uffd-common.c ifeq ($(MACHINE),x86_64) BINARIES_32 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_32)) diff --git a/tools/testing/selftests/mm/hugepage-mremap.c b/tools/testing/selftests/mm/hugepage-mremap.c index cabd0084f57b..8158fe909f5e 100644 --- a/tools/testing/selftests/mm/hugepage-mremap.c +++ b/tools/testing/selftests/mm/hugepage-mremap.c @@ -24,7 +24,7 @@ #include #include #include -#include "vm_util.h" +#include "uffd-common.h" #define DEFAULT_LENGTH_MB 10UL #define MB_TO_BYTES(x) (x * 1024 * 1024) diff --git a/tools/testing/selftests/mm/ksm_functional_tests.c b/tools/testing/selftests/mm/ksm_functional_tests.c index 26853badae70..648188ad73fa 100644 --- a/tools/testing/selftests/mm/ksm_functional_tests.c +++ b/tools/testing/selftests/mm/ksm_functional_tests.c @@ -22,7 +22,7 @@ #include #include "../kselftest.h" -#include "vm_util.h" +#include "uffd-common.h" #define KiB 1024u #define MiB (1024 * KiB) diff --git a/tools/testing/selftests/mm/uffd-common.c b/tools/testing/selftests/mm/uffd-common.c index 61c6250adf93..e1ad63668a05 100644 --- a/tools/testing/selftests/mm/uffd-common.c +++ b/tools/testing/selftests/mm/uffd-common.c @@ -6,6 +6,7 @@ */ #include "uffd-common.h" +#include "vm_util.h" #define BASE_PMD_ADDR ((void *)(1UL << 30)) @@ -616,3 +617,107 @@ int copy_page(int ufd, unsigned long offset, bool wp) { return __copy_page(ufd, offset, false, wp); } + +/* If `ioctls' non-NULL, the allowed ioctls will be returned into the var */ +int uffd_register_with_ioctls(int uffd, void *addr, uint64_t len, + bool miss, bool wp, bool minor, uint64_t *ioctls) +{ + struct uffdio_register uffdio_register = { 0 }; + uint64_t mode = 0; + int ret = 0; + + if (miss) + mode |= UFFDIO_REGISTER_MODE_MISSING; + if (wp) + mode |= UFFDIO_REGISTER_MODE_WP; + if (minor) + mode |= UFFDIO_REGISTER_MODE_MINOR; + + uffdio_register.range.start = (unsigned long)addr; + uffdio_register.range.len = len; + uffdio_register.mode = mode; + + if (ioctl(uffd, UFFDIO_REGISTER, &uffdio_register) == -1) + ret = -errno; + else if (ioctls) + *ioctls = uffdio_register.ioctls; + + return ret; +} + +int uffd_register(int uffd, void *addr, uint64_t len, + bool miss, bool wp, bool minor) +{ + return uffd_register_with_ioctls(uffd, addr, len, + miss, wp, minor, NULL); +} + +int uffd_unregister(int uffd, void *addr, uint64_t len) +{ + struct uffdio_range range = { .start = (uintptr_t)addr, .len = len }; + int ret = 0; + + if (ioctl(uffd, UFFDIO_UNREGISTER, &range) == -1) + ret = -errno; + + return ret; +} + +int uffd_open_dev(unsigned int flags) +{ + int fd, uffd; + + fd = open("/dev/userfaultfd", O_RDWR | O_CLOEXEC); + if (fd < 0) + return fd; + uffd = ioctl(fd, USERFAULTFD_IOC_NEW, flags); + close(fd); + + return uffd; +} + +int uffd_open_sys(unsigned int flags) +{ +#ifdef __NR_userfaultfd + return syscall(__NR_userfaultfd, flags); +#else + return -1; +#endif +} + +int uffd_open(unsigned int flags) +{ + int uffd = uffd_open_sys(flags); + + if (uffd < 0) + uffd = uffd_open_dev(flags); + + return uffd; +} + +int uffd_get_features(uint64_t *features) +{ + struct uffdio_api uffdio_api = { .api = UFFD_API, .features = 0 }; + /* + * This should by default work in most kernels; the feature list + * will be the same no matter what we pass in here. + */ + int fd = uffd_open(UFFD_USER_MODE_ONLY); + + if (fd < 0) + /* Maybe the kernel is older than user-only mode? */ + fd = uffd_open(0); + + if (fd < 0) + return fd; + + if (ioctl(fd, UFFDIO_API, &uffdio_api)) { + close(fd); + return -errno; + } + + *features = uffdio_api.features; + close(fd); + + return 0; +} diff --git a/tools/testing/selftests/mm/uffd-common.h b/tools/testing/selftests/mm/uffd-common.h index 6068f2346b86..a1cdb78c0762 100644 --- a/tools/testing/selftests/mm/uffd-common.h +++ b/tools/testing/selftests/mm/uffd-common.h @@ -19,8 +19,6 @@ #include #include #include -#include -#include #include #include #include @@ -110,6 +108,16 @@ int __copy_page(int ufd, unsigned long offset, bool retry, bool wp); int copy_page(int ufd, unsigned long offset, bool wp); void *uffd_poll_thread(void *arg); +int uffd_register(int uffd, void *addr, uint64_t len, + bool miss, bool wp, bool minor); +int uffd_unregister(int uffd, void *addr, uint64_t len); +int uffd_open_dev(unsigned int flags); +int uffd_open_sys(unsigned int flags); +int uffd_open(unsigned int flags); +int uffd_get_features(uint64_t *features); +int uffd_register_with_ioctls(int uffd, void *addr, uint64_t len, + bool miss, bool wp, bool minor, uint64_t *ioctls); + #define TEST_ANON 1 #define TEST_HUGETLB 2 #define TEST_SHMEM 3 diff --git a/tools/testing/selftests/mm/vm_util.c b/tools/testing/selftests/mm/vm_util.c index 01296c17df02..c64a0134f83c 100644 --- a/tools/testing/selftests/mm/vm_util.c +++ b/tools/testing/selftests/mm/vm_util.c @@ -198,110 +198,6 @@ unsigned long default_huge_page_size(void) return hps; } -/* If `ioctls' non-NULL, the allowed ioctls will be returned into the var */ -int uffd_register_with_ioctls(int uffd, void *addr, uint64_t len, - bool miss, bool wp, bool minor, uint64_t *ioctls) -{ - struct uffdio_register uffdio_register = { 0 }; - uint64_t mode = 0; - int ret = 0; - - if (miss) - mode |= UFFDIO_REGISTER_MODE_MISSING; - if (wp) - mode |= UFFDIO_REGISTER_MODE_WP; - if (minor) - mode |= UFFDIO_REGISTER_MODE_MINOR; - - uffdio_register.range.start = (unsigned long)addr; - uffdio_register.range.len = len; - uffdio_register.mode = mode; - - if (ioctl(uffd, UFFDIO_REGISTER, &uffdio_register) == -1) - ret = -errno; - else if (ioctls) - *ioctls = uffdio_register.ioctls; - - return ret; -} - -int uffd_register(int uffd, void *addr, uint64_t len, - bool miss, bool wp, bool minor) -{ - return uffd_register_with_ioctls(uffd, addr, len, - miss, wp, minor, NULL); -} - -int uffd_unregister(int uffd, void *addr, uint64_t len) -{ - struct uffdio_range range = { .start = (uintptr_t)addr, .len = len }; - int ret = 0; - - if (ioctl(uffd, UFFDIO_UNREGISTER, &range) == -1) - ret = -errno; - - return ret; -} - -int uffd_open_dev(unsigned int flags) -{ - int fd, uffd; - - fd = open("/dev/userfaultfd", O_RDWR | O_CLOEXEC); - if (fd < 0) - return fd; - uffd = ioctl(fd, USERFAULTFD_IOC_NEW, flags); - close(fd); - - return uffd; -} - -int uffd_open_sys(unsigned int flags) -{ -#ifdef __NR_userfaultfd - return syscall(__NR_userfaultfd, flags); -#else - return -1; -#endif -} - -int uffd_open(unsigned int flags) -{ - int uffd = uffd_open_sys(flags); - - if (uffd < 0) - uffd = uffd_open_dev(flags); - - return uffd; -} - -int uffd_get_features(uint64_t *features) -{ - struct uffdio_api uffdio_api = { .api = UFFD_API, .features = 0 }; - /* - * This should by default work in most kernels; the feature list - * will be the same no matter what we pass in here. - */ - int fd = uffd_open(UFFD_USER_MODE_ONLY); - - if (fd < 0) - /* Maybe the kernel is older than user-only mode? */ - fd = uffd_open(0); - - if (fd < 0) - return fd; - - if (ioctl(fd, UFFDIO_API, &uffdio_api)) { - close(fd); - return -errno; - } - - *features = uffdio_api.features; - close(fd); - - return 0; -} - unsigned int psize(void) { if (!__page_size) diff --git a/tools/testing/selftests/mm/vm_util.h b/tools/testing/selftests/mm/vm_util.h index 232ffeb5805c..7f5aac0ac680 100644 --- a/tools/testing/selftests/mm/vm_util.h +++ b/tools/testing/selftests/mm/vm_util.h @@ -33,16 +33,6 @@ bool check_huge_shmem(void *addr, int nr_hpages, uint64_t hpage_size); int64_t allocate_transhuge(void *ptr, int pagemap_fd); unsigned long default_huge_page_size(void); -int uffd_register(int uffd, void *addr, uint64_t len, - bool miss, bool wp, bool minor); -int uffd_unregister(int uffd, void *addr, uint64_t len); -int uffd_open_dev(unsigned int flags); -int uffd_open_sys(unsigned int flags); -int uffd_open(unsigned int flags); -int uffd_get_features(uint64_t *features); -int uffd_register_with_ioctls(int uffd, void *addr, uint64_t len, - bool miss, bool wp, bool minor, uint64_t *ioctls); - /* * On ppc64 this will only work with radix 2M hugepage size */ From patchwork Fri Jun 2 01:33:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 102269 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp729896vqr; Thu, 1 Jun 2023 18:40:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6KZibEXPMye+nocn9r4cc7KVkL38qRjNkn5kn1GASdLmqX8QuMzDTqmbYnMmhmpBMIuCl+ X-Received: by 2002:a17:902:ea10:b0:1ac:84dd:6d1f with SMTP id s16-20020a170902ea1000b001ac84dd6d1fmr1379692plg.1.1685670044313; Thu, 01 Jun 2023 18:40:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685670044; cv=pass; d=google.com; s=arc-20160816; b=eAcU6LG1TdGacY8F1yp1h/e0wqdKU+ZsSQm3c+62SLMUM9nWlvU0rdnaIvLEKU3Rgc 4G55vsZDjhtQuaPdsj7wHzu4C7Uo1REAmCb9ahCq78ZKp8U7CawBENpL5utFoSjAElgz Nx0ChnQNbm5Lec+BfgfR75svsx7S7MWesVxszlLBTY0+PC2s2E5MUMhqNAGIb1J8h3id o0gms0k90G4seRvU0SgjT2QSUvP00ZHOuCHC4cJMFgMtAF6n2z5iN6L1GnNvjhH6MXIu tS+ovJu45eZXqBOaJPjXLbsV0ewNWYNP0mmkyPntUJzSLsk/JG/ixaPqueaHPYo177fA 11ew== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7WnTO4qxAw/9Yvsnqt/NPZv6wDuq0Yr6MQhOsWHeeSM=; b=NwZPzoloenKdwze+OMBN/sexwQsfc73LUoSUkOOfFUk+l/pkt9qey8UyWPcxbBwx02 S8p/OQ2RAhZV827uPdiHtMsrfop4I5d1hrcRIT7UEePeHEoTCd2M+vBBvZlkoU/CS66N dPRiEJczby7zUpzXu8ni6/8lPn823NAT6Q9OPZB5UaO7ubjFiE5RHn3py8FlSmu4Dr1a Qq7wW2DaynycoQwdFNteTn0E09Vc0cJ1BQ5fXrg0ZVPUsCplFucgcOoMfr4/nkU3FOpf 5K6Yf4AqrZBnIIYKAsyKDuEv0cXPqzoH7RrLchmPpLAqTUHn/kjujVxxjbf/TNKHQfyJ yKPQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="FQ/CHSsc"; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o7-20020a170902778700b001afbb27f554si8052pll.623.2023.06.01.18.40.30; Thu, 01 Jun 2023 18:40:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="FQ/CHSsc"; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233767AbjFBBfW (ORCPT + 99 others); Thu, 1 Jun 2023 21:35:22 -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 S233657AbjFBBev (ORCPT ); Thu, 1 Jun 2023 21:34:51 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2085.outbound.protection.outlook.com [40.107.223.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC9941A5; Thu, 1 Jun 2023 18:34:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HYErdeT95hdOa/5Plqw2IY3SQlK89prejzcHqkj7YIZOmAWn+J8Sr0yhajPbIyNgPqXV+elib8KlE1W6Ufndm0Bt0+9QAuQ0idGei5Mi2lq2a7hD0Y8+HUIAuORS27X4PZ0NBfG4xZYmzmIF2KhJq1lHVNzsH46tsKc/qzNBC/xZkYmEpxfaizXflMSbyHXydJPqLXUiAFrd47iBbrM+yc5/9CUd1uoo1cgEeAHtYSgJG/rXSFzSco+1MAtEG/IGFIJ1mt0h9TU5xHS5Hx/0WGnu9xeRaj1u6ellHFtRscRCvuMauVisyXBbZOkv/s3sWGqN8WZnojQiKsT8nmWH2Q== 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=7WnTO4qxAw/9Yvsnqt/NPZv6wDuq0Yr6MQhOsWHeeSM=; b=HSXAzDLHVVXtM6C24A2fDRtUEZJleNQ6ExybU3g3kEQSkS2qlgnczfmh4ZIJa4PKXfU0V/Yywx4AfEDWV7DAxdL7v2+QLX1M1yL9lpj86iiYGW/sO8y1TlXuFcAsFmyD3Ocjod+UrLCPzp1eL5Dw150lqmhsoiHqNjnnruNmhmP7x0fiZXKVg6ERBDjhmSrqjykQENoUZqVEa4Ym3ekTfzLIHcgAuUP+MXrnvsV3NUUSKN6uLcnnTekxaOz9HcL5NCnP1/1qbdT6PFCZcjkz5luanSBZW0cTwYiQsA2GA4uQJJ7dIjDrA3u+BJ6+Ors8WpYyLP+jBAkF6VvPXjh3Dg== 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=7WnTO4qxAw/9Yvsnqt/NPZv6wDuq0Yr6MQhOsWHeeSM=; b=FQ/CHSscA02/U93aveyxcJS1aaLiYXliF1Qkd0QWuxrc/KPxvZE1UzbcriLan6FItYpwL5XHih8NReMnD7uGI0mWrL06Pu3tdnT8BXrcoqcgFM37Vu84fZXoMXMqdDQEgV1kyecQgP80H5mjA9/scgQ8CFvpJsb92uTICe/ctZ6Cf9Sr/BQDC/ytRu/A5y14mGYuV0mQGi5pelnbTvLX+vnObw/EWegkQiUnDteAk9P+w8E0rt2YT6y+9myExXyuXJRwydtIUg4Im7o9nPZ9Nv7OAbBqg63xGnKJ6xDioN7oPVyyl/7fAfvsUW5ADiJT/TcAzay0JB0vA+oh2fN9qw== Received: from CYZPR19CA0020.namprd19.prod.outlook.com (2603:10b6:930:8e::12) by BY5PR12MB4273.namprd12.prod.outlook.com (2603:10b6:a03:212::16) 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:39 +0000 Received: from CY4PEPF0000EDD2.namprd03.prod.outlook.com (2603:10b6:930:8e:cafe::10) by CYZPR19CA0020.outlook.office365.com (2603:10b6:930:8e::12) 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.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:38 +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:25 -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:25 -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:24 -0700 From: John Hubbard To: Andrew Morton CC: David Hildenbrand , Peter Xu , "Shuah Khan" , Nathan Chancellor , , , LKML , John Hubbard Subject: [PATCH 11/12] selftests/mm: fix missing UFFDIO_CONTINUE_MODE_WP and similar build failures Date: Thu, 1 Jun 2023 18:33:57 -0700 Message-ID: <20230602013358.900637-12-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_|BY5PR12MB4273:EE_ X-MS-Office365-Filtering-Correlation-Id: cc5462ff-b8b9-437d-4932-08db630987fe X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3djDqDQyk/cF+6fOCiZ3tunUgGsyErx6IxMNkWZ/LO1TFP9JDR3WEeKgKPBickci4I3u9N/fwNQH7pLKLSFWtRMXPzIwRX2msxSZjMw/6IUggqNmM87dlV9KF5htV4mKWL94HtxQUD5NLFTKAPEnNZ1J52F6/kOwoKpThh+2iuu0pV71UdQCHkZamooQQL9xGY7EknL0cy4Yps0Tc60yDiqJxrMpuO8syf3LZlZ0lA4kYxFQq0HH8GMU+N7Nw7FIw/OO8CPW+7D/jCsXsC/JI2SSGY6rnpT88hKp/LVbiDJdNclZeIWgbXcVBaa0af13VcPvAJ4xUiU5UqE2XtYe8Gp4s0w3gWIohBYomqfiR4TesErfjFDEZzOeBPY7P1S/cip8K0bn9sPEdwdl28qMJbftRg5uSr+7TLhxZ3CfjJPR5OSMcR1gzIsiKZNlx/nqu1t1AokciSAdCQCS761/j/iJ7D2MFFtvb1WnJg7PtDWlO7FsaPEnS2VIHTNQgN1RLm8AWQVqttO3GQAEfxrooOFc5NamJ/HTWfZQ8iAOAh+RPao9cqkEuS3y55/t0pZXKyLdhdq8UYLVETJBuEq2lJ8FfS683/+HeAGDEmvfsKHWS/rqMTtE5whOKXHqJnNx/9CMpI04sVqTpJah7ZctW1nTr4SmpZwczUSE2ckSZZHg+dYu4KTR8QEG/zN4fpBqOgYv8k8OikOsdRy5sKKDP3ssogiwBe127GdT/dw84v0= 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)(396003)(39860400002)(346002)(136003)(376002)(451199021)(36840700001)(40470700004)(46966006)(2616005)(47076005)(83380400001)(336012)(86362001)(70586007)(6916009)(70206006)(186003)(4326008)(7636003)(356005)(36756003)(82740400003)(36860700001)(426003)(26005)(1076003)(2906002)(8936002)(40460700003)(8676002)(5660300002)(54906003)(107886003)(7696005)(41300700001)(6666004)(40480700001)(82310400005)(478600001)(316002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 01:34:38.9407 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cc5462ff-b8b9-437d-4932-08db630987fe 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: BY5PR12MB4273 X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767553152512756737?= X-GMAIL-MSGID: =?utf-8?q?1767553152512756737?= UFFDIO_CONTINUE_MODE_WP, UFFD_FEATURE_WP_UNPOPULATED, USERFAULTFD_IOC, and USERFAULTFD_IOC_NEW are needed lately, but they are not in my host (Arch Linux) distro's userfaultfd.h yet. So put them in here. A better approach would be to include the uapi version of userfaultfd.h from the kernel tree, but that currently fails with rather difficult linker problems (__packed is defined multiple times, ugg), so defer that to another day and just fix the build for now. Signed-off-by: John Hubbard Acked-by: David Hildenbrand --- tools/testing/selftests/mm/uffd-common.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tools/testing/selftests/mm/uffd-common.h b/tools/testing/selftests/mm/uffd-common.h index a1cdb78c0762..98847e41ecf9 100644 --- a/tools/testing/selftests/mm/uffd-common.h +++ b/tools/testing/selftests/mm/uffd-common.h @@ -36,6 +36,23 @@ #define UFFD_FLAGS (O_CLOEXEC | O_NONBLOCK | UFFD_USER_MODE_ONLY) +#ifndef UFFDIO_CONTINUE_MODE_WP +#define UFFDIO_CONTINUE_MODE_WP ((__u64)1<<1) +#endif + +#ifndef UFFD_FEATURE_WP_UNPOPULATED +#define UFFD_FEATURE_WP_UNPOPULATED (1<<13) +#endif + +/* ioctls for /dev/userfaultfd */ +#ifndef USERFAULTFD_IOC +#define USERFAULTFD_IOC 0xAA +#endif + +#ifndef USERFAULTFD_IOC_NEW +#define USERFAULTFD_IOC_NEW _IO(USERFAULTFD_IOC, 0x00) +#endif + #define _err(fmt, ...) \ do { \ int ret = errno; \ From patchwork Fri Jun 2 01:33:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 102275 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp734903vqr; Thu, 1 Jun 2023 18:54:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5zPR9IupDToVv7DQvXSQP0GTxj8ETn7Pce1a9OmjQaR59BZUffoYJnRX3rxvMSaXgjMukt X-Received: by 2002:a17:903:428d:b0:1ad:e633:ee96 with SMTP id ju13-20020a170903428d00b001ade633ee96mr690539plb.55.1685670885612; Thu, 01 Jun 2023 18:54:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685670885; cv=pass; d=google.com; s=arc-20160816; b=lDHOhxWCtJVVJ7W32OkoqJD4F782eR2Owzl1UEMvw/9O7hYnqiyJf3dcvw7IECYROr tbFQ/Dx9I2JGi7hnG237/RpldX85AA7dRrZBcuIMX4kakxVDQe+ptOrJQPPY9yXf5MF1 NU/3cG8wII1EadhoEHScKTke8z9pSGfGuS/FVJC/NiLkaAB8OQDdHZJwiuF/aYMfJLoy 26hNhCeyeQCzgNKZSD1SQJXYSDCcBIj/yMQ+TZJv37N9Hwnbrr2/8HVMrQDxHgGSlCCo P/0q3BafaeUMGe7r/4xH69r6sxsvErLwg635Rrnk6nLK1ehy4KVESvS7W/xUPEBEYOSi Q+Sg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=V2zFYpTri2qrz4Mp/GE988kN6uRjrv5qlwoCMnNc/9Q=; b=fiJ+Hk0fdVQGfFS0zebhcBmgCyMiIZ1i8MdXiUVHcHudavSVq24iNPvuwVh/XCM2d8 ZEDLVNwGH8/D80/lYn7IOYUCMY/IMieW16hsjNvcyr0Kl/HcmxRouu566SJbIGXzpFO4 gPXb2wquGSAMxfbfouzKlL8ZNRpdK032jacLy0LAwuWMd6FMfxeFvSuKcETi6DHmuxSY t354v9OZziza+UnUMdPhw6FSm8qENODfasujKH+1fGZBT8HoJKbf/9fEBCdT+pE1EplO tkshjUH1gfe58lXwwiijdcmhqQTEfnZOBJN61XYOuDrzY0vNaQ+GKmm2BkDwpAKUmxA6 C26A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=N3mE7C2R; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l15-20020a170903120f00b001ac6a6f2dd3si34420plh.555.2023.06.01.18.54.31; Thu, 01 Jun 2023 18:54:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=N3mE7C2R; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233702AbjFBBgx (ORCPT + 99 others); Thu, 1 Jun 2023 21:36:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233674AbjFBBew (ORCPT ); Thu, 1 Jun 2023 21:34:52 -0400 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2069.outbound.protection.outlook.com [40.107.237.69]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD6F71AC; Thu, 1 Jun 2023 18:34:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LS9bDK/M9taxjg8H1l+Utf6RrYA0lGIv6YN5ecTAK3wEJlPrgl1SAuK/fp8Reksexmf1vaDGgwUw/gs5yP2IwbnAUIO/8GigFQgTkZeXGqr22Z343Onw2DcYvfjlsa0p23ZYvAmGXTJ5ECOqUI1ueNpo52CB2ktNVlJUhQ0taQiYGw7NUy7xCkZOx7yP85fwN1V2dJeXbyhb5TOTceajeIIbAfOiWVBvG16mSHgEq+l7/orQEyW2n38CUsILiRueTQ1iX8Ih9KeSKWVXIymWTJ2EPSoSjPQ8xilXi3qbhV4vPm/qLTBWCdTovAgnTSMm7rjArlZtPQKtXUE+tLHjow== 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=V2zFYpTri2qrz4Mp/GE988kN6uRjrv5qlwoCMnNc/9Q=; b=alw3psCdmNY0oQm0r5lTzkdnRF/OtCDHSnHtRCM8q6VwTxJDmSh97vciCPObepywP9wk3Oq/MXFN9PNa51VqN2Cg7a8/wFenv5KpxIC3Q2YjmSwIsgPAEHWRSvpQB7JThUNlvY+mYAxSAkndPgod1a5bR0wDqil8wdESTVPIjCtgy6j4zexyhbOsVeRgmvdjgk6ndR0GKYu3O1nNoRybqfnFGG0SgczT20OlAgnJvQmTgxReQuhuATiTjuEkOhIN2RBx60cCuZc5ppduyk4bOoYhK/0ckMYDUURYnXQ45qdq+mvzqXN8tr4fCPhvT2InBa6TFu4mwjGmYjY3uByrjw== 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=V2zFYpTri2qrz4Mp/GE988kN6uRjrv5qlwoCMnNc/9Q=; b=N3mE7C2RQKxfLJfzra2DowA8poy0v94/YLGOotMhMnzU12AxzvRP/Iw+jHPspw84uJ8zuTEVfKoCYn36jfKFN8fCzbpDEG7Mc8IE7hfrP3HqHvElUBQUpSl2eOD8FWDweSDFWM/0To4+MR86i1EkC7WGZSKKjtCprX9Y7JKuCHYaQW21HWNhRaWx/j1l6r7+0x4yqUORHeSYkTTET0UjgFCU1IG2Nta8ZsTWl0sammQZPPsalHwBxqhPPmsej52/pquDQrm1RiQeOru2Vt3M2TtH0estYxgmEiAKaX0xs2M0apg14/Ec5jtCWgNyfBXi7Q7F+nSnEexu7fXDKeMZWg== Received: from MW2PR16CA0032.namprd16.prod.outlook.com (2603:10b6:907::45) by BL1PR12MB5080.namprd12.prod.outlook.com (2603:10b6:208:30a::6) 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:44 +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:44 +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:43 +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:26 -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:25 -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:25 -0700 From: John Hubbard To: Andrew Morton CC: David Hildenbrand , Peter Xu , "Shuah Khan" , Nathan Chancellor , , , LKML , John Hubbard Subject: [PATCH 12/12] selftests/mm: fix uffd-unit-tests.c build failure due to missing MADV_COLLAPSE Date: Thu, 1 Jun 2023 18:33:58 -0700 Message-ID: <20230602013358.900637-13-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_|BL1PR12MB5080:EE_ X-MS-Office365-Filtering-Correlation-Id: 9efc2e15-8451-417d-f172-08db63098af2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hogQB3XLr9nfYX+Y7inGO9mIpGJMMh40p9BXUHLii+LynswQ6VPfhtkYMnaHja/ZDepQYBBqMDrtm06YsVvaBEeKvXYwoZRfzlK04Y5RKiVnB4y5Oe0Mr1xoPhk/JrKTJaatBRP6w8YlcTI9b3tFi0u4Z6XRqc3QOzXTzRGrMpmPMU7lwGYtlp86Vcv1DQDvdBBt5yGw/6Mq1Q+yd569xhYAC4OXpJ5delF6bvgw7KKVo1WmqymvgUwCoI/wIx6VpAVr/4vZzpaV4NJEfwyfRPic5uOn61CYnzOZK227txXu3BAKaxIECmsexjy+IZlbG6jAotZJLEaazAl/YqioGLhHpq+vchyvGl5HgYzd+u9UBiSoI9ae3pQyb/Lb36f/RthfmnhfCOedhmc9HBBb5UB0Fc5OS0ah97dt1gZJE9gaKKpQ2Zoig9BODb0M7/DQDzPuf3L6erOPAId6iWVwolr//0GuhBiJa8QckKPrF5RqfldcPSTEkY3Zy2WkSgH2we1ck5J2oBDaV//gPNRC6PQF1PqLe9AXcHn4F4psiHmaaT5jAKf0fSsqosFfATiK4SSRr2EqTcAaELdCiGyjcg2FTDhYyCrUvfWGy7zZTchkuoUngYsufYb3I/ACH05GZAHcjdN8qtdQRQ0rrhjKyP9vrsqTLyDlJle0jVQDNZtzjRACcaOx8+PSYpkHK2Dnz6c0YkdTftYs0SlGCi5SQnefSDkeCnOmOn2GnYkGrwIml4t5dVDKR+F7tLsjODoO 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)(39860400002)(136003)(376002)(346002)(396003)(451199021)(40470700004)(46966006)(36840700001)(40460700003)(47076005)(36860700001)(316002)(6666004)(36756003)(70586007)(70206006)(5660300002)(107886003)(4326008)(6916009)(41300700001)(82310400005)(82740400003)(8936002)(8676002)(86362001)(7696005)(7636003)(356005)(40480700001)(54906003)(478600001)(186003)(2616005)(336012)(426003)(2906002)(26005)(1076003)(83380400001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 01:34:43.8527 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9efc2e15-8451-417d-f172-08db63098af2 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: BL1PR12MB5080 X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767554034360801009?= X-GMAIL-MSGID: =?utf-8?q?1767554034360801009?= MADV_PAGEOUT, MADV_POPULATE_READ, MADV_COLLAPSE are conditionally defined as necessary. However, that was being done in .c files, and a new build failure came up that would have been automatically avoided had these been in a common header file. So consolidate and move them all to vm_util.h, which fixes the build failure. Signed-off-by: John Hubbard Reviewed-by: David Hildenbrand --- tools/testing/selftests/mm/cow.c | 7 ------- tools/testing/selftests/mm/khugepaged.c | 10 ---------- tools/testing/selftests/mm/vm_util.h | 10 ++++++++++ 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/tools/testing/selftests/mm/cow.c b/tools/testing/selftests/mm/cow.c index dc9d6fe86028..8882b05ec9c8 100644 --- a/tools/testing/selftests/mm/cow.c +++ b/tools/testing/selftests/mm/cow.c @@ -30,13 +30,6 @@ #include "../kselftest.h" #include "vm_util.h" -#ifndef MADV_PAGEOUT -#define MADV_PAGEOUT 21 -#endif -#ifndef MADV_COLLAPSE -#define MADV_COLLAPSE 25 -#endif - static size_t pagesize; static int pagemap_fd; static size_t thpsize; diff --git a/tools/testing/selftests/mm/khugepaged.c b/tools/testing/selftests/mm/khugepaged.c index 97adc0f34f9c..e88ee039d0eb 100644 --- a/tools/testing/selftests/mm/khugepaged.c +++ b/tools/testing/selftests/mm/khugepaged.c @@ -22,16 +22,6 @@ #include "vm_util.h" -#ifndef MADV_PAGEOUT -#define MADV_PAGEOUT 21 -#endif -#ifndef MADV_POPULATE_READ -#define MADV_POPULATE_READ 22 -#endif -#ifndef MADV_COLLAPSE -#define MADV_COLLAPSE 25 -#endif - #define BASE_ADDR ((void *)(1UL << 30)) static unsigned long hpage_pmd_size; static unsigned long page_size; diff --git a/tools/testing/selftests/mm/vm_util.h b/tools/testing/selftests/mm/vm_util.h index 7f5aac0ac680..f04f82771cd0 100644 --- a/tools/testing/selftests/mm/vm_util.h +++ b/tools/testing/selftests/mm/vm_util.h @@ -41,3 +41,13 @@ unsigned long default_huge_page_size(void); #define PAGEMAP_PRESENT(ent) (((ent) & (1ull << 63)) != 0) #define PAGEMAP_PFN(ent) ((ent) & ((1ull << 55) - 1)) + +#ifndef MADV_PAGEOUT +#define MADV_PAGEOUT 21 +#endif +#ifndef MADV_POPULATE_READ +#define MADV_POPULATE_READ 22 +#endif +#ifndef MADV_COLLAPSE +#define MADV_COLLAPSE 25 +#endif