From: kernel test robot <lkp@intel.com>
To: "Muhammad Usama Anjum" <usama.anjum@collabora.com>,
"Peter Xu" <peterx@redhat.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Michał Mirosław" <emmir@google.com>,
"Andrei Vagin" <avagin@gmail.com>,
"Danylo Mocherniuk" <mdanylo@google.com>,
"Paul Gofman" <pgofman@codeweavers.com>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Shuah Khan <skhan@linuxfoundation.org>,
Christian Brauner <brauner@kernel.org>,
Yang Shi <shy828301@gmail.com>, Vlastimil Babka <vbabka@suse.cz>,
"Liam R . Howlett" <Liam.Howlett@oracle.com>,
Yun Zhou <yun.zhou@windriver.com>,
Suren Baghdasaryan <surenb@google.com>,
Alex Sierra <alex.sierra@amd.com>,
Muhammad Usama Anjum <usama.anjum@collabora.com>,
Matthew Wilcox <willy@infradead.org>,
Pasha Tatashin <pasha.tatashin@soleen.com>,
Axel Rasmussen <axelrasmussen@google.com>,
"Gustavo A . R . Silva" <gustavoars@kernel.org>,
Dan Williams <dan.j.williams@intel.com>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kselftest@vger.kernel.org, Greg KH <greg@kroah.com>,
kernel@collabora.com, Cyrill Gorcunov <gorcunov@gmail.com>,
Mike Rapoport <rppt@kernel.org>, Nadav Amit <namit@vmware.com>
Subject: Re: [PATCH v30 2/6] fs/proc/task_mmu: Implement IOCTL to get and optionally clear info about PTEs
Date: Wed, 16 Aug 2023 17:17:02 +0800 [thread overview]
Message-ID: <202308161737.upLWpu8Q-lkp@intel.com> (raw)
In-Reply-To: <20230816065925.850879-3-usama.anjum@collabora.com>
Hi Muhammad,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on next-20230815]
[cannot apply to linus/master v6.5-rc6]
[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/Muhammad-Usama-Anjum/userfaultfd-UFFD_FEATURE_WP_ASYNC/20230816-150412
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/20230816065925.850879-3-usama.anjum%40collabora.com
patch subject: [PATCH v30 2/6] fs/proc/task_mmu: Implement IOCTL to get and optionally clear info about PTEs
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20230816/202308161737.upLWpu8Q-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230816/202308161737.upLWpu8Q-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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308161737.upLWpu8Q-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from include/asm-generic/bug.h:5,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/mm.h:6,
from include/linux/pagewalk.h:5,
from fs/proc/task_mmu.c:2:
fs/proc/task_mmu.c: In function 'pagemap_scan_get_args':
>> fs/proc/task_mmu.c:2269:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
2269 | if (!access_ok((void __user *)arg->start, arg->end - arg->start))
| ^
include/linux/compiler.h:76:45: note: in definition of macro 'likely'
76 | # define likely(x) __builtin_expect(!!(x), 1)
| ^
fs/proc/task_mmu.c:2269:14: note: in expansion of macro 'access_ok'
2269 | if (!access_ok((void __user *)arg->start, arg->end - arg->start))
| ^~~~~~~~~
fs/proc/task_mmu.c:2273:36: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
2273 | if (arg->vec && !access_ok((void __user *)arg->vec,
| ^
include/linux/compiler.h:76:45: note: in definition of macro 'likely'
76 | # define likely(x) __builtin_expect(!!(x), 1)
| ^
fs/proc/task_mmu.c:2273:26: note: in expansion of macro 'access_ok'
2273 | if (arg->vec && !access_ok((void __user *)arg->vec,
| ^~~~~~~~~
fs/proc/task_mmu.c: In function 'pagemap_scan_init_bounce_buffer':
fs/proc/task_mmu.c:2310:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
2310 | p->vec_out = (struct page_region __user *)p->arg.vec;
| ^
fs/proc/task_mmu.c: At top level:
fs/proc/task_mmu.c:1998:13: warning: 'pagemap_scan_backout_range' defined but not used [-Wunused-function]
1998 | static void pagemap_scan_backout_range(struct pagemap_scan_private *p,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
vim +2269 fs/proc/task_mmu.c
2245
2246 static int pagemap_scan_get_args(struct pm_scan_arg *arg,
2247 unsigned long uarg)
2248 {
2249 if (copy_from_user(arg, (void __user *)uarg, sizeof(*arg)))
2250 return -EFAULT;
2251
2252 if (arg->size != sizeof(struct pm_scan_arg))
2253 return -EINVAL;
2254
2255 /* Validate requested features */
2256 if (arg->flags & ~PM_SCAN_FLAGS)
2257 return -EINVAL;
2258 if ((arg->category_inverted | arg->category_mask |
2259 arg->category_anyof_mask | arg->return_mask) & ~PM_SCAN_CATEGORIES)
2260 return -EINVAL;
2261
2262 arg->start = untagged_addr((unsigned long)arg->start);
2263 arg->end = untagged_addr((unsigned long)arg->end);
2264 arg->vec = untagged_addr((unsigned long)arg->vec);
2265
2266 /* Validate memory pointers */
2267 if (!IS_ALIGNED(arg->start, PAGE_SIZE))
2268 return -EINVAL;
> 2269 if (!access_ok((void __user *)arg->start, arg->end - arg->start))
2270 return -EFAULT;
2271 if (!arg->vec && arg->vec_len)
2272 return -EINVAL;
2273 if (arg->vec && !access_ok((void __user *)arg->vec,
2274 arg->vec_len * sizeof(struct page_region)))
2275 return -EFAULT;
2276
2277 /* Fixup default values */
2278 arg->end = ALIGN(arg->end, PAGE_SIZE);
2279 arg->walk_end = 0;
2280 if (!arg->max_pages)
2281 arg->max_pages = ULONG_MAX;
2282
2283 return 0;
2284 }
2285
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2023-08-16 9:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-16 6:59 [PATCH v30 0/6] " Muhammad Usama Anjum
2023-08-16 6:59 ` [PATCH v30 1/6] userfaultfd: UFFD_FEATURE_WP_ASYNC Muhammad Usama Anjum
2023-08-16 6:59 ` [PATCH v30 2/6] fs/proc/task_mmu: Implement IOCTL to get and optionally clear info about PTEs Muhammad Usama Anjum
2023-08-16 9:17 ` kernel test robot [this message]
2023-08-16 9:45 ` Michał Mirosław
2023-08-16 10:28 ` Muhammad Usama Anjum
2023-08-16 6:59 ` [PATCH v30 4/6] tools headers UAPI: Update linux/fs.h with the kernel sources Muhammad Usama Anjum
2023-08-16 6:59 ` [PATCH v30 5/6] mm/pagemap: add documentation of PAGEMAP_SCAN IOCTL Muhammad Usama Anjum
2023-08-16 6:59 ` [PATCH v30 6/6] selftests: mm: add pagemap ioctl tests Muhammad Usama Anjum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202308161737.upLWpu8Q-lkp@intel.com \
--to=lkp@intel.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=alex.sierra@amd.com \
--cc=avagin@gmail.com \
--cc=axelrasmussen@google.com \
--cc=brauner@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=emmir@google.com \
--cc=gorcunov@gmail.com \
--cc=greg@kroah.com \
--cc=gustavoars@kernel.org \
--cc=kernel@collabora.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mdanylo@google.com \
--cc=namit@vmware.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pasha.tatashin@soleen.com \
--cc=peterx@redhat.com \
--cc=pgofman@codeweavers.com \
--cc=rppt@kernel.org \
--cc=shy828301@gmail.com \
--cc=skhan@linuxfoundation.org \
--cc=surenb@google.com \
--cc=usama.anjum@collabora.com \
--cc=vbabka@suse.cz \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
--cc=yun.zhou@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox