Linux-csky Archive on lore.kernel.org
 help / color / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: "Guo Ren" <ren_guo@c-sky.com>, 瞿仙淼 <xianmiao_qu@c-sky.com>,
	尚云海 <yunhai_shang@c-sky.com>
Cc: Guo Ren <guoren@linux.alibaba.com>,
	linux-csky@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] csky: Fixup calltrace panic
Date: Thu, 21 May 2020 07:46:03 -0700
Message-ID: <45e1a784-f8fe-5f17-45ca-3eb5453d4bb4@roeck-us.net> (raw)
In-Reply-To: <D93AFA5B-3BF1-4E11-B278-22E980C3EE36@c-sky.com>

On 5/20/20 12:50 AM, Guo Ren wrote:
> Hi Guenter,
> 
>> 在 2020年5月18日,上午1:52,Guenter Roeck <linux@roeck-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@linux.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)
> 

That won't work for me. You really might want to consider
supporting upstream gcc. I'll try disabling CONFIG_STACKTRACE
for csky build tests. If that doesn't work, I may have to
disable affected csky build tests for the time being.

Guenter

  reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-17 17:52 Guenter Roeck
2020-05-20  7:50 ` Guo Ren
2020-05-21 14:46   ` Guenter Roeck [this message]
2020-05-22 15:28     ` Guo Ren
2020-05-22 21:28       ` Guenter Roeck

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=45e1a784-f8fe-5f17-45ca-3eb5453d4bb4@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=guoren@linux.alibaba.com \
    --cc=linux-csky@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ren_guo@c-sky.com \
    --cc=xianmiao_qu@c-sky.com \
    --cc=yunhai_shang@c-sky.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

Linux-csky Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-csky/0 linux-csky/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-csky linux-csky/ https://lore.kernel.org/linux-csky \
		linux-csky@vger.kernel.org
	public-inbox-index linux-csky

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-csky


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git