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: <202107202147.EbY30A8i-lkp@intel.com>
Date:   Tue, 20 Jul 2021 21:09:04 +0800
From:   kernel test robot <lkp@...el.com>
To:     "Christopher M. Riedl" <cmr@...ormatik.wtf>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Michael Ellerman <mpe@...erman.id.au>,
        Sasha Levin <sashal@...nel.org>
Subject: [linux-stable-rc:linux-5.4.y 5527/5583]
 arch/powerpc/xmon/xmon.c:489:6: error: variable 'cmd' might be clobbered by
 'longjmp' or 'vfork'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
head:   12a5ce113626ce8208aef76d4d2e9fc93ea48ddf
commit: 99c63ba21d2ea9d28880b0341b25e4a4ce8a18bb [5527/5583] powerpc/xmon: Restrict when kernel is locked down
config: powerpc64-randconfig-r002-20210720 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 10.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/stable/linux-stable-rc.git/commit/?id=99c63ba21d2ea9d28880b0341b25e4a4ce8a18bb
        git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
        git fetch --no-tags linux-stable-rc linux-5.4.y
        git checkout 99c63ba21d2ea9d28880b0341b25e4a4ce8a18bb
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=powerpc64 

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

All errors (new ones prefixed by >>):

   In file included from arch/powerpc/xmon/xmon.c:64:
   arch/powerpc/xmon/dis-asm.h: In function 'print_insn_powerpc':
   arch/powerpc/xmon/dis-asm.h:16:13: error: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'long unsigned int' [-Werror=format=]
      16 |  printf("%.8x", insn);
         |          ~~~^   ~~~~
         |             |   |
         |             |   long unsigned int
         |             unsigned int
         |          %.8lx
   arch/powerpc/xmon/dis-asm.h: In function 'print_insn_spu':
   arch/powerpc/xmon/dis-asm.h:22:13: error: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'long unsigned int' [-Werror=format=]
      22 |  printf("%.8x", insn);
         |          ~~~^   ~~~~
         |             |   |
         |             |   long unsigned int
         |             unsigned int
         |          %.8lx
   arch/powerpc/xmon/xmon.c: In function 'xmon_print_symbol':
   arch/powerpc/xmon/xmon.c:3535:14: error: variable 'name' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
    3535 |  const char *name = NULL;
         |              ^~~~
   arch/powerpc/xmon/xmon.c: In function 'show_pte':
   arch/powerpc/xmon/xmon.c:3121:22: error: variable 'tsk' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
    3121 |  struct task_struct *tsk = NULL;
         |                      ^~~
   arch/powerpc/xmon/xmon.c: In function 'show_tasks':
   arch/powerpc/xmon/xmon.c:3217:22: error: variable 'tsk' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
    3217 |  struct task_struct *tsk = NULL;
         |                      ^~~
   arch/powerpc/xmon/xmon.c: In function 'xmon_core':
>> arch/powerpc/xmon/xmon.c:489:6: error: variable 'cmd' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
     489 |  int cmd = 0;
         |      ^~~
   arch/powerpc/xmon/xmon.c:848:14: error: variable 'bp' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
     848 |  struct bpt *bp;
         |              ^~
   arch/powerpc/xmon/xmon.c:848:14: error: variable 'bp' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
   arch/powerpc/xmon/xmon.c:487:48: error: argument 'fromipi' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
     487 | static int xmon_core(struct pt_regs *regs, int fromipi)
         |                                            ~~~~^~~~~~~
   cc1: all warnings being treated as errors


vim +489 arch/powerpc/xmon/xmon.c

daf8f40391b2a1 arch/powerpc/xmon/xmon.c Josh Boyer           2009-09-23  486  
b0da985644faa4 arch/powerpc/xmon/xmon.c Arnd Bergmann        2006-01-11  487  static int xmon_core(struct pt_regs *regs, int fromipi)
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds       2005-04-16  488  {
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds       2005-04-16 @489  	int cmd = 0;
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds       2005-04-16  490  	struct bpt *bp;
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds       2005-04-16  491  	long recurse_jmp[JMP_BUF_LEN];
99c63ba21d2ea9 arch/powerpc/xmon/xmon.c Christopher M. Riedl 2019-09-07  492  	bool locked_down;
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds       2005-04-16  493  	unsigned long offset;
f13659e0b39075 arch/powerpc/xmon/xmon.c Anton Blanchard      2007-03-21  494  	unsigned long flags;
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds       2005-04-16  495  #ifdef CONFIG_SMP
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds       2005-04-16  496  	int cpu;
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds       2005-04-16  497  	int secondary;
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds       2005-04-16  498  #endif
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds       2005-04-16  499  
f13659e0b39075 arch/powerpc/xmon/xmon.c Anton Blanchard      2007-03-21  500  	local_irq_save(flags);
a71d64b4dc4067 arch/powerpc/xmon/xmon.c Anton Blanchard      2014-08-05  501  	hard_irq_disable();
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds       2005-04-16  502  
99c63ba21d2ea9 arch/powerpc/xmon/xmon.c Christopher M. Riedl 2019-09-07  503  	locked_down = xmon_is_locked_down();
99c63ba21d2ea9 arch/powerpc/xmon/xmon.c Christopher M. Riedl 2019-09-07  504  
aaf06665f7ea3e arch/powerpc/xmon/xmon.c Naveen N. Rao        2019-06-27  505  	if (!fromipi) {
ed49f7fd6438dc arch/powerpc/xmon/xmon.c Breno Leitao         2017-08-02  506  		tracing_enabled = tracing_is_on();
ed49f7fd6438dc arch/powerpc/xmon/xmon.c Breno Leitao         2017-08-02  507  		tracing_off();
aaf06665f7ea3e arch/powerpc/xmon/xmon.c Naveen N. Rao        2019-06-27  508  	}
ed49f7fd6438dc arch/powerpc/xmon/xmon.c Breno Leitao         2017-08-02  509  
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds       2005-04-16  510  	bp = in_breakpoint_table(regs->nip, &offset);
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds       2005-04-16  511  	if (bp != NULL) {
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds       2005-04-16  512  		regs->nip = bp->address + offset;
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds       2005-04-16  513  		atomic_dec(&bp->ref_count);
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds       2005-04-16  514  	}
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds       2005-04-16  515  
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds       2005-04-16  516  	remove_cpu_bpts();
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds       2005-04-16  517  

:::::: The code at line 489 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@...970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@...970.osdl.org>

---
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" (25283 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ