From: kernel test robot <lkp@intel.com>
To: "Muhammad Usama Anjum" <usama.anjum@collabora.com>,
"Peter Xu" <peterx@redhat.com>,
"David Hildenbrand" <david@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>,
"Cyrill Gorcunov" <gorcunov@gmail.com>,
"Mike Rapoport" <rppt@kernel.org>,
"Nadav Amit" <namit@vmware.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>
Subject: Re: [PATCH v19 2/5] fs/proc/task_mmu: Implement IOCTL to get and optionally clear info about PTEs
Date: Fri, 16 Jun 2023 00:40:49 +0800 [thread overview]
Message-ID: <202306160006.dNg0cOoc-lkp@intel.com> (raw)
In-Reply-To: <20230615141144.665148-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-20230615]
[cannot apply to linus/master v6.4-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/20230615-225037
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/20230615141144.665148-3-usama.anjum%40collabora.com
patch subject: [PATCH v19 2/5] fs/proc/task_mmu: Implement IOCTL to get and optionally clear info about PTEs
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20230616/202306160006.dNg0cOoc-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 12.3.0
reproduce (this is a W=1 build):
mkdir -p ~/bin
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add akpm-mm https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git
git fetch akpm-mm mm-everything
git checkout akpm-mm/mm-everything
b4 shazam https://lore.kernel.org/r/20230615141144.665148-3-usama.anjum@collabora.com
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=m68k olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash fs/proc/
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/202306160006.dNg0cOoc-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_args_valid':
>> fs/proc/task_mmu.c:2148:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
2148 | if (!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:2148:22: note: in expansion of macro 'access_ok'
2148 | if (!access_ok((void __user *)arg->vec,
| ^~~~~~~~~
vim +2148 fs/proc/task_mmu.c
2115
2116 static int pagemap_scan_args_valid(struct pm_scan_arg *arg, unsigned long start,
2117 struct page_region __user *vec)
2118 {
2119 /* Detect illegal size, flags, len and masks */
2120 if (arg->size != sizeof(struct pm_scan_arg))
2121 return -EINVAL;
2122 if (!arg->flags)
2123 return -EINVAL;
2124 if (arg->flags & ~PM_SCAN_OPS)
2125 return -EINVAL;
2126 if (!arg->len)
2127 return -EINVAL;
2128 if ((arg->required_mask | arg->anyof_mask | arg->excluded_mask |
2129 arg->return_mask) & ~PM_SCAN_BITS_ALL)
2130 return -EINVAL;
2131 if (!arg->required_mask && !arg->anyof_mask &&
2132 !arg->excluded_mask)
2133 return -EINVAL;
2134 if (!arg->return_mask)
2135 return -EINVAL;
2136
2137 /* Validate memory range */
2138 if (!IS_ALIGNED(start, PAGE_SIZE))
2139 return -EINVAL;
2140 if (!access_ok((void __user *)start, arg->len))
2141 return -EFAULT;
2142
2143 if (IS_PM_SCAN_GET(arg->flags)) {
2144 if (!arg->vec)
2145 return -EINVAL;
2146 if (arg->vec_len == 0)
2147 return -EINVAL;
> 2148 if (!access_ok((void __user *)arg->vec,
2149 arg->vec_len * sizeof(struct page_region)))
2150 return -EFAULT;
2151 }
2152
2153 if (IS_PM_SCAN_WP(arg->flags) && !IS_PM_SCAN_GET(arg->flags) &&
2154 arg->max_pages)
2155 return -EINVAL;
2156
2157 return 0;
2158 }
2159
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2023-06-15 16:42 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-15 14:11 [PATCH v19 0/5] Implement IOCTL to get and optionally clear info about PTEs Muhammad Usama Anjum
2023-06-15 14:11 ` [PATCH v19 1/5] userfaultfd: UFFD_FEATURE_WP_ASYNC Muhammad Usama Anjum
2023-06-15 14:11 ` [PATCH v19 2/5] fs/proc/task_mmu: Implement IOCTL to get and optionally clear info about PTEs Muhammad Usama Anjum
2023-06-15 16:40 ` kernel test robot [this message]
2023-06-17 6:39 ` Andrei Vagin
2023-06-19 6:06 ` Muhammad Usama Anjum
2023-06-20 11:19 ` Muhammad Usama Anjum
2023-06-21 6:42 ` Andrei Vagin
2023-06-21 7:02 ` Muhammad Usama Anjum
2023-06-20 18:03 ` Andrei Vagin
2023-06-21 6:34 ` Muhammad Usama Anjum
2023-06-21 13:29 ` Michał Mirosław
2023-06-22 9:59 ` Muhammad Usama Anjum
2023-06-21 19:45 ` Andrei Vagin
2023-06-22 10:20 ` Muhammad Usama Anjum
2023-06-23 9:44 ` Michał Mirosław
2023-06-15 14:11 ` [PATCH v19 3/5] tools headers UAPI: Update linux/fs.h with the kernel sources Muhammad Usama Anjum
2023-06-15 14:11 ` [PATCH v19 4/5] mm/pagemap: add documentation of PAGEMAP_SCAN IOCTL Muhammad Usama Anjum
2023-06-15 14:11 ` [PATCH v19 5/5] 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=202306160006.dNg0cOoc-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=david@redhat.com \
--cc=emmir@google.com \
--cc=gorcunov@gmail.com \
--cc=greg@kroah.com \
--cc=gustavoars@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).