lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202108271315.cQ3n40Yr-lkp@intel.com>
Date:   Fri, 27 Aug 2021 13:03:20 +0800
From:   kernel test robot <lkp@...el.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Daniel Bristot de Oliveira <bristot@...hat.com>
Subject: arch/powerpc/xmon/xmon.c:3174 show_task() warn: unsigned 'p_state'
 is never less than zero.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   77dd11439b86e3f7990e4c0c9e0b67dca82750ba
commit: 2f064a59a11ff9bc22e52e9678bc601404c7cb34 sched: Change task_struct::state
date:   2 months ago
config: powerpc64-randconfig-m031-20210827 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

New smatch warnings:
arch/powerpc/xmon/xmon.c:3174 show_task() warn: unsigned 'p_state' is never less than zero.

Old smatch warnings:
arch/powerpc/xmon/xmon.c:2798 dump() warn: '"d?

vim +/p_state +3174 arch/powerpc/xmon/xmon.c

  3162	
  3163	static void show_task(struct task_struct *tsk)
  3164	{
  3165		unsigned int p_state = READ_ONCE(tsk->__state);
  3166		char state;
  3167	
  3168		/*
  3169		 * Cloned from kdb_task_state_char(), which is not entirely
  3170		 * appropriate for calling from xmon. This could be moved
  3171		 * to a common, generic, routine used by both.
  3172		 */
  3173		state = (p_state == 0) ? 'R' :
> 3174			(p_state < 0) ? 'U' :
  3175			(p_state & TASK_UNINTERRUPTIBLE) ? 'D' :
  3176			(p_state & TASK_STOPPED) ? 'T' :
  3177			(p_state & TASK_TRACED) ? 'C' :
  3178			(tsk->exit_state & EXIT_ZOMBIE) ? 'Z' :
  3179			(tsk->exit_state & EXIT_DEAD) ? 'E' :
  3180			(p_state & TASK_INTERRUPTIBLE) ? 'S' : '?';
  3181	
  3182		printf("%16px %16lx %16px %6d %6d %c %2d %s\n", tsk,
  3183			tsk->thread.ksp, tsk->thread.regs,
  3184			tsk->pid, rcu_dereference(tsk->parent)->pid,
  3185			state, task_cpu(tsk),
  3186			tsk->comm);
  3187	}
  3188	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (34460 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ