From: kernel test robot <lkp@intel.com>
To: Andrii Nakryiko <andrii@kernel.org>,
linux-trace-kernel@vger.kernel.org, peterz@infradead.org,
oleg@redhat.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
rostedt@goodmis.org, mhiramat@kernel.org, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org, jolsa@kernel.org,
paulmck@kernel.org, willy@infradead.org, surenb@google.com,
akpm@linux-foundation.org, linux-mm@kvack.org, mjguzik@gmail.com,
brauner@kernel.org, jannh@google.com, mhocko@kernel.org,
vbabka@suse.cz, mingo@kernel.org,
Andrii Nakryiko <andrii@kernel.org>
Subject: Re: [PATCH v2 tip/perf/core 5/5] uprobes: add speculative lockless VMA-to-inode-to-uprobe resolution
Date: Sat, 5 Oct 2024 09:12:58 +0800 [thread overview]
Message-ID: <202410050846.Zbsm9OI1-lkp@intel.com> (raw)
In-Reply-To: <20241001225207.2215639-6-andrii@kernel.org>
Hi Andrii,
kernel test robot noticed the following build errors:
[auto build test ERROR on tip/perf/core]
url: https://github.com/intel-lab-lkp/linux/commits/Andrii-Nakryiko/mm-introduce-mmap_lock_speculation_-start-end/20241002-065354
base: tip/perf/core
patch link: https://lore.kernel.org/r/20241001225207.2215639-6-andrii%40kernel.org
patch subject: [PATCH v2 tip/perf/core 5/5] uprobes: add speculative lockless VMA-to-inode-to-uprobe resolution
config: i386-defconfig (https://download.01.org/0day-ci/archive/20241005/202410050846.Zbsm9OI1-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241005/202410050846.Zbsm9OI1-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/202410050846.Zbsm9OI1-lkp@intel.com/
All errors (new ones prefixed by >>):
>> kernel/events/uprobes.c:2098:39: error: incompatible pointer types passing 'long *' to parameter of type 'int *' [-Werror,-Wincompatible-pointer-types]
2098 | if (!mmap_lock_speculation_start(mm, &seq))
| ^~~~
include/linux/mmap_lock.h:126:75: note: passing argument to parameter 'seq' here
126 | static inline bool mmap_lock_speculation_start(struct mm_struct *mm, int *seq) { return false; }
| ^
1 error generated.
vim +2098 kernel/events/uprobes.c
2086
2087 static struct uprobe *find_active_uprobe_speculative(unsigned long bp_vaddr)
2088 {
2089 struct mm_struct *mm = current->mm;
2090 struct uprobe *uprobe = NULL;
2091 struct vm_area_struct *vma;
2092 struct file *vm_file;
2093 loff_t offset;
2094 long seq;
2095
2096 guard(rcu)();
2097
> 2098 if (!mmap_lock_speculation_start(mm, &seq))
2099 return NULL;
2100
2101 vma = vma_lookup(mm, bp_vaddr);
2102 if (!vma)
2103 return NULL;
2104
2105 /* vm_file memory can be reused for another instance of struct file,
2106 * but can't be freed from under us, so it's safe to read fields from
2107 * it, even if the values are some garbage values; ultimately
2108 * find_uprobe_rcu() + mmap_lock_speculation_end() check will ensure
2109 * that whatever we speculatively found is correct
2110 */
2111 vm_file = READ_ONCE(vma->vm_file);
2112 if (!vm_file)
2113 return NULL;
2114
2115 offset = (loff_t)(vma->vm_pgoff << PAGE_SHIFT) + (bp_vaddr - vma->vm_start);
2116 uprobe = find_uprobe_rcu(vm_file->f_inode, offset);
2117 if (!uprobe)
2118 return NULL;
2119
2120 /* now double check that nothing about MM changed */
2121 if (!mmap_lock_speculation_end(mm, seq))
2122 return NULL;
2123
2124 return uprobe;
2125 }
2126
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
parent reply other threads:[~2024-10-05 1:13 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20241001225207.2215639-6-andrii@kernel.org>]
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=202410050846.Zbsm9OI1-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brauner@kernel.org \
--cc=jannh@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mhiramat@kernel.org \
--cc=mhocko@kernel.org \
--cc=mingo@kernel.org \
--cc=mjguzik@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oleg@redhat.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
/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).