From: kernel test robot <lkp@intel.com>
To: "André Almeida" <andrealmeid@igalia.com>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>,
"Peter Zijlstra" <peterz@infradead.org>,
"Darren Hart" <dvhart@infradead.org>,
"Davidlohr Bueso" <dave@stgolabs.net>,
"Shuah Khan" <skhan@linuxfoundation.org>,
"Arnd Bergmann" <arnd@arndb.de>,
"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
"Waiman Long" <longman@redhat.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, linux-api@vger.kernel.org,
"André Almeida" <andrealmeid@igalia.com>
Subject: Re: [PATCH v4 4/7] futex: Create set_robust_list2
Date: Thu, 22 May 2025 19:39:54 +0800 [thread overview]
Message-ID: <202505221953.JKgFsA3U-lkp@intel.com> (raw)
In-Reply-To: <20250520-tonyk-robust_futex-v4-4-1123093e59de@igalia.com>
Hi André,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 3ee84e3dd88e39b55b534e17a7b9a181f1d46809]
url: https://github.com/intel-lab-lkp/linux/commits/Andr-Almeida/selftests-futex-Add-ASSERT_-macros/20250521-045231
base: 3ee84e3dd88e39b55b534e17a7b9a181f1d46809
patch link: https://lore.kernel.org/r/20250520-tonyk-robust_futex-v4-4-1123093e59de%40igalia.com
patch subject: [PATCH v4 4/7] futex: Create set_robust_list2
config: arm-randconfig-r122-20250522 (https://download.01.org/0day-ci/archive/20250522/202505221953.JKgFsA3U-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce: (https://download.01.org/0day-ci/archive/20250522/202505221953.JKgFsA3U-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/202505221953.JKgFsA3U-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
kernel/futex/core.c:581:38: sparse: sparse: cast removes address space '__user' of expression
kernel/futex/core.c:581:51: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int [noderef] [usertype] __user *naddr @@ got void * @@
kernel/futex/core.c:581:51: sparse: expected unsigned int [noderef] [usertype] __user *naddr
kernel/futex/core.c:581:51: sparse: got void *
kernel/futex/core.c:597:38: sparse: sparse: cast removes address space '__user' of expression
kernel/futex/core.c:597:51: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int [noderef] [usertype] __user *naddr @@ got void * @@
kernel/futex/core.c:597:51: sparse: expected unsigned int [noderef] [usertype] __user *naddr
kernel/futex/core.c:597:51: sparse: got void *
kernel/futex/core.c:1268:59: sparse: sparse: cast removes address space '__user' of expression
>> kernel/futex/core.c:1268:59: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected unsigned int [noderef] [usertype] __user *head @@ got unsigned int [usertype] * @@
kernel/futex/core.c:1268:59: sparse: expected unsigned int [noderef] [usertype] __user *head
kernel/futex/core.c:1268:59: sparse: got unsigned int [usertype] *
kernel/futex/core.c:978:9: sparse: sparse: context imbalance in 'futex_q_lockptr_lock' - wrong count at exit
vim +1268 kernel/futex/core.c
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1247
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1248 /*
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1249 * Walk curr->robust_list (very carefully, it's a userspace list!)
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1250 * and mark any locks found there dead, and notify any waiters.
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1251 *
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1252 * We silently return on any sign of list-walking problem.
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1253 */
1c5e99b662506e kernel/futex/core.c André Almeida 2025-05-20 1254 static void exit_robust_list32(struct task_struct *curr,
1c5e99b662506e kernel/futex/core.c André Almeida 2025-05-20 1255 struct robust_list_head32 __user *head)
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1256 {
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1257 struct robust_list __user *entry, *next_entry, *pending;
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1258 unsigned int limit = ROBUST_LIST_LIMIT, pi, pip;
3f649ab728cda8 kernel/futex.c Kees Cook 2020-06-03 1259 unsigned int next_pi;
b9412773325c3a kernel/futex/core.c André Almeida 2025-05-20 1260 u32 uentry, next_uentry, upending;
b9412773325c3a kernel/futex/core.c André Almeida 2025-05-20 1261 s32 futex_offset;
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1262 int rc;
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1263
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1264 /*
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1265 * Fetch the list head (which was registered earlier, via
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1266 * sys_set_robust_list()):
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1267 */
b9412773325c3a kernel/futex/core.c André Almeida 2025-05-20 @1268 if (fetch_robust_entry32((u32 *)&uentry, &entry, (u32 *)&head->list.next, &pi))
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1269 return;
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1270 /*
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1271 * Fetch the relative futex offset:
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1272 */
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1273 if (get_user(futex_offset, &head->futex_offset))
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1274 return;
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1275 /*
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1276 * Fetch any possibly pending lock-add first, and handle it
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1277 * if it exists:
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1278 */
b9412773325c3a kernel/futex/core.c André Almeida 2025-05-20 1279 if (fetch_robust_entry32(&upending, &pending,
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1280 &head->list_op_pending, &pip))
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1281 return;
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1282
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1283 next_entry = NULL; /* avoid warning with gcc */
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1284 while (entry != (struct robust_list __user *) &head->list) {
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1285 /*
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1286 * Fetch the next entry in the list before calling
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1287 * handle_futex_death:
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1288 */
b9412773325c3a kernel/futex/core.c André Almeida 2025-05-20 1289 rc = fetch_robust_entry32(&next_uentry, &next_entry,
b9412773325c3a kernel/futex/core.c André Almeida 2025-05-20 1290 (u32 __user *)&entry->next, &next_pi);
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1291 /*
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1292 * A pending lock might already be on the list, so
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1293 * dont process it twice:
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1294 */
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1295 if (entry != pending) {
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1296 void __user *uaddr = futex_uaddr(entry, futex_offset);
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1297
ca16d5bee59807 kernel/futex.c Yang Tao 2019-11-06 1298 if (handle_futex_death(uaddr, curr, pi,
ca16d5bee59807 kernel/futex.c Yang Tao 2019-11-06 1299 HANDLE_DEATH_LIST))
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1300 return;
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1301 }
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1302 if (rc)
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1303 return;
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1304 uentry = next_uentry;
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1305 entry = next_entry;
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1306 pi = next_pi;
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1307 /*
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1308 * Avoid excessively long or circular lists:
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1309 */
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1310 if (!--limit)
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1311 break;
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1312
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1313 cond_resched();
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1314 }
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1315 if (pending) {
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1316 void __user *uaddr = futex_uaddr(pending, futex_offset);
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1317
ca16d5bee59807 kernel/futex.c Yang Tao 2019-11-06 1318 handle_futex_death(uaddr, curr, pip, HANDLE_DEATH_PENDING);
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1319 }
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1320 }
04e7712f446058 kernel/futex.c Arnd Bergmann 2018-04-17 1321
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-05-22 11:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-20 20:48 [PATCH v4 0/7] " André Almeida
2025-05-20 20:48 ` [PATCH v4 1/7] selftests/futex: Add ASSERT_ macros André Almeida
2025-05-20 20:48 ` [PATCH v4 2/7] selftests/futex: Create test for robust list André Almeida
2025-05-20 20:48 ` [PATCH v4 3/7] futex: Use explicit sizes for compat_exit_robust_list André Almeida
2025-05-21 13:32 ` kernel test robot
2025-05-20 20:48 ` [PATCH v4 4/7] futex: Create set_robust_list2 André Almeida
2025-05-21 14:24 ` kernel test robot
2025-05-22 11:39 ` kernel test robot [this message]
2025-05-20 20:48 ` [PATCH v4 5/7] futex: Wire up set_robust_list2 syscall André Almeida
2025-05-21 20:23 ` kernel test robot
2025-05-20 20:48 ` [PATCH v4 6/7] futex: Remove the limit of elements for sys_set_robust_list2 lists André Almeida
2025-05-20 20:48 ` [PATCH v4 7/7] selftests: futex: Expand robust list test for the new interface André Almeida
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=202505221953.JKgFsA3U-lkp@intel.com \
--to=lkp@intel.com \
--cc=andrealmeid@igalia.com \
--cc=arnd@arndb.de \
--cc=bigeasy@linutronix.de \
--cc=dave@stgolabs.net \
--cc=dvhart@infradead.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=peterz@infradead.org \
--cc=skhan@linuxfoundation.org \
--cc=tglx@linutronix.de \
/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®