From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============2894742531840297846==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH V6] panic: Move panic_print before kmsg dumpers Date: Tue, 15 Feb 2022 03:33:06 +0800 Message-ID: <202202150334.b9k0EXqB-lkp@intel.com> In-Reply-To: <20220214141308.841525-1-gpiccoli@igalia.com> List-Id: --===============2894742531840297846== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi "Guilherme, Thank you for the patch! Yet something to improve: [auto build test ERROR on next-20220214] [cannot apply to linux/master linus/master v5.17-rc4 v5.17-rc3 v5.17-rc2 v5= .17-rc4] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Guilherme-G-Piccoli/panic-= Move-panic_print-before-kmsg-dumpers/20220214-221740 base: 259cbfc98c55ba3b6ef6e61fb7cfc3751dfded1e config: ia64-defconfig (https://download.01.org/0day-ci/archive/20220215/20= 2202150334.b9k0EXqB-lkp(a)intel.com/config) compiler: ia64-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/= make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/b27c506d04cb0a186f4719397= e43e3755e3dbe90 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Guilherme-G-Piccoli/panic-Move-pan= ic_print-before-kmsg-dumpers/20220214-221740 git checkout b27c506d04cb0a186f4719397e43e3755e3dbe90 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Dia64 SHELL=3D/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): kernel/panic.c: In function 'panic': >> kernel/panic.c:265:17: error: too few arguments to function 'panic_print= _sys_info' 265 | panic_print_sys_info(); | ^~~~~~~~~~~~~~~~~~~~ kernel/panic.c:151:13: note: declared here 151 | static void panic_print_sys_info(bool console_flush) | ^~~~~~~~~~~~~~~~~~~~ kernel/panic.c: In function '__warn': kernel/panic.c:598:17: warning: function '__warn' might be a candidate f= or 'gnu_printf' format attribute [-Wsuggest-attribute=3Dformat] 598 | vprintk(args->fmt, args->args); | ^~~~~~~ vim +/panic_print_sys_info +265 kernel/panic.c ^1da177e4c3f41 Linus Torvalds 2005-04-16 252 = 7d92bda271ddcb Douglas Anderson 2019-09-25 253 /* 7d92bda271ddcb Douglas Anderson 2019-09-25 254 * If kgdb is enabled= , give it a chance to run before we stop all 7d92bda271ddcb Douglas Anderson 2019-09-25 255 * the other CPUs or = else we won't be able to debug processes left 7d92bda271ddcb Douglas Anderson 2019-09-25 256 * running on them. 7d92bda271ddcb Douglas Anderson 2019-09-25 257 */ 7d92bda271ddcb Douglas Anderson 2019-09-25 258 kgdb_panic(buf); 7d92bda271ddcb Douglas Anderson 2019-09-25 259 = a681283c7052f3 Guilherme G. Piccoli 2022-02-12 260 /* a681283c7052f3 Guilherme G. Piccoli 2022-02-12 261 * If we have a kdump= kernel loaded, give a chance to panic_print a681283c7052f3 Guilherme G. Piccoli 2022-02-12 262 * show some extra in= formation on kernel log if it was set... a681283c7052f3 Guilherme G. Piccoli 2022-02-12 263 */ a681283c7052f3 Guilherme G. Piccoli 2022-02-12 264 if (kexec_crash_loade= d()) a681283c7052f3 Guilherme G. Piccoli 2022-02-12 @265 panic_print_sys_info= (); a681283c7052f3 Guilherme G. Piccoli 2022-02-12 266 = dc009d92435f99 Eric W. Biederman 2005-06-25 267 /* dc009d92435f99 Eric W. Biederman 2005-06-25 268 * If we have crashed= and we have a crash kernel loaded let it handle dc009d92435f99 Eric W. Biederman 2005-06-25 269 * everything else. f06e5153f4ae2e Masami Hiramatsu 2014-06-06 270 * If we want to run = this after calling panic_notifiers, pass f06e5153f4ae2e Masami Hiramatsu 2014-06-06 271 * the "crash_kexec_p= ost_notifiers" option to the kernel. 7bbee5ca3896f6 Hidehiro Kawai 2015-12-14 272 * 7bbee5ca3896f6 Hidehiro Kawai 2015-12-14 273 * Bypass the panic_c= pu check and call __crash_kexec directly. dc009d92435f99 Eric W. Biederman 2005-06-25 274 */ b26e27ddfd2a98 Hidehiro Kawai 2016-08-02 275 if (!_crash_kexec_pos= t_notifiers) { 7bbee5ca3896f6 Hidehiro Kawai 2015-12-14 276 __crash_kexec(NULL); dc009d92435f99 Eric W. Biederman 2005-06-25 277 = dc009d92435f99 Eric W. Biederman 2005-06-25 278 /* dc009d92435f99 Eric W. Biederman 2005-06-25 279 * Note smp_send_sto= p is the usual smp shutdown function, which 0ee59413c967c3 Hidehiro Kawai 2016-10-11 280 * unfortunately mea= ns it may not be hardened to work in a 0ee59413c967c3 Hidehiro Kawai 2016-10-11 281 * panic situation. dc009d92435f99 Eric W. Biederman 2005-06-25 282 */ ^1da177e4c3f41 Linus Torvalds 2005-04-16 283 smp_send_stop(); 0ee59413c967c3 Hidehiro Kawai 2016-10-11 284 } else { 0ee59413c967c3 Hidehiro Kawai 2016-10-11 285 /* 0ee59413c967c3 Hidehiro Kawai 2016-10-11 286 * If we want to do = crash dump after notifier calls and 0ee59413c967c3 Hidehiro Kawai 2016-10-11 287 * kmsg_dump, we wil= l need architecture dependent extra 0ee59413c967c3 Hidehiro Kawai 2016-10-11 288 * works in addition= to stopping other CPUs. 0ee59413c967c3 Hidehiro Kawai 2016-10-11 289 */ 0ee59413c967c3 Hidehiro Kawai 2016-10-11 290 crash_smp_send_stop(= ); 0ee59413c967c3 Hidehiro Kawai 2016-10-11 291 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 292 = 6723734cdff152 Kees Cook 2013-09-11 293 /* 6723734cdff152 Kees Cook 2013-09-11 294 * Run any panic hand= lers, including those that might need to 6723734cdff152 Kees Cook 2013-09-11 295 * add information to= the kmsg dump output. 6723734cdff152 Kees Cook 2013-09-11 296 */ e041c683412d5b Alan Stern 2006-03-27 297 atomic_notifier_call_= chain(&panic_notifier_list, 0, buf); ^1da177e4c3f41 Linus Torvalds 2005-04-16 298 = b27c506d04cb0a Guilherme G. Piccoli 2022-02-14 299 panic_print_sys_info(= false); b27c506d04cb0a Guilherme G. Piccoli 2022-02-14 300 = 6723734cdff152 Kees Cook 2013-09-11 301 kmsg_dump(KMSG_DUMP_P= ANIC); 6723734cdff152 Kees Cook 2013-09-11 302 = f06e5153f4ae2e Masami Hiramatsu 2014-06-06 303 /* f06e5153f4ae2e Masami Hiramatsu 2014-06-06 304 * If you doubt kdump= always works fine in any situation, f06e5153f4ae2e Masami Hiramatsu 2014-06-06 305 * "crash_kexec_post_= notifiers" offers you a chance to run f06e5153f4ae2e Masami Hiramatsu 2014-06-06 306 * panic_notifiers an= d dumping kmsg before kdump. f06e5153f4ae2e Masami Hiramatsu 2014-06-06 307 * Note: since some p= anic_notifiers can make crashed kernel f06e5153f4ae2e Masami Hiramatsu 2014-06-06 308 * more unstable, it = can increase risks of the kdump failure too. 7bbee5ca3896f6 Hidehiro Kawai 2015-12-14 309 * 7bbee5ca3896f6 Hidehiro Kawai 2015-12-14 310 * Bypass the panic_c= pu check and call __crash_kexec directly. f06e5153f4ae2e Masami Hiramatsu 2014-06-06 311 */ b26e27ddfd2a98 Hidehiro Kawai 2016-08-02 312 if (_crash_kexec_post= _notifiers) 7bbee5ca3896f6 Hidehiro Kawai 2015-12-14 313 __crash_kexec(NULL); f06e5153f4ae2e Masami Hiramatsu 2014-06-06 314 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============2894742531840297846==--