From: kernel test robot <lkp@intel.com>
To: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Richard Weinberger <richard@nod.at>
Subject: arch/um/kernel/skas/uaccess.c:269: warning: Function parameter or member 'op' not described in 'arch_futex_atomic_op_inuser'
Date: Sun, 15 Oct 2023 10:51:39 +0800 [thread overview]
Message-ID: <202310151047.a07DrQNV-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dc9b2e683bcba017588b9aaad80f442ad004a48f
commit: dd3035a21ba7ccaa883d7107d357ad06320d78fc um: add a UML specific futex implementation
date: 2 years, 4 months ago
config: um-allnoconfig (https://download.01.org/0day-ci/archive/20231015/202310151047.a07DrQNV-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231015/202310151047.a07DrQNV-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/202310151047.a07DrQNV-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> arch/um/kernel/skas/uaccess.c:269: warning: Function parameter or member 'op' not described in 'arch_futex_atomic_op_inuser'
>> arch/um/kernel/skas/uaccess.c:269: warning: Function parameter or member 'oparg' not described in 'arch_futex_atomic_op_inuser'
>> arch/um/kernel/skas/uaccess.c:269: warning: Function parameter or member 'oval' not described in 'arch_futex_atomic_op_inuser'
>> arch/um/kernel/skas/uaccess.c:269: warning: Excess function parameter 'encoded_op' description in 'arch_futex_atomic_op_inuser'
vim +269 arch/um/kernel/skas/uaccess.c
252
253 /**
254 * arch_futex_atomic_op_inuser() - Atomic arithmetic operation with constant
255 * argument and comparison of the previous
256 * futex value with another constant.
257 *
258 * @encoded_op: encoded operation to execute
259 * @uaddr: pointer to user space address
260 *
261 * Return:
262 * 0 - On success
263 * -EFAULT - User access resulted in a page fault
264 * -EAGAIN - Atomic operation was unable to complete due to contention
265 * -ENOSYS - Operation not supported
266 */
267
268 int arch_futex_atomic_op_inuser(int op, u32 oparg, int *oval, u32 __user *uaddr)
> 269 {
270 int oldval, ret;
271 struct page *page;
272 unsigned long addr = (unsigned long) uaddr;
273 pte_t *pte;
274
275 ret = -EFAULT;
276 if (!access_ok(uaddr, sizeof(*uaddr)))
277 return -EFAULT;
278 preempt_disable();
279 pte = maybe_map(addr, 1);
280 if (pte == NULL)
281 goto out_inuser;
282
283 page = pte_page(*pte);
284 #ifdef CONFIG_64BIT
285 pagefault_disable();
286 addr = (unsigned long) page_address(page) +
287 (((unsigned long) addr) & ~PAGE_MASK);
288 #else
289 addr = (unsigned long) kmap_atomic(page) +
290 ((unsigned long) addr & ~PAGE_MASK);
291 #endif
292 uaddr = (u32 *) addr;
293 oldval = *uaddr;
294
295 ret = 0;
296
297 switch (op) {
298 case FUTEX_OP_SET:
299 *uaddr = oparg;
300 break;
301 case FUTEX_OP_ADD:
302 *uaddr += oparg;
303 break;
304 case FUTEX_OP_OR:
305 *uaddr |= oparg;
306 break;
307 case FUTEX_OP_ANDN:
308 *uaddr &= ~oparg;
309 break;
310 case FUTEX_OP_XOR:
311 *uaddr ^= oparg;
312 break;
313 default:
314 ret = -ENOSYS;
315 }
316 #ifdef CONFIG_64BIT
317 pagefault_enable();
318 #else
319 kunmap_atomic((void *)addr);
320 #endif
321
322 out_inuser:
323 preempt_enable();
324
325 if (ret == 0)
326 *oval = oldval;
327
328 return ret;
329 }
330 EXPORT_SYMBOL(arch_futex_atomic_op_inuser);
331
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-10-15 2:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202310151047.a07DrQNV-lkp@intel.com \
--to=lkp@intel.com \
--cc=anton.ivanov@cambridgegreys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=richard@nod.at \
/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
all inboxes | Powered by JetHome®