* [scosu-sched:topic/mmap-cap-prot-wip/v6.18 115/1130] kernel/ptrace.c:1339:37: error: passing 'void **' to parameter of type 'const void **' discards qualifiers in nested pointer types
@ 2026-05-21 3:22 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-05-21 3:22 UTC (permalink / raw)
To: Christian Ehrhardt; +Cc: llvm, oe-kbuild-all
Hi Christian,
FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
tree: https://github.com/scosu/linux-sched topic/mmap-cap-prot-wip/v6.18
head: f69a5a9d9fee15edde28429e23a4c749a59937bd
commit: b8dd58a99f3a6b933636441f72da97e1a06c8a57 [115/1130] [CHERRY-PICK] kernel/ptrace: Modify ptrace syscall to accept capability arguments
config: um-allnoconfig (https://download.01.org/0day-ci/archive/20260521/202605211145.HiFuURcJ-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260521/202605211145.HiFuURcJ-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/202605211145.HiFuURcJ-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from kernel/ptrace.c:16:
In file included from include/linux/sched/task.h:13:
include/linux/uaccess.h:726:9: warning: 'get_user_ptr' macro redefined [-Wmacro-redefined]
726 | #define get_user_ptr(x,y) __get_user(x,y)
| ^
include/asm-generic/uaccess.h:259:9: note: previous definition is here
259 | #define get_user_ptr(x, ptr) \
| ^
In file included from kernel/ptrace.c:16:
In file included from include/linux/sched/task.h:13:
include/linux/uaccess.h:727:9: warning: 'put_user_ptr' macro redefined [-Wmacro-redefined]
727 | #define put_user_ptr(x,y) __put_user(x,y)
| ^
include/asm-generic/uaccess.h:218:9: note: previous definition is here
218 | #define put_user_ptr(x, ptr) \
| ^
>> kernel/ptrace.c:1339:37: error: passing 'void **' to parameter of type 'const void **' discards qualifiers in nested pointer types [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
1339 | if (__get_user_ptr(kiov.iov_base, &uiov->iov_base) ||
| ^~~~~~~~~~~~~~~
include/asm-generic/uaccess.h:254:31: note: expanded from macro '__get_user_ptr'
254 | __gu_err = __get_user_ptr_fn(ptr, &__x); \
| ^~~
include/asm-generic/uaccess.h:286:51: note: expanded from macro '__get_user_ptr_fn'
286 | #define __get_user_ptr_fn(u, k) __get_user_ptr_fn(u, k)
| ^
include/asm-generic/uaccess.h:279:47: note: passing argument to parameter 'ptr' here
279 | __get_user_ptr_fn(const void __user * __user *ptr,
| ^
2 warnings and 1 error generated.
vim +1339 kernel/ptrace.c
1313
1314 case PTRACE_SINGLESTEP:
1315 #ifdef PTRACE_SINGLEBLOCK
1316 case PTRACE_SINGLEBLOCK:
1317 #endif
1318 #ifdef PTRACE_SYSEMU
1319 case PTRACE_SYSEMU:
1320 case PTRACE_SYSEMU_SINGLESTEP:
1321 #endif
1322 case PTRACE_SYSCALL:
1323 case PTRACE_CONT:
1324 return ptrace_resume(child, request, data);
1325
1326 case PTRACE_KILL:
1327 send_sig_info(SIGKILL, SEND_SIG_NOINFO, child);
1328 return 0;
1329
1330 #ifdef CONFIG_HAVE_ARCH_TRACEHOOK
1331 case PTRACE_GETREGSET:
1332 case PTRACE_SETREGSET: {
1333 struct iovec kiov;
1334 struct iovec __user *uiov = datavp;
1335
1336 if (!access_ok(uiov, sizeof(*uiov)))
1337 return -EFAULT;
1338
> 1339 if (__get_user_ptr(kiov.iov_base, &uiov->iov_base) ||
1340 __get_user(kiov.iov_len, &uiov->iov_len))
1341 return -EFAULT;
1342
1343 ret = ptrace_regset(child, request, addr, &kiov);
1344 if (!ret)
1345 ret = __put_user(kiov.iov_len, &uiov->iov_len);
1346 break;
1347 }
1348
1349 case PTRACE_GET_SYSCALL_INFO:
1350 ret = ptrace_get_syscall_info(child, addr, datavp);
1351 break;
1352
1353 case PTRACE_SET_SYSCALL_INFO:
1354 ret = ptrace_set_syscall_info(child, addr, datavp);
1355 break;
1356 #endif
1357
1358 case PTRACE_SECCOMP_GET_FILTER:
1359 ret = seccomp_get_filter(child, addr, datavp);
1360 break;
1361
1362 case PTRACE_SECCOMP_GET_METADATA:
1363 ret = seccomp_get_metadata(child, addr, datavp);
1364 break;
1365
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-05-21 3:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-21 3:22 [scosu-sched:topic/mmap-cap-prot-wip/v6.18 115/1130] kernel/ptrace.c:1339:37: error: passing 'void **' to parameter of type 'const void **' discards qualifiers in nested pointer types kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox