[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202409080315.xFbJCdN5-lkp@intel.com>
Date: Sun, 8 Sep 2024 03:33:28 +0800
From: kernel test robot <lkp@...el.com>
To: Roman Kisel <romank@...ux.microsoft.com>, oleg@...hat.com,
linux-kernel@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, apais@...rosoft.com,
benhill@...rosoft.com, ssengar@...rosoft.com,
sunilmut@...rosoft.com, vdso@...bites.dev
Subject: Re: [PATCH 1/1] ptrace: Get tracer PID without reliance on the proc
FS
Hi Roman,
kernel test robot noticed the following build warnings:
[auto build test WARNING on ad618736883b8970f66af799e34007475fe33a68]
url: https://github.com/intel-lab-lkp/linux/commits/Roman-Kisel/ptrace-Get-tracer-PID-without-reliance-on-the-proc-FS/20240906-085121
base: ad618736883b8970f66af799e34007475fe33a68
patch link: https://lore.kernel.org/r/20240905212741.143626-2-romank%40linux.microsoft.com
patch subject: [PATCH 1/1] ptrace: Get tracer PID without reliance on the proc FS
config: x86_64-randconfig-122-20240907 (https://download.01.org/0day-ci/archive/20240908/202409080315.xFbJCdN5-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/20240908/202409080315.xFbJCdN5-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409080315.xFbJCdN5-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
kernel/ptrace.c:55:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/ptrace.c:55:22: sparse: struct task_struct *
kernel/ptrace.c:55:22: sparse: struct task_struct [noderef] __rcu *
kernel/ptrace.c:74:23: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct task_struct [noderef] __rcu *parent @@ got struct task_struct *new_parent @@
kernel/ptrace.c:74:23: sparse: expected struct task_struct [noderef] __rcu *parent
kernel/ptrace.c:74:23: sparse: got struct task_struct *new_parent
kernel/ptrace.c:75:29: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct cred const [noderef] __rcu *ptracer_cred @@ got struct cred const * @@
kernel/ptrace.c:75:29: sparse: expected struct cred const [noderef] __rcu *ptracer_cred
kernel/ptrace.c:75:29: sparse: got struct cred const *
kernel/ptrace.c:129:18: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct cred const *old_cred @@ got struct cred const [noderef] __rcu *ptracer_cred @@
kernel/ptrace.c:129:18: sparse: expected struct cred const *old_cred
kernel/ptrace.c:129:18: sparse: got struct cred const [noderef] __rcu *ptracer_cred
kernel/ptrace.c:133:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/ptrace.c:133:25: sparse: expected struct spinlock [usertype] *lock
kernel/ptrace.c:133:25: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:160:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/ptrace.c:160:27: sparse: expected struct spinlock [usertype] *lock
kernel/ptrace.c:160:27: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:192:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/ptrace.c:192:28: sparse: expected struct spinlock [usertype] *lock
kernel/ptrace.c:192:28: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:198:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/ptrace.c:198:30: sparse: expected struct spinlock [usertype] *lock
kernel/ptrace.c:198:30: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:251:44: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/ptrace.c:251:44: sparse: struct task_struct [noderef] __rcu *
kernel/ptrace.c:251:44: sparse: struct task_struct *
kernel/ptrace.c:494:54: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *parent @@ got struct task_struct [noderef] __rcu *parent @@
kernel/ptrace.c:494:54: sparse: expected struct task_struct *parent
kernel/ptrace.c:494:54: sparse: got struct task_struct [noderef] __rcu *parent
kernel/ptrace.c:502:53: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct task_struct *new_parent @@ got struct task_struct [noderef] __rcu *real_parent @@
kernel/ptrace.c:502:53: sparse: expected struct task_struct *new_parent
kernel/ptrace.c:502:53: sparse: got struct task_struct [noderef] __rcu *real_parent
kernel/ptrace.c:550:41: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *p1 @@ got struct task_struct [noderef] __rcu *real_parent @@
kernel/ptrace.c:550:41: sparse: expected struct task_struct *p1
kernel/ptrace.c:550:41: sparse: got struct task_struct [noderef] __rcu *real_parent
kernel/ptrace.c:552:50: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sighand_struct *sigh @@ got struct sighand_struct [noderef] __rcu *sighand @@
kernel/ptrace.c:552:50: sparse: expected struct sighand_struct *sigh
kernel/ptrace.c:552:50: sparse: got struct sighand_struct [noderef] __rcu *sighand
kernel/ptrace.c:743:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/ptrace.c:743:37: sparse: expected struct spinlock [usertype] *lock
kernel/ptrace.c:743:37: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:751:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/ptrace.c:751:39: sparse: expected struct spinlock [usertype] *lock
kernel/ptrace.c:751:39: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:862:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/ptrace.c:862:29: sparse: expected struct spinlock [usertype] *lock
kernel/ptrace.c:862:29: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:866:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/ptrace.c:866:31: sparse: expected struct spinlock [usertype] *lock
kernel/ptrace.c:866:31: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:1096:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/ptrace.c:1096:37: sparse: expected struct spinlock [usertype] *lock
kernel/ptrace.c:1096:37: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:1098:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/ptrace.c:1098:39: sparse: expected struct spinlock [usertype] *lock
kernel/ptrace.c:1098:39: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c: note: in included file (through include/linux/rcuwait.h, include/linux/percpu-rwsem.h, include/linux/fs.h, ...):
include/linux/sched/signal.h:754:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
include/linux/sched/signal.h:754:37: sparse: expected struct spinlock [usertype] *lock
include/linux/sched/signal.h:754:37: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:380:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *l @@ got struct spinlock [noderef] __rcu * @@
kernel/ptrace.c:380:30: sparse: expected struct spinlock [usertype] *l
kernel/ptrace.c:380:30: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:456:17: sparse: sparse: context imbalance in 'ptrace_attach' - different lock contexts for basic block
kernel/ptrace.c:500:38: sparse: sparse: dereference of noderef expression
include/linux/sched/signal.h:754:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
include/linux/sched/signal.h:754:37: sparse: expected struct spinlock [usertype] *lock
include/linux/sched/signal.h:754:37: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:690:9: sparse: sparse: context imbalance in 'ptrace_getsiginfo' - different lock contexts for basic block
include/linux/sched/signal.h:754:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
include/linux/sched/signal.h:754:37: sparse: expected struct spinlock [usertype] *lock
include/linux/sched/signal.h:754:37: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:706:9: sparse: sparse: context imbalance in 'ptrace_setsiginfo' - different lock contexts for basic block
include/linux/sched/signal.h:754:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
include/linux/sched/signal.h:754:37: sparse: expected struct spinlock [usertype] *lock
include/linux/sched/signal.h:754:37: sparse: got struct spinlock [noderef] __rcu *
include/linux/sched/signal.h:754:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
include/linux/sched/signal.h:754:37: sparse: expected struct spinlock [usertype] *lock
include/linux/sched/signal.h:754:37: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:1255:9: sparse: sparse: context imbalance in 'ptrace_request' - different lock contexts for basic block
>> kernel/ptrace.c:1284:67: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *tsk @@ got struct task_struct [noderef] __rcu *parent @@
kernel/ptrace.c:1284:67: sparse: expected struct task_struct *tsk
kernel/ptrace.c:1284:67: sparse: got struct task_struct [noderef] __rcu *parent
vim +1284 kernel/ptrace.c
1257
1258 SYSCALL_DEFINE4(ptrace, long, request, long, pid, unsigned long, addr,
1259 unsigned long, data)
1260 {
1261 struct task_struct *child, *tracer;
1262 long ret;
1263
1264 if (request == PTRACE_TRACEME) {
1265 ret = ptrace_traceme();
1266 goto out;
1267 }
1268
1269 child = find_get_task_by_vpid(pid);
1270 if (!child) {
1271 ret = -ESRCH;
1272 goto out;
1273 }
1274
1275 if (request == PTRACE_ATTACH || request == PTRACE_SEIZE) {
1276 ret = ptrace_attach(child, request, addr, data);
1277 goto out_put_task_struct;
1278 }
1279
1280 if (request == PTRACE_TRACER) {
1281 rcu_read_lock();
1282 tracer = ptrace_parent(current);
1283 ret = tracer ? task_pid_nr_ns(tracer,
> 1284 task_active_pid_ns(current->parent)) : -ESRCH;
1285 rcu_read_unlock();
1286 goto out;
1287 }
1288
1289 ret = ptrace_check_attach(child, request == PTRACE_KILL ||
1290 request == PTRACE_INTERRUPT);
1291 if (ret < 0)
1292 goto out_put_task_struct;
1293
1294 ret = arch_ptrace(child, request, addr, data);
1295 if (ret || request != PTRACE_DETACH)
1296 ptrace_unfreeze_traced(child);
1297
1298 out_put_task_struct:
1299 put_task_struct(child);
1300 out:
1301 return ret;
1302 }
1303
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists