From mboxrd@z Thu Jan 1 00:00:00 1970 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88E58C0032E for ; Sat, 28 Oct 2023 07:44:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DF5466B03DE; Sat, 28 Oct 2023 03:44:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DA5356B03DF; Sat, 28 Oct 2023 03:44:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C45866B03E0; Sat, 28 Oct 2023 03:44:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id AFAE46B03DE for ; Sat, 28 Oct 2023 03:44:24 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 8717D140459 for ; Sat, 28 Oct 2023 07:44:24 +0000 (UTC) X-FDA: 81394082448.28.B9E366D Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by imf28.hostedemail.com (Postfix) with ESMTP id 10E04C001D for ; Sat, 28 Oct 2023 07:44:21 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=aU5naiMA; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf28.hostedemail.com: domain of lkp@intel.com designates 192.198.163.8 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1698479062; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=17AuV5WblfgxYva3dxYSMUBn9+1oPB9+ro4Rtgwq9MQ=; b=fkTC7DMTu2woNy5H7T+QOl6e7cQNKHbj+fIOIVQnTD2Z5C+8q1VSfCr7z6XRWl6Gq3uOpN d7TKxePQWm29HhO46h5EHsNr+6XvivBgSzL6oTzkMmZrsCG7pMzRtbpTe/VF6f5nihWhQu iMYz5Q1ZXJCXPVwvMswYTycWaW69DeI= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=aU5naiMA; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf28.hostedemail.com: domain of lkp@intel.com designates 192.198.163.8 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1698479062; a=rsa-sha256; cv=none; b=X4qDnivNmoTcY0YD7/86XVPdXQ8DDgTdYsQsgr1AOR4S7xko38LN1aaSCMB4BVd8wtpLiM oB1Qa4TcqkcPaysrJ4qJfCQuOHJrcpIt7bifYWDlj/cFz51UOfkR5p7W5EzRgV2bdF1vht yjSkfruH/g4LuWOfX8U2VGMLrGqDD+Y= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698479062; x=1730015062; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=465OdnQqbfHuFli76mKkKaH0MNO+Oh+EJdtspDJbpzo=; b=aU5naiMAvbK+2PAg7+tQSZHg7p3zRRFuW4FXsV5MOxWwRl4l4wWd9yHJ stLD1n7jMWtMBE9pOXoBAGmJTHXIEGQug2K+owXjI3ZLWYIV0aFq0Pv5H 2r983yaYmY5RWObKC520uCbiuVLvudarM7uJXERamLqnAg74MY1AYe1xO HKKKNEBjWAN3oub7P/q/38yb/BNlq/2W1R98u9mZ1wW+likgwcxX0G1vk IsB5I1F7bRmn9e+TnpKlBS1qGgcyVIBEf7argoMPsognyKi4/sdPZW5uQ B8w4FE65/20Ar2grLR8yd4LUpwmGWlRvg8DN9ckfkeZe5piKXPuD22qbt g==; X-IronPort-AV: E=McAfee;i="6600,9927,10876"; a="682965" X-IronPort-AV: E=Sophos;i="6.03,258,1694761200"; d="scan'208";a="682965" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2023 00:44:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10876"; a="903506551" X-IronPort-AV: E=Sophos;i="6.03,258,1694761200"; d="scan'208";a="903506551" Received: from lkp-server01.sh.intel.com (HELO 8917679a5d3e) ([10.239.97.150]) by fmsmga001.fm.intel.com with ESMTP; 28 Oct 2023 00:41:43 -0700 Received: from kbuild by 8917679a5d3e with local (Exim 4.96) (envelope-from ) id 1qwdzP-000BYv-31; Sat, 28 Oct 2023 07:44:11 +0000 Date: Sat, 28 Oct 2023 15:43:40 +0800 From: kernel test robot To: Suren Baghdasaryan , akpm@linux-foundation.org Cc: oe-kbuild-all@lists.linux.dev, viro@zeniv.linux.org.uk, brauner@kernel.org, shuah@kernel.org, aarcange@redhat.com, lokeshgidra@google.com, peterx@redhat.com, david@redhat.com, hughd@google.com, mhocko@suse.com, axelrasmussen@google.com, rppt@kernel.org, willy@infradead.org, Liam.Howlett@oracle.com, jannh@google.com, zhangpeng362@huawei.com, bgeffon@google.com, kaleshsingh@google.com, ngeoffray@google.com, jdduke@google.com, surenb@google.com, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH v4 2/5] userfaultfd: UFFDIO_MOVE uABI Message-ID: <202310281500.latmtbJs-lkp@intel.com> References: <20231028003819.652322-3-surenb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231028003819.652322-3-surenb@google.com> X-Rspam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e9r40RG vgWcdPWk BBE7aDP+jNOmGYpknYnQ5m0drre1AiEVJij7/9xLYETkUbRdzNX9gk0UIraAFlZXABwZGA7TraDMezH/00vhxErBKETMh41o9hi8nUNj2BHmZVLW6pUJ9ZuTS5wRxLb06ZWsU1DzQlmV+gv/zRHQm/TnlM+RP3I3tddKXiX8GzM+aAb5DTBoSxBgRLc0mePPqS0ZlKGItOXG4ABOiE6KDeppTOpY9hHDzsqQCG3g6IgLgT5+IKC+o9RvQuvGQp2sL3kZxmzQj93T872F5RbrsES9SqK7eTXb5+vkaNSS3PhFNfwHTkc6av4IGu+LbnzO4XAYiqerDgFpQMntGTtnKcQwSV/yAMZqLi8ZVFMuhg26rJoDTweT9Rpm2lV1v2T4VpWd8e2KZRIGfDKsULGd8umsumwc6D8+H53bBWyBvQDhp6PLLn0kr7IPwsQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Hi Suren, kernel test robot noticed the following build warnings: [auto build test WARNING on akpm-mm/mm-everything] [also build test WARNING on next-20231027] [cannot apply to linus/master v6.6-rc7] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Suren-Baghdasaryan/mm-rmap-support-move-to-different-root-anon_vma-in-folio_move_anon_rmap/20231028-084120 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/20231028003819.652322-3-surenb%40google.com patch subject: [PATCH v4 2/5] userfaultfd: UFFDIO_MOVE uABI config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20231028/202310281500.latmtbJs-lkp@intel.com/config) compiler: m68k-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231028/202310281500.latmtbJs-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202310281500.latmtbJs-lkp@intel.com/ All warnings (new ones prefixed by >>): >> mm/userfaultfd.c:1289: warning: Function parameter or member 'ctx' not described in 'move_pages' >> mm/userfaultfd.c:1289: warning: Function parameter or member 'mm' not described in 'move_pages' >> mm/userfaultfd.c:1289: warning: Function parameter or member 'mode' not described in 'move_pages' vim +1289 mm/userfaultfd.c 1211 1212 /** 1213 * move_pages - move arbitrary anonymous pages of an existing vma 1214 * @dst_start: start of the destination virtual memory range 1215 * @src_start: start of the source virtual memory range 1216 * @len: length of the virtual memory range 1217 * 1218 * Must be called with mmap_lock held for read. 1219 * 1220 * move_pages() remaps arbitrary anonymous pages atomically in zero 1221 * copy. It only works on non shared anonymous pages because those can 1222 * be relocated without generating non linear anon_vmas in the rmap 1223 * code. 1224 * 1225 * It provides a zero copy mechanism to handle userspace page faults. 1226 * The source vma pages should have mapcount == 1, which can be 1227 * enforced by using madvise(MADV_DONTFORK) on src vma. 1228 * 1229 * The thread receiving the page during the userland page fault 1230 * will receive the faulting page in the source vma through the network, 1231 * storage or any other I/O device (MADV_DONTFORK in the source vma 1232 * avoids move_pages() to fail with -EBUSY if the process forks before 1233 * move_pages() is called), then it will call move_pages() to map the 1234 * page in the faulting address in the destination vma. 1235 * 1236 * This userfaultfd command works purely via pagetables, so it's the 1237 * most efficient way to move physical non shared anonymous pages 1238 * across different virtual addresses. Unlike mremap()/mmap()/munmap() 1239 * it does not create any new vmas. The mapping in the destination 1240 * address is atomic. 1241 * 1242 * It only works if the vma protection bits are identical from the 1243 * source and destination vma. 1244 * 1245 * It can remap non shared anonymous pages within the same vma too. 1246 * 1247 * If the source virtual memory range has any unmapped holes, or if 1248 * the destination virtual memory range is not a whole unmapped hole, 1249 * move_pages() will fail respectively with -ENOENT or -EEXIST. This 1250 * provides a very strict behavior to avoid any chance of memory 1251 * corruption going unnoticed if there are userland race conditions. 1252 * Only one thread should resolve the userland page fault at any given 1253 * time for any given faulting address. This means that if two threads 1254 * try to both call move_pages() on the same destination address at the 1255 * same time, the second thread will get an explicit error from this 1256 * command. 1257 * 1258 * The command retval will return "len" is successful. The command 1259 * however can be interrupted by fatal signals or errors. If 1260 * interrupted it will return the number of bytes successfully 1261 * remapped before the interruption if any, or the negative error if 1262 * none. It will never return zero. Either it will return an error or 1263 * an amount of bytes successfully moved. If the retval reports a 1264 * "short" remap, the move_pages() command should be repeated by 1265 * userland with src+retval, dst+reval, len-retval if it wants to know 1266 * about the error that interrupted it. 1267 * 1268 * The UFFDIO_MOVE_MODE_ALLOW_SRC_HOLES flag can be specified to 1269 * prevent -ENOENT errors to materialize if there are holes in the 1270 * source virtual range that is being remapped. The holes will be 1271 * accounted as successfully remapped in the retval of the 1272 * command. This is mostly useful to remap hugepage naturally aligned 1273 * virtual regions without knowing if there are transparent hugepage 1274 * in the regions or not, but preventing the risk of having to split 1275 * the hugepmd during the remap. 1276 * 1277 * If there's any rmap walk that is taking the anon_vma locks without 1278 * first obtaining the folio lock (the only current instance is 1279 * folio_referenced), they will have to verify if the folio->mapping 1280 * has changed after taking the anon_vma lock. If it changed they 1281 * should release the lock and retry obtaining a new anon_vma, because 1282 * it means the anon_vma was changed by move_pages() before the lock 1283 * could be obtained. This is the only additional complexity added to 1284 * the rmap code to provide this anonymous page remapping functionality. 1285 */ 1286 ssize_t move_pages(struct userfaultfd_ctx *ctx, struct mm_struct *mm, 1287 unsigned long dst_start, unsigned long src_start, 1288 unsigned long len, __u64 mode) > 1289 { -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki