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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJF2gTTyw4d5TQWrvVhq3zT5iT4HpNLc2w3GYA1OwSjcc_xGMw@mail.gmail.com>
Date:   Fri, 10 Jul 2020 07:14:30 +0800
From:   Guo Ren <guoren@...nel.org>
To:     kernel test robot <lkp@...el.com>
Cc:     Palmer Dabbelt <palmerdabbelt@...gle.com>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Anup Patel <anup@...infault.org>,
        Greentime Hu <greentime.hu@...ive.com>,
        Zong Li <zong.li@...ive.com>,
        Patrick Stählin <me@...ki.ch>,
        Björn Töpel <bjorn.topel@...il.com>,
        Atish Patra <atish.patra@....com>, kbuild-all@...ts.01.org,
        linux-riscv <linux-riscv@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/2] riscv: Add STACKPROTECTOR supported

Yes, I didn't test riscv32-gcc and it needs to be 16UL.

On Fri, Jul 10, 2020 at 2:37 AM kernel test robot <lkp@...el.com> wrote:
>
> 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@...el.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



-- 
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ