From: kernel test robot <lkp@intel.com>
To: Jordan Rome <linux@jordanrome.com>, bpf@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-mm@kvack.org, Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Kernel Team <kernel-team@fb.com>,
Andrew Morton <akpm@linux-foundation.org>,
Shakeel Butt <shakeel.butt@linux.dev>,
Alexander Potapenko <glider@google.com>
Subject: Re: [bpf-next v4 1/3] mm: add copy_remote_vm_str
Date: Sun, 26 Jan 2025 22:08:37 +0800 [thread overview]
Message-ID: <202501262133.9mKauA5U-lkp@intel.com> (raw)
In-Reply-To: <20250126124147.3154108-1-linux@jordanrome.com>
Hi Jordan,
kernel test robot noticed the following build errors:
[auto build test ERROR on bpf-next/master]
[also build test ERROR on bpf/master linus/master v6.13 next-20250124]
[cannot apply to akpm-mm/mm-everything]
[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/Jordan-Rome/bpf-Add-bpf_copy_from_user_task_str-kfunc/20250126-204439
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link: https://lore.kernel.org/r/20250126124147.3154108-1-linux%40jordanrome.com
patch subject: [bpf-next v4 1/3] mm: add copy_remote_vm_str
config: arm-allnoconfig (https://download.01.org/0day-ci/archive/20250126/202501262133.9mKauA5U-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250126/202501262133.9mKauA5U-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/202501262133.9mKauA5U-lkp@intel.com/
All errors (new ones prefixed by >>):
>> mm/nommu.c:1717:2: error: use of undeclared identifier 'vma'
1717 | vma = find_vma(mm, addr);
| ^
mm/nommu.c:1718:6: error: use of undeclared identifier 'vma'; did you mean 'vmap'?
1718 | if (vma) {
| ^~~
| vmap
mm/nommu.c:303:15: note: 'vmap' declared here
303 | EXPORT_SYMBOL(vmap);
| ^
mm/nommu.c:1720:21: error: use of undeclared identifier 'vma'
1720 | if (addr + len >= vma->vm_end)
| ^
mm/nommu.c:1721:10: error: use of undeclared identifier 'vma'
1721 | len = vma->vm_end - addr;
| ^
mm/nommu.c:1724:7: error: use of undeclared identifier 'vma'
1724 | if (vma->vm_flags & VM_MAYREAD) {
| ^
>> mm/nommu.c:1725:23: error: incompatible integer to pointer conversion passing 'unsigned long' to parameter of type 'const char *' [-Wint-conversion]
1725 | ret = strscpy(buf, addr, len);
| ^~~~
include/linux/string.h:113:55: note: expanded from macro 'strscpy'
113 | CONCATENATE(__strscpy, COUNT_ARGS(__VA_ARGS__))(dst, src, __VA_ARGS__)
| ^~~
include/linux/string.h:82:21: note: expanded from macro '__strscpy1'
82 | sized_strscpy(dst, src, size + __must_be_cstr(dst) + __must_be_cstr(src))
| ^~~
include/linux/string.h:72:43: note: passing argument to parameter here
72 | ssize_t sized_strscpy(char *, const char *, size_t);
| ^
6 errors generated.
vim +/vma +1717 mm/nommu.c
1703
1704 /*
1705 * Copy a string from another process's address space as given in mm.
1706 * If there is any error return -EFAULT.
1707 */
1708 static int __copy_remote_vm_str(struct mm_struct *mm, unsigned long addr,
1709 void *buf, int len)
1710 {
1711 int ret;
1712
1713 if (mmap_read_lock_killable(mm))
1714 return -EFAULT;
1715
1716 /* the access must start within one of the target process's mappings */
> 1717 vma = find_vma(mm, addr);
1718 if (vma) {
1719 /* don't overrun this mapping */
> 1720 if (addr + len >= vma->vm_end)
1721 len = vma->vm_end - addr;
1722
1723 /* only read mappings where it is permitted */
1724 if (vma->vm_flags & VM_MAYREAD) {
> 1725 ret = strscpy(buf, addr, len);
1726 if (ret < 0)
1727 ret = len - 1;
1728 } else {
1729 ret = -EFAULT;
1730 }
1731 } else {
1732 ret = -EFAULT;
1733 }
1734
1735 mmap_read_unlock(mm);
1736 return ret;
1737 }
1738
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-01-26 14:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-26 12:41 [bpf-next v4 1/3] mm: add copy_remote_vm_str Jordan Rome
2025-01-26 12:41 ` [bpf-next v4 2/3] bpf: Add bpf_copy_from_user_task_str kfunc Jordan Rome
2025-01-26 12:41 ` [bpf-next v4 3/3] selftests/bpf: Add tests for bpf_copy_from_user_task_str Jordan Rome
2025-01-26 14:08 ` kernel test robot [this message]
2025-01-26 14:28 ` [bpf-next v4 1/3] mm: add copy_remote_vm_str kernel test robot
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=202501262133.9mKauA5U-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=glider@google.com \
--cc=kernel-team@fb.com \
--cc=linux-mm@kvack.org \
--cc=linux@jordanrome.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=shakeel.butt@linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.