* [sashal-linux-stable:queue-4.4 3/3] kernel/ptrace.c:137:25: warning: comparison of integer expressions of different signedness: 'pid_t' {aka 'int'} and 'long unsigned int'
@ 2021-05-23 20:02 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-05-23 20:02 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 9527 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.4
head: 3667f03d0cf74926d5ca45d1ba6dc8100dd5e773
commit: 3667f03d0cf74926d5ca45d1ba6dc8100dd5e773 [3/3] ptrace: make ptrace() fail if the tracee changed its pid unexpectedly
config: mips-rt305x_defconfig (attached as .config)
compiler: mipsel-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/commit/?id=3667f03d0cf74926d5ca45d1ba6dc8100dd5e773
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-4.4
git checkout 3667f03d0cf74926d5ca45d1ba6dc8100dd5e773
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from kernel/ptrace.c:16:
include/linux/pagemap.h: In function 'fault_in_multipages_readable':
include/linux/pagemap.h:632:16: warning: variable 'c' set but not used [-Wunused-but-set-variable]
632 | volatile char c;
| ^
In file included from include/linux/bug.h:4,
from include/linux/thread_info.h:11,
from include/asm-generic/preempt.h:4,
from arch/mips/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:59,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:35,
from include/linux/time.h:5,
from include/uapi/linux/timex.h:56,
from include/linux/timex.h:56,
from include/linux/sched.h:19,
from kernel/ptrace.c:12:
include/linux/regset.h: In function 'user_regset_copyout':
include/linux/regset.h:227:14: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare]
227 | BUG_ON(*pos < start_pos);
| ^
arch/mips/include/asm/bug.h:33:44: note: in definition of macro 'BUG_ON'
33 | #define BUG_ON(C) __BUG_ON((unsigned long)(C))
| ^
In file included from kernel/ptrace.c:25:
include/linux/regset.h:228:26: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare]
228 | if (end_pos < 0 || *pos < end_pos) {
| ^
In file included from include/linux/bug.h:4,
from include/linux/thread_info.h:11,
from include/asm-generic/preempt.h:4,
from arch/mips/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:59,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:35,
from include/linux/time.h:5,
from include/uapi/linux/timex.h:56,
from include/linux/timex.h:56,
from include/linux/sched.h:19,
from kernel/ptrace.c:12:
include/linux/regset.h: In function 'user_regset_copyin':
include/linux/regset.h:252:14: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare]
252 | BUG_ON(*pos < start_pos);
| ^
arch/mips/include/asm/bug.h:33:44: note: in definition of macro 'BUG_ON'
33 | #define BUG_ON(C) __BUG_ON((unsigned long)(C))
| ^
In file included from kernel/ptrace.c:25:
include/linux/regset.h:253:26: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare]
253 | if (end_pos < 0 || *pos < end_pos) {
| ^
In file included from include/linux/bug.h:4,
from include/linux/thread_info.h:11,
from include/asm-generic/preempt.h:4,
from arch/mips/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:59,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:35,
from include/linux/time.h:5,
from include/uapi/linux/timex.h:56,
from include/linux/timex.h:56,
from include/linux/sched.h:19,
from kernel/ptrace.c:12:
include/linux/regset.h: In function 'user_regset_copyout_zero':
include/linux/regset.h:282:14: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare]
282 | BUG_ON(*pos < start_pos);
| ^
arch/mips/include/asm/bug.h:33:44: note: in definition of macro 'BUG_ON'
33 | #define BUG_ON(C) __BUG_ON((unsigned long)(C))
| ^
In file included from kernel/ptrace.c:25:
include/linux/regset.h:283:26: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare]
283 | if (end_pos < 0 || *pos < end_pos) {
| ^
In file included from include/linux/bug.h:4,
from include/linux/thread_info.h:11,
from include/asm-generic/preempt.h:4,
from arch/mips/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:59,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:35,
from include/linux/time.h:5,
from include/uapi/linux/timex.h:56,
from include/linux/timex.h:56,
from include/linux/sched.h:19,
from kernel/ptrace.c:12:
include/linux/regset.h: In function 'user_regset_copyin_ignore':
include/linux/regset.h:308:14: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare]
308 | BUG_ON(*pos < start_pos);
| ^
arch/mips/include/asm/bug.h:33:44: note: in definition of macro 'BUG_ON'
33 | #define BUG_ON(C) __BUG_ON((unsigned long)(C))
| ^
In file included from kernel/ptrace.c:25:
include/linux/regset.h:309:26: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare]
309 | if (end_pos < 0 || *pos < end_pos) {
| ^
kernel/ptrace.c: In function 'looks_like_a_spurious_pid':
>> kernel/ptrace.c:137:25: warning: comparison of integer expressions of different signedness: 'pid_t' {aka 'int'} and 'long unsigned int' [-Wsign-compare]
137 | if (task_pid_vnr(task) == task->ptrace_message)
| ^~
kernel/ptrace.c: In function 'ptrace_readdata':
kernel/ptrace.c:577:19: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
577 | this_len = (len > sizeof(buf)) ? sizeof(buf) : len;
| ^
kernel/ptrace.c:577:50: warning: operand of ?: changes signedness from 'int' to 'unsigned int' due to unsignedness of other operand [-Wsign-compare]
577 | this_len = (len > sizeof(buf)) ? sizeof(buf) : len;
| ^~~
kernel/ptrace.c: In function 'ptrace_writedata':
kernel/ptrace.c:602:19: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
602 | this_len = (len > sizeof(buf)) ? sizeof(buf) : len;
| ^
kernel/ptrace.c:602:50: warning: operand of ?: changes signedness from 'int' to 'unsigned int' due to unsignedness of other operand [-Wsign-compare]
602 | this_len = (len > sizeof(buf)) ? sizeof(buf) : len;
| ^~~
kernel/ptrace.c: In function 'find_regset':
kernel/ptrace.c:846:16: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
846 | for (n = 0; n < view->n; ++n) {
| ^
vim +137 kernel/ptrace.c
131
132 static bool looks_like_a_spurious_pid(struct task_struct *task)
133 {
134 if (task->exit_code != ((PTRACE_EVENT_EXEC << 8) | SIGTRAP))
135 return false;
136
> 137 if (task_pid_vnr(task) == task->ptrace_message)
138 return false;
139 /*
140 * The tracee changed its pid but the PTRACE_EVENT_EXEC event
141 * was not wait()'ed, most probably debugger targets the old
142 * leader which was destroyed in de_thread().
143 */
144 return true;
145 }
146
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 13026 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-23 20:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-23 20:02 [sashal-linux-stable:queue-4.4 3/3] kernel/ptrace.c:137:25: warning: comparison of integer expressions of different signedness: 'pid_t' {aka 'int'} and 'long unsigned int' kernel test robot
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.