linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: qiang.zhang@windriver.com, linux@armlinux.org.uk
Cc: kbuild-all@lists.01.org, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	syzkaller-bugs@googlegroups.com
Subject: Re: [PATCH] ARM: Fix incorrect use of smp_processor_id() by syzbot report
Date: Fri, 12 Mar 2021 14:32:10 +0800	[thread overview]
Message-ID: <202103121444.xPO5E9gh-lkp@intel.com> (raw)
In-Reply-To: <20210312041246.15113-1-qiang.zhang@windriver.com>

[-- Attachment #1: Type: text/plain, Size: 4763 bytes --]

Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linux/master]
[also build test WARNING on linus/master hnaz-linux-mm/master v5.12-rc2 next-20210311]
[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/qiang-zhang-windriver-com/ARM-Fix-incorrect-use-of-smp_processor_id-by-syzbot-report/20210312-121529
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a74e6a014c9d4d4161061f770c9b4f98372ac778
config: arm-pxa168_defconfig (attached as .config)
compiler: arm-linux-gnueabi-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://github.com/0day-ci/linux/commit/b31b47976c6f81426cc00c99cc1452a60e89d972
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review qiang-zhang-windriver-com/ARM-Fix-incorrect-use-of-smp_processor_id-by-syzbot-report/20210312-121529
        git checkout b31b47976c6f81426cc00c99cc1452a60e89d972
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

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 arch/arm/mm/fault.c:21:
   arch/arm/include/asm/system_misc.h: In function 'harden_branch_predictor':
>> arch/arm/include/asm/system_misc.h:25:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
      25 |  harden_branch_predictor_fn_t fn = per_cpu(harden_branch_predictor_fn,
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm/mm/fault.c: At top level:
   arch/arm/mm/fault.c:518:1: warning: no previous prototype for 'do_DataAbort' [-Wmissing-prototypes]
     518 | do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
         | ^~~~~~~~~~~~
   arch/arm/mm/fault.c:548:1: warning: no previous prototype for 'do_PrefetchAbort' [-Wmissing-prototypes]
     548 | do_PrefetchAbort(unsigned long addr, unsigned int ifsr, struct pt_regs *regs)
         | ^~~~~~~~~~~~~~~~
--
   In file included from arch/arm/mm/proc-v7-bugs.c:9:
   arch/arm/include/asm/system_misc.h: In function 'harden_branch_predictor':
>> arch/arm/include/asm/system_misc.h:25:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
      25 |  harden_branch_predictor_fn_t fn = per_cpu(harden_branch_predictor_fn,
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm/mm/proc-v7-bugs.c: At top level:
   arch/arm/mm/proc-v7-bugs.c:142:6: warning: no previous prototype for 'cpu_v7_ca8_ibe' [-Wmissing-prototypes]
     142 | void cpu_v7_ca8_ibe(void)
         |      ^~~~~~~~~~~~~~
   arch/arm/mm/proc-v7-bugs.c:148:6: warning: no previous prototype for 'cpu_v7_ca15_ibe' [-Wmissing-prototypes]
     148 | void cpu_v7_ca15_ibe(void)
         |      ^~~~~~~~~~~~~~~
   arch/arm/mm/proc-v7-bugs.c:154:6: warning: no previous prototype for 'cpu_v7_bugs_init' [-Wmissing-prototypes]
     154 | void cpu_v7_bugs_init(void)
         |      ^~~~~~~~~~~~~~~~


vim +25 arch/arm/include/asm/system_misc.h

9f97da78bf0182 David Howells 2012-03-28  18  
f5fe12b1eaee22 Russell King  2018-05-14  19  #ifdef CONFIG_HARDEN_BRANCH_PREDICTOR
f5fe12b1eaee22 Russell King  2018-05-14  20  typedef void (*harden_branch_predictor_fn_t)(void);
f5fe12b1eaee22 Russell King  2018-05-14  21  DECLARE_PER_CPU(harden_branch_predictor_fn_t, harden_branch_predictor_fn);
f5fe12b1eaee22 Russell King  2018-05-14  22  static inline void harden_branch_predictor(void)
f5fe12b1eaee22 Russell King  2018-05-14  23  {
b31b47976c6f81 Zqiang        2021-03-12  24  	preempt_disable();
f5fe12b1eaee22 Russell King  2018-05-14 @25  	harden_branch_predictor_fn_t fn = per_cpu(harden_branch_predictor_fn,
f5fe12b1eaee22 Russell King  2018-05-14  26  						  smp_processor_id());
b31b47976c6f81 Zqiang        2021-03-12  27  	preempt_enable();
f5fe12b1eaee22 Russell King  2018-05-14  28  	if (fn)
f5fe12b1eaee22 Russell King  2018-05-14  29  		fn();
f5fe12b1eaee22 Russell King  2018-05-14  30  }
f5fe12b1eaee22 Russell King  2018-05-14  31  #else
f5fe12b1eaee22 Russell King  2018-05-14  32  #define harden_branch_predictor() do { } while (0)
f5fe12b1eaee22 Russell King  2018-05-14  33  #endif
f5fe12b1eaee22 Russell King  2018-05-14  34  

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 12239 bytes --]

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      parent reply	other threads:[~2021-03-12  6:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-12  4:12 [PATCH] ARM: Fix incorrect use of smp_processor_id() by syzbot report qiang.zhang
2021-03-12  6:30 ` Dmitry Vyukov
2021-03-12  7:50   ` 回复: " Zhang, Qiang
2021-03-12  6:32 ` kernel test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202103121444.xPO5E9gh-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=qiang.zhang@windriver.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).