Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp186796rdb; Sat, 17 Feb 2024 04:35:39 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU2RuG4qtqUlkZjeVD9jTs+LuXfewLSp4jpvtNJRt2mxxb7czhkMaFHCrCLd9VJEsLjyBZS28nxWeDkNbJjEomkZHK6NZZHdh0K4isJZA== X-Google-Smtp-Source: AGHT+IGpGRav8OpH20XW2sSB8U2zx9ntIpd9dJvb1czoqeU4S6YjsCLc0l65mRUQTshaNJHrEnd5 X-Received: by 2002:a05:6808:130f:b0:3c0:4704:ca19 with SMTP id y15-20020a056808130f00b003c04704ca19mr8868034oiv.57.1708173339233; Sat, 17 Feb 2024 04:35:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708173339; cv=pass; d=google.com; s=arc-20160816; b=TMIlepdKHH7fZLt3B98d9i7MER9/Fs7HJ6/1qEkXELG577y+/iMJAfQmjxxeCiEw7I mxq942g7ZlUh+3cOZkFs+Ev7OTgp5QTcut7q9reIuaqJjTA3BF7cH6SBAIINiiRvsEPP gp5JlFWB5ESL9o2wBqZgi2eJDKJWMJlAAE0ptCFQOd3sd+oj25F1LBIBLjMCr5QluYCY z15rV2sG9DgnpspNbX9DDPr59jNY/dfnM931IhFK0FyyYK2y8tCmXRfvFE/juYL47ICN lj42wZPMsYlAB8/oriyBAzyA7MhbZ3Dcfrjb3QgvymzQNvqT+SPk9qhIwkrrAHgR5y6f yf4w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=NzjXg3CKQ0TaXqBd497Q3mH5G/e3fLCWWcCEz7gEw7M=; fh=aORRlgj6LRR5xnRsltwdFJeQNTglP/iI0SLlAw+9YHY=; b=BXT6+VunLG7GNbTUlunuLsnwjNQmfI4ZbvYmEkV/bAayj98dm630J35C1ccQmeMDdU zhZzS7531WVJMtW784TDnyc5tWzMaw8P2SIZ1LxkuPM4YfuPvfQii8pbLg6tl7oYbLGO MzPGIhKi5GKBwAyzoZj6BsCVL8SiyyKn+4F4JORbvoZc6A/+mbiRjv1ooiLbZmlnDRFP DiV0+xvriVMBnNLVX38N10B178zDCTbxq+GI+ArKR6koaxGI9wsV+S4eQbTkXD/zW1mK 7Df9NChW9FDHypqOfhebawg4Jdf4aUEPMsVWr5DesqMi1JxTqStva2c+LAQo7pDrFVdi +iow==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="jI4RXhH/"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-69838-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69838-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id gw5-20020a0562140f0500b0068f02433cadsi1897834qvb.338.2024.02.17.04.35.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 04:35:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69838-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="jI4RXhH/"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-69838-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69838-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id EA2F81C21495 for ; Sat, 17 Feb 2024 12:35:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 12A937A720; Sat, 17 Feb 2024 12:35:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jI4RXhH/" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A8A3171A4 for ; Sat, 17 Feb 2024 12:35:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708173332; cv=none; b=ZZLQhRDUKlVy2jFZdT3Vnh36vQE9VtnhMVlv9seB2KdQuIB30vzbalLfZd9HLr9Mu74GiT84Q5rsSbpTqVQ5e65bvZu7Gwsj2T7yEskQLVA8hr9Ckq8KMTZ39XQqMwmIi5FquMPxBnAxJ+Cgs8KZhrItj1q4VzHLM0WhY8Uclhw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708173332; c=relaxed/simple; bh=dxYmYjvFhU5nWz52Hqun3yHSuCsp6TLZ1/ueI0sBGp0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=A8xDyVcrf5K6aAXUeq5KAejzXQTF0/fyoICXDKVVwEYIiRl/d0w+eZfNGgyr4pWCfhaQkhpoUJTxEvxsr6nawsmmEPl0Icrj0LrESduI5NOxIqBBgYCmCYsdlMmBWxcLyzQpewsGHjOcX6tURv3ZibEsdmAKNR6lA2cnMN81LgQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=jI4RXhH/; arc=none smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708173329; x=1739709329; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=dxYmYjvFhU5nWz52Hqun3yHSuCsp6TLZ1/ueI0sBGp0=; b=jI4RXhH/rSLE9f6ESarxlMnPg80Sk3PcDOmcR47BkQhOX0gVCBOa2yXg 9Uspd9IKXJJvc/isWM06YRoUCvmefr6Wl3QUPApI2V+yrMFNWoDD7Hy8F nAiAl1bdDyH9VoNpowJPi9mCDUg9KhoVywXfFwpBF1RyNeHSHRqomMwP3 kkVx178Dh24ypJeXmUm+kF6uoQJgTTbw6cW+cu5cOMkF177VwVGndYQRx Ylieg2PGpKIe3rQMpBxvXLku/aBL93/LgTQ5ZcicJlrqtfREp5DCKMTdB xld06M86JyaVX6RnoSoI9bwXA+6LfclNmjvMV2fmYZ89luRNoU01R9BQy Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10986"; a="12925712" X-IronPort-AV: E=Sophos;i="6.06,166,1705392000"; d="scan'208";a="12925712" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Feb 2024 04:35:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10986"; a="935994551" X-IronPort-AV: E=Sophos;i="6.06,166,1705392000"; d="scan'208";a="935994551" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 17 Feb 2024 04:35:24 -0800 Received: by black.fi.intel.com (Postfix, from userid 1000) id AFA0C2E9; Sat, 17 Feb 2024 14:35:23 +0200 (EET) Date: Sat, 17 Feb 2024 14:35:23 +0200 From: "kirill.shutemov@linux.intel.com" To: "Edgecombe, Rick P" Cc: "debug@rivosinc.com" , "luto@kernel.org" , "x86@kernel.org" , "Liam.Howlett@oracle.com" , "broonie@kernel.org" , "keescook@chromium.org" , "bp@alien8.de" , "mingo@redhat.com" , "tglx@linutronix.de" , "akpm@linux-foundation.org" , "linux-mm@kvack.org" , "peterz@infradead.org" , "hpa@zytor.com" , "dave.hansen@linux.intel.com" , "linux-kernel@vger.kernel.org" Subject: Re: [RFC PATCH 3/8] mm: Use get_unmapped_area_vmflags() Message-ID: <35rzsyepg3wx5vjsyd5n5pix2c5oo6pibzfmdvlfbpmf2mvvgy@icrlxlydgs6z> References: <20240215231332.1556787-1-rick.p.edgecombe@intel.com> <20240215231332.1556787-4-rick.p.edgecombe@intel.com> <6d034d561dcab4300a7eb66e34e2a03aaf17ea79.camel@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6d034d561dcab4300a7eb66e34e2a03aaf17ea79.camel@intel.com> On Fri, Feb 16, 2024 at 10:15:05PM +0000, Edgecombe, Rick P wrote: > On Fri, 2024-02-16 at 14:56 +0200, Kirill A. Shutemov wrote: > > > +unsigned long > > > +get_unmapped_area(struct file *file, unsigned long addr, unsigned > > > long len, > > > +???????????????unsigned long pgoff, unsigned long flags) > > > +{ > > > +???????return __get_unmapped_area(file, addr, len, pgoff, flags, > > > 0); > > > +} > > > ? EXPORT_SYMBOL(get_unmapped_area); > > > > Any reason it is not a static inline function in the header file? > > get_unmapped_area() doesn't seem to be referenced from any modules. I > don't think it needs to be exported actually. Maybe it used to be? > > It could be a static inline it seems. Why are you thinking it would be > better? That's just what I would do for legacy interface wrapper for new function interface. And save a function call for caller (it shouldn't matter in this case, but still). > I think maybe get_unmapped_area() should stay as is, static-inline > wise, but remove the export, and the newly added __get_unmapped_area() > should be made static. Does it sound reasonable? Up to you. -- Kiryl Shutsemau / Kirill A. Shutemov