Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1582723rwd; Thu, 1 Jun 2023 18:49:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7eaOgPg0linmmyQRmfIW8HCST1duFoDQzb9Mq8FNR3JzE4e8ZYrlnmw1EVHKm6QU5zRrd2 X-Received: by 2002:a17:903:5c5:b0:1b0:3c1a:1238 with SMTP id kf5-20020a17090305c500b001b03c1a1238mr921974plb.59.1685670563171; Thu, 01 Jun 2023 18:49:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685670563; cv=pass; d=google.com; s=arc-20160816; b=i7VdlEM27vMfno+HcNPnbHTxQh2enB8Ng9wNAp3ggBAGhj6nGDjJaiXRiSPI8iXl8z H3JkmFbdgcAOXqvz92kKepSY+XGjklzALhq+Cn8MCM1XcGJLaK+NELz/85IXcuVynXzw yifzj+MexmiMyPvmKlHr1WsVqW42B5Xts5lV8lkqf9h4ON2Rqx38HLs9lo+4xjwJ5cfE xFanAtO9I4dQ/ry0vUwqt8j6ocLeBsTWpfNuXSD0C5hxsJISd6z0ppEJuYfQh74T+SpT +P+4NeNvtgp3Vzh0Xc9MP7BmvjIpuqzhDTgi2Se7M5PbYyM9AVbQyh4dcBfFgzqvCqxA FpcQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 2-20020a170902c20200b001b075e2e994si26700pll.575.2023.06.01.18.49.11; Thu, 01 Jun 2023 18:49:23 -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 S233687AbjFBBfW (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 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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 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 --- 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; \ -- 2.40.1