Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63E58C6FD1F for ; Thu, 16 Mar 2023 07:02:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229928AbjCPHCg (ORCPT ); Thu, 16 Mar 2023 03:02:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229542AbjCPHCd (ORCPT ); Thu, 16 Mar 2023 03:02:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AB5B30293; Thu, 16 Mar 2023 00:02:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CE00D61F2F; Thu, 16 Mar 2023 07:02:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B9C8C433D2; Thu, 16 Mar 2023 07:02:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678950151; bh=oyu2Kf+xnN2T5vtUW9pLhUslgU39oPBN51+0UsfURbU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TNPhUyiQBTLe3keDiMxW0p2heZwA4vnfSWQXtHqxNbeyoRSzAFnJzhOYHUNbm1Evw 7VdQxZlbitsH9VSYqA+ANSm4J4B6VAUQphiQdFheBNAufgnq5golNODuG4Gw37Ca5+ kxGnpfvElDO3y/WwxvrIKmimKAFpqvzzuYkqaWLWBLewa/GeNP2ld9UbjFRXbQz2uv qI7t0D6iuIs2k3TJdXDF9/wAS7a6khdqb/6z+l1NIj80z2Hdjh9QCxZI9oEiMeTFwO Nt/jaVWtBwdkoX8zOUG+d8YsyEsOy81/D1OYEoBiZ7jAdHj3DyRLZDna4H3LFXBXmH svsGf3H6sTuEQ== Date: Thu, 16 Mar 2023 09:02:11 +0200 From: Mike Rapoport To: Muhammad Usama Anjum Cc: Peter Xu , David Hildenbrand , Andrew Morton , =?utf-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , Andrei Vagin , Danylo Mocherniuk , Paul Gofman , Cyrill Gorcunov , Nadav Amit , Alexander Viro , Shuah Khan , Christian Brauner , Yang Shi , Vlastimil Babka , "Liam R . Howlett" , Yun Zhou , Suren Baghdasaryan , Alex Sierra , Matthew Wilcox , Pasha Tatashin , Axel Rasmussen , "Gustavo A . R . Silva" , Dan Williams , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, Greg KH , kernel@collabora.com Subject: Re: [PATCH v11 2/7] userfaultfd: Define dummy uffd_wp_range() Message-ID: References: <20230309135718.1490461-1-usama.anjum@collabora.com> <20230309135718.1490461-3-usama.anjum@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230309135718.1490461-3-usama.anjum@collabora.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, Mar 09, 2023 at 06:57:13PM +0500, Muhammad Usama Anjum wrote: > Define uffd_wp_range() for the cases when CONFIG_USERFAULTFD isn't set. > > Signed-off-by: Muhammad Usama Anjum > --- > include/linux/userfaultfd_k.h | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/include/linux/userfaultfd_k.h b/include/linux/userfaultfd_k.h > index b680c0ec8b85..fd1a1ecdb5f6 100644 > --- a/include/linux/userfaultfd_k.h > +++ b/include/linux/userfaultfd_k.h > @@ -182,6 +182,14 @@ extern int userfaultfd_wp_async(struct vm_area_struct *vma); > > #else /* CONFIG_USERFAULTFD */ > > +extern inline long uffd_wp_range(struct mm_struct *dst_mm, static inline > + struct vm_area_struct *vma, > + unsigned long start, unsigned long len, > + bool enable_wp) > +{ > + return 0; > +} > + I didn't see uffd_wp_range() defined in the previous patch. Could be a rebase issue? In any case, the stub should be defined in the same patch as the actual function in order not to break bisectability. > /* mm helpers */ > static inline vm_fault_t handle_userfault(struct vm_fault *vmf, > unsigned long reason) > -- > 2.39.2 > -- Sincerely yours, Mike.