Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2168610rdb; Mon, 9 Oct 2023 15:24:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEbQKSeXwPz0XEDfK742dy/grLfA/RVaKBg+UuYMxF1IJYu9ZvOteAJazPeaYJ8YjmbgIFo X-Received: by 2002:a05:6808:1143:b0:3a8:1727:5af4 with SMTP id u3-20020a056808114300b003a817275af4mr20985399oiu.24.1696890277676; Mon, 09 Oct 2023 15:24:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696890277; cv=pass; d=google.com; s=arc-20160816; b=VkbLKTe5iWCGtld0abipynMyLS4dvQ1FbpGxYgwBJQrB9kpVRAsQ/1ci8kGw+tmZ4X KHAvHOUS/QuMq/zE6rFTeDuvOHx07YUUCwEh+xlnIZl/99rHeQ+pxWHJmBUMJmW1WpqD 1aDOQKQ9WNMwOZVhFFlWp2eIdQYZM3+HgZGjWpoAbNDDFC6VXIthAqIgV9+Ir8re8/5x RpBPvRUguRWwdPPoaoIXUTq976jkRhVvSF6D0YprioHBz/tFx1FPjZXBJOk9GNz1Dtw5 7sKX5aZXHpjnRfYa0q52P43qmY+ppt/Cn4CEUK9ylEkUo4uUfgONTDjt66BAk+9RVQ4X SgCg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2uFbBO9aqB7cHIUu+UHHDSMpAqbgczCXBAqRAfATJ94=; fh=5yNDa4NxZzJAYVQ40v2UpxvkigO4SG0g06GcCBDt+9Y=; b=P0tkIXMvGDIjPJXk0r4Kn7bydM+0aN2FCpJWZlalK/I4wXIt0xn8LbKHByFwxWHBMM Y6hL+D1v88Fruop5v80CqrEaZZJpo6cxM9gpWsEZI9V/+/UoBBubSra9QDvJCoQ+CsYx Cv497KG56gRlIKGgaeyNGF4+XG5QWUN7IHjjHBCtsjCRB+LAyyhBgUV/JFjjvh2X0UrD XYFcOAgqtOucshmCLU6cToPHy828nqs2PfPMIYyUmYTC+/ptAReZc17zFFutBtfn9YfX QdK5YsabgHYi0RjhqRcmQjqE8OV6lwcQw9SeS41oT7otNSdWgHb3d72HyGPTtVT1N/8S Y1OA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=VG6XShKt; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id e1-20020a636901000000b00573f7b6999csi313389pgc.440.2023.10.09.15.24.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 15:24:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=VG6XShKt; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 2E62280B8DDA; Mon, 9 Oct 2023 15:24:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378888AbjJIWYJ (ORCPT + 99 others); Mon, 9 Oct 2023 18:24:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378857AbjJIWYI (ORCPT ); Mon, 9 Oct 2023 18:24:08 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2083.outbound.protection.outlook.com [40.107.243.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 177D89F for ; Mon, 9 Oct 2023 15:24:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gub1T+gE0/Aoij8+NJxkppiIk3JknX8sf8vqt0xflqc5rTOwW2llTRE+2Q40Hjqqnv1DCOZBPIuYqTnGIRwoICVt75jkpb4LEydZbx+jf80ooA3e2wnC9IPYXkHf+2xbAcHsDTM7p6caa8Ur9/OqJj8gW69cVL0GhKBzjrZt6YrXe68lTafGJKGebttKndknVkObhXsLZsOtj971A9eh9YySOjeWGhS7/ApHRrCtWYQ4SXRnaH/HHOeRs7yYp2Zv+QP7VT7XhnJnddlNSVz8IcOhVTzLFcLA/ZqZJ6GXEZWM3cw9dqhgFF1E3Bm3wMzGbAruVVQ+B3RryIotSHpEqQ== 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=2uFbBO9aqB7cHIUu+UHHDSMpAqbgczCXBAqRAfATJ94=; b=AEBc97UdbbmHTRN4Zl3V2RhzQCWRTSiqiud0iwZK7EdgD9kRx5KOEQglWLISmEkYY7ok5SQtzR/GVeOa6bl5SxKeK/YSKjaml6uACjeHN+E2WcZCadzPO8pIiNqb15cSVZ0UEGJ3gADf009Y9Khg9KZO67LaHgd0B2ASUBR5cPGEREij+mNGNbdeMA0XHNQEvRJPu0CQkiKWd//0vJ4sAL8Ox9LWfBtZ79TJ/X6UBp8GGurh7w6QbOYv+BTGT30vFU1aYx43MUxJSXyTLpYFQrKQK+ukTjeuU0pqf+GlcxTIMzNMVbUJUtmFSUPbrXkx3Htl2fYS/SnogCC/miHxwA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; 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=2uFbBO9aqB7cHIUu+UHHDSMpAqbgczCXBAqRAfATJ94=; b=VG6XShKtr+abtlI0evBp6LHVQJTnItPCGtRgolleoz9wzzsXxlMBudpLHkeadyruEvQhx7Uljk5ShtMkuAo8z21rojfR8NctfYpKZOrs7HloRUVk8RqOUtHZBFJPWCzQJeul72qZuAO8UaqhXK581Ab9Wk6Hjaq24Dagr9astyAWzfMvch2qkjjS/oWcJoPbVcR5DRxRpl1y9pu1LX+J3ax4JvdI1Jh/7NVaOP+tnLyY0J4FJZx7EywKWPEbFhKoqqpUEElPA5JbL0Dk4ghZ0iThVI8UKA6Kzix+Ykd63A8UsCTc37m4NpSXu50ILzUk34BRNaPTu/QrUASeY34ZyA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) by SN7PR12MB8772.namprd12.prod.outlook.com (2603:10b6:806:341::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.36; Mon, 9 Oct 2023 22:24:05 +0000 Received: from LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::3f66:c2b6:59eb:78c2]) by LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::3f66:c2b6:59eb:78c2%6]) with mapi id 15.20.6838.040; Mon, 9 Oct 2023 22:24:05 +0000 Date: Mon, 9 Oct 2023 19:24:03 -0300 From: Jason Gunthorpe To: Lorenzo Stoakes Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Catalin Marinas , Will Deacon , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Oleg Nesterov , Richard Cochran , John Hubbard , Arnd Bergmann Subject: Re: [PATCH 4/4] mm/gup: adapt get_user_page_vma_remote() to never return NULL Message-ID: <20231009222403.GE3952@nvidia.com> References: Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: MN2PR08CA0006.namprd08.prod.outlook.com (2603:10b6:208:239::11) To LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: LV2PR12MB5869:EE_|SN7PR12MB8772:EE_ X-MS-Office365-Filtering-Correlation-Id: 745729cf-60cf-4c60-1c3d-08dbc916726f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MA+YKneqMjhfr0C4rMMqRZK4QW3z8hcfOx6UVng7tzkhKooyIPRkDMVd4GWPUrf+CdwZUj+iNc1RvotiybUlBLeTK+vE5TcNo0oF/xq5daGOu0ILE0R7t4KybhfshpUcFtlw2ysFo+ZzESI2MmkLegDzhsZ+MJ4frLaAUmSWXbKujSfNYEJ9tcyks9DEdjdP4hpKonaJbI9/IFC6cYBh5YQyHpmccYVmRiEj4U++dzc5LL+ZwGbHw8FHIrtPgYJf4ZwzpiMfah7JAy/5M9prm/ifgBt1ESPCa7dTiArfxs9XleMkoCBEhLnT2NZFzq0rsyCDvk8jFw7c9RWdgk7WpwB2t3pcPsl12c8AZ/awUIsNTW1hjCoBty9ahQPt989clPQTBItvPoLP1XyGDxICPMSM6u1GEEBjyKqRERwyYNciU9NR2O8ws4FvuazTWtl1lLnoYYfF/05Hy4CFqLkQ6E1DtIpIdmtv4qwuaw13IpYQ6nReYPjISJpn1GVvNIUFtyU9BK8e5iEEFutfDBdP0ok2NzoHkOOc0H4AP3rfgQV+AJH87uLN9NLdqG/PPTUy X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV2PR12MB5869.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(136003)(396003)(39860400002)(366004)(376002)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(86362001)(38100700002)(33656002)(36756003)(66899024)(2906002)(6486002)(6512007)(478600001)(4744005)(41300700001)(8676002)(4326008)(5660300002)(6506007)(8936002)(2616005)(83380400001)(1076003)(316002)(66476007)(66556008)(6916009)(66946007)(7416002)(54906003)(26005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?3O+EBExzbkX8oYBbk3rVBUU7qzqhCyeI63Q8b9czge8KMJt8FnrD2RVFADBv?= =?us-ascii?Q?F+z3ncW2fVX8a0P7VIB1vzaQrarh/PJ9B3BLBJcCn86DL4El+MHIythm5Y77?= =?us-ascii?Q?OBx3+XFrFIUGrmoaZ91feX4cvmPXjacrC4lbVvkgSP64dNIBTvjr/RgPg9+8?= =?us-ascii?Q?9YDUrYXBXqCVRTh4PnKvGlxifjqi3RvsBjAcbG5QjCZ/8TShtc/+OkQcvZLA?= =?us-ascii?Q?QEYLC3eLPPjYMLe0xDqDHo2d5Ad9rrrHvpoBDQtduhr9QgcoUTEqKBsXFI+r?= =?us-ascii?Q?Ca5J0rNDPZTEbd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mo7/N?= =?us-ascii?Q?9+1tkZcvkTyVWaOeoiG5O/rpuvG+QjDlZzf1lZEJ+hFTJnb8rptfqOlI7vY+?= =?us-ascii?Q?MS0Eb4PvDjiYrD94CsRcEj0VMOVgO95kOsCjsN/zVLi1iEmccZ24lyqrdjYV?= =?us-ascii?Q?ySjl8u/UMPBiYDUSiKAFff5rj579sYQWsnsbLMbMRXDUdtYiKapB8GX4SAIJ?= =?us-ascii?Q?5402b4Nd2s3eMlKU/dYNWwIVWcSsfewKyOfoJedt1/IU2yqQRlcyqbiAaunz?= =?us-ascii?Q?5XHW8ur5bGwAdSphN34A8229wADIt2KgY9lF97Ht/TKbE8ZPAM0cn/lVNa0s?= =?us-ascii?Q?GIN3jNOX5SJMkdWSJTJXgBOYRVjIiIQRaRSppoMKiGd5+Nam5qc24P0isGxg?= =?us-ascii?Q?5+dxMX90Kpp56zLI19c=3D?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 745729cf-60cf-4c60-1c3d-08dbc916726f X-MS-Exchange-CrossTenant-AuthSource: LV2PR12MB5869.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Oct 2023 22:24:05.0713 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: k7yA3kYbvH22HV/g8iULwxl8yIhi67Xm2j05mgp2WG/JNU2LVjAlHy2Y90VKhALj X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB8772 X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 09 Oct 2023 15:24:33 -0700 (PDT) X-Spam-Level: ** On Sun, Oct 01, 2023 at 05:00:05PM +0100, Lorenzo Stoakes wrote: > get_user_pages_remote() will never return 0 except in the case of > FOLL_NOWAIT being specified, which we explicitly disallow. > > This simplifies error handling for the caller and avoids the awkwardness of > dealing with both errors and failing to pin. Failing to pin here is an > error. > > Suggested-by: Arnd Bergmann > Signed-off-by: Lorenzo Stoakes > --- > arch/arm64/kernel/mte.c | 4 ++-- > include/linux/mm.h | 16 +++++++++++++--- > kernel/events/uprobes.c | 4 ++-- > mm/memory.c | 3 +-- > 4 files changed, 18 insertions(+), 9 deletions(-) Good riddance to IS_ERR_OR_NULL Reviewed-by: Jason Gunthorpe Jason