Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: guoren@kernel.org, palmerdabbelt@google.com,
	paul.walmsley@sifive.com, anup@brainfault.org,
	greentime.hu@sifive.com, zong.li@sifive.com, me@packi.ch,
	bjorn.topel@gmail.com, atish.patra@wdc.com
Cc: linux-riscv@lists.infradead.org, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] riscv: Add STACKPROTECTOR supported
Date: Fri, 10 Jul 2020 02:36:17 +0800	[thread overview]
Message-ID: <202007100213.k2Bq4lQ3%lkp@intel.com> (raw)
In-Reply-To: <1594279697-72511-1-git-send-email-guoren@kernel.org>

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

Hi,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.8-rc4 next-20200709]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/guoren-kernel-org/riscv-Add-STACKPROTECTOR-supported/20200709-153112
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 0bddd227f3dc55975e2b8dfa7fc6f959b062a2c7
config: riscv-randconfig-s031-20200709 (attached as .config)
compiler: riscv32-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.2-37-gc9676a3b-dirty
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=riscv 

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 include/linux/stackprotector.h:10,
                    from arch/riscv/kernel/process.c:28:
   arch/riscv/include/asm/stackprotector.h: In function 'boot_init_stack_canary':
>> arch/riscv/include/asm/stackprotector.h:26:23: warning: left shift count >= width of type [-Wshift-count-overflow]
      26 |  canary += tsc + (tsc << 32UL);
         |                       ^~
   arch/riscv/kernel/process.c: At top level:
   arch/riscv/kernel/process.c:42:6: warning: no previous prototype for 'show_regs' [-Wmissing-prototypes]
      42 | void show_regs(struct pt_regs *regs)
         |      ^~~~~~~~~
   arch/riscv/kernel/process.c:103:5: warning: no previous prototype for 'arch_dup_task_struct' [-Wmissing-prototypes]
     103 | int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
         |     ^~~~~~~~~~~~~~~~~~~~

vim +26 arch/riscv/include/asm/stackprotector.h

    11	
    12	/*
    13	 * Initialize the stackprotector canary value.
    14	 *
    15	 * NOTE: this must only be called from functions that never return,
    16	 * and it must always be inlined.
    17	 */
    18	static __always_inline void boot_init_stack_canary(void)
    19	{
    20		unsigned long canary;
    21		unsigned long tsc;
    22	
    23		/* Try to get a semi random initial value. */
    24		get_random_bytes(&canary, sizeof(canary));
    25		tsc = get_cycles();
  > 26		canary += tsc + (tsc << 32UL);

---
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: 26898 bytes --]

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

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

  parent reply	other threads:[~2020-07-09 18:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-09  7:28 [PATCH v2 1/2] riscv: Add STACKPROTECTOR supported guoren
2020-07-09  7:28 ` [PATCH v2 2/2] riscv: Enable per-task stack canaries guoren
2020-07-09 18:36 ` kernel test robot [this message]
2020-07-09 23:14   ` [PATCH v2 1/2] riscv: Add STACKPROTECTOR supported Guo Ren

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=202007100213.k2Bq4lQ3%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=anup@brainfault.org \
    --cc=atish.patra@wdc.com \
    --cc=bjorn.topel@gmail.com \
    --cc=greentime.hu@sifive.com \
    --cc=guoren@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=me@packi.ch \
    --cc=palmerdabbelt@google.com \
    --cc=paul.walmsley@sifive.com \
    --cc=zong.li@sifive.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