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] [thread-next>] [day] [month] [year] [list]
Message-Id: <D93AFA5B-3BF1-4E11-B278-22E980C3EE36@c-sky.com>
Date:   Wed, 20 May 2020 15:50:42 +0800
From:   Guo Ren <ren_guo@...ky.com>
To:     Guenter Roeck <linux@...ck-us.net>,
        瞿仙淼 <xianmiao_qu@...ky.com>,
        尚云海 <yunhai_shang@...ky.com>
Cc:     Guo Ren <guoren@...ux.alibaba.com>, linux-csky@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] csky: Fixup calltrace panic

Hi Guenter,

> 在 2020年5月18日,上午1:52,Guenter Roeck <linux@...ck-us.net> 写道:
> 
> Hi,
> 
> On Wed, May 13, 2020 at 03:15:25PM +0800, Guo Ren wrote:
>> The implementation of show_stack will panic with wrong fp:
>> 
>> addr    = *fp++;
>> 
>> because the fp isn't checked properly.
>> 
>> The current implementations of show_stack, wchan and stack_trace
>> haven't been designed properly, so just deprecate them.
>> 
>> This patch is a reference to riscv's way, all codes are modified from
>> arm's. The patch is passed with:
>> 
>> - cat /proc/<pid>/stack
>> - cat /proc/<pid>/wchan
>> - echo c > /proc/sysrq-trigger
>> 
>> Signed-off-by: Guo Ren <guoren@...ux.alibaba.com>
> 
> This patch results in:
> 
> gcc version: csky-linux-gcc (GCC) 9.3.0
> 
> Building csky:defconfig ... failed
> --------------
> Error log:
> csky-linux-gcc: error: unrecognized command line option '-mbacktrace'; did you mean '-fbacktrace'?
> csky-linux-gcc: error: unrecognized command line option '-mbacktrace'; did you mean '-fbacktrace'?
> make[2]: *** [scripts/mod/devicetable-offsets.s] Error 1
> make[2]: *** Waiting for unfinished jobs....
> csky-linux-gcc: error: unrecognized command line option '-mbacktrace'; did you mean '-fbacktrace'?
> make[2]: *** [scripts/mod/empty.o] Error 1
> make[1]: *** [prepare0] Error 2
> make: *** [sub-make] Error 2
> 
> when trying to build csky images with upstream gcc 9.3.0.
> 
> What version of gcc is needed to build csky images ? Also, would it be
> possible to support the upstream version of gcc ?
> 

We tested it with https://github.com/c-sky/gcc (gcc-6.3)

You can fast test with:


 wget -nc https://gitlab.com/c-sky/buildroot/-/jobs/557072746/artifacts/raw/output/images/toolchain_thead_860_compat_next_glibc_br_defconfig_8f1b5cd7d85509fbafea935ec65c48add73bba07.tar.xz

 mkdir -p host
 tar -Jxf toolchain_thead_860_compat_next_glibc_br_defconfig_8f1b5cd7d85509fbafea935ec65c48add73bba07.tar.xz -C host

 cd linux-xxx

 LD_LIBRARY_PATH=../host/lib make ARCH=csky CROSS_COMPILE=../host/bin/csky-linux- Image


We will upstream -mbacktrace to gcc.org

> Thanks,
> Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ