From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
"linux-kbuild@vger.kernel.org" <linux-kbuild@vger.kernel.org>,
Mikael Starvik <starvik@axis.com>,
Jesper Nilsson <jesper.nilsson@axis.com>,
Tony Luck <tony.luck@intel.com>,
Fenghua Yu <fenghua.yu@intel.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
"David S. Miller" <davem@davemloft.net>,
Christopher Li <sparse@chrisli.org>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Kees Cook <keescook@chromium.org>, Ingo Molnar <mingo@kernel.org>,
Josh Poimboeuf <jpoimboe@redhat.com>,
Will Deacon <will.deacon@arm.com>,
"Steven Rostedt (VMware)" <rostedt@goodmis.org>,
Mark Rutland <mark.rutland@arm.com>arcml <l>
Subject: Re: [PATCH] bug.h: Work around GCC PR82365 in BUG()
Date: Wed, 20 Dec 2017 12:29:02 -0800 [thread overview]
Message-ID: <861992dd-a28d-0f8c-572f-4194d15238df@synopsys.com> (raw)
In-Reply-To: <CAK8P3a0UKLJkmU_zVDyODMZR0G47i=zscNpgGZO4LryvmdUt6Q@mail.gmail.com>
On 12/20/2017 12:12 PM, Arnd Bergmann wrote:
>> Sorry, I didn't realize we are missing the stack trace now which you removed
>> from the patch - why ? Did u intend to reduce inline generated code for the
>> stack dump calls - which sounds like a great idea. But it would only work
>> for the synchronous abort() but not when builtin translates to actual trap
>> inducing instruction.
>
> I assumed that the trap instruction would trigger the register and
> stack dump, as it does on all other architectures.
Only if __builtin_trap() translated to that instruction. Otherwise we need to do
this inside abort()
> The most common
> way this is handled is to have one instruction that is known to trap,
> and use that to trigger a BUG(), and have __builtin_trap() issue
> that instruction as well.
Good point. So we'll need ARC specific abort anyways.
> You might also want to implement CONFIG_DEBUG_BUGVERBOSE
> support to attach further data to it.
OK I'll take a look !
> How about overriding abort() with the same instruction that
> __builtin_trap() inserts on newer compilers then? That should
> make the behavior consistent.
Yeah this is a great point ! Will do
thx,
-Vineet
WARNING: multiple messages have this Message-ID (diff)
From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
"linux-kbuild@vger.kernel.org" <linux-kbuild@vger.kernel.org>,
Mikael Starvik <starvik@axis.com>,
Jesper Nilsson <jesper.nilsson@axis.com>,
Tony Luck <tony.luck@intel.com>,
Fenghua Yu <fenghua.yu@intel.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
"David S. Miller" <davem@davemloft.net>,
Christopher Li <sparse@chrisli.org>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Kees Cook <keescook@chromium.org>, Ingo Molnar <mingo@kernel.org>,
Josh Poimboeuf <jpoimboe@redhat.com>,
Will Deacon <will.deacon@arm.com>,
"Steven Rostedt (VMware)" <rostedt@goodmis.org>,
Mark Rutland <mark.rutland@arm.com>,
arcml <linux-snps-arc@lists.infradead.org>
Subject: Re: [PATCH] bug.h: Work around GCC PR82365 in BUG()
Date: Wed, 20 Dec 2017 12:29:02 -0800 [thread overview]
Message-ID: <861992dd-a28d-0f8c-572f-4194d15238df@synopsys.com> (raw)
Message-ID: <20171220202902.IJ6NY7mk6NPgzlA4zYiq4xgYxtDV8jimFu0CuwGpTGo@z> (raw)
In-Reply-To: <CAK8P3a0UKLJkmU_zVDyODMZR0G47i=zscNpgGZO4LryvmdUt6Q@mail.gmail.com>
On 12/20/2017 12:12 PM, Arnd Bergmann wrote:
>> Sorry, I didn't realize we are missing the stack trace now which you removed
>> from the patch - why ? Did u intend to reduce inline generated code for the
>> stack dump calls - which sounds like a great idea. But it would only work
>> for the synchronous abort() but not when builtin translates to actual trap
>> inducing instruction.
>
> I assumed that the trap instruction would trigger the register and
> stack dump, as it does on all other architectures.
Only if __builtin_trap() translated to that instruction. Otherwise we need to do
this inside abort()
> The most common
> way this is handled is to have one instruction that is known to trap,
> and use that to trigger a BUG(), and have __builtin_trap() issue
> that instruction as well.
Good point. So we'll need ARC specific abort anyways.
> You might also want to implement CONFIG_DEBUG_BUGVERBOSE
> support to attach further data to it.
OK I'll take a look !
> How about overriding abort() with the same instruction that
> __builtin_trap() inserts on newer compilers then? That should
> make the behavior consistent.
Yeah this is a great point ! Will do
thx,
-Vineet
next prev parent reply other threads:[~2017-12-20 20:29 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-19 11:39 [PATCH] bug.h: Work around GCC PR82365 in BUG() Arnd Bergmann
2017-12-19 11:39 ` Arnd Bergmann
2017-12-19 11:49 ` Geert Uytterhoeven
2017-12-19 11:49 ` Geert Uytterhoeven
2017-12-19 16:57 ` Vineet Gupta
2017-12-19 16:57 ` Vineet Gupta
2017-12-19 20:13 ` Arnd Bergmann
2017-12-19 20:13 ` Arnd Bergmann
2017-12-19 22:38 ` Vineet Gupta
2017-12-19 22:38 ` Vineet Gupta
2017-12-20 9:01 ` Arnd Bergmann
2017-12-20 9:01 ` Arnd Bergmann
2017-12-20 18:52 ` Vineet Gupta
2017-12-20 18:52 ` Vineet Gupta
2017-12-20 20:12 ` Arnd Bergmann
2017-12-20 20:12 ` Arnd Bergmann
2017-12-20 20:29 ` Vineet Gupta [this message]
2017-12-20 20:29 ` Vineet Gupta
2018-02-08 0:01 ` Andrew Morton
2018-02-08 0:01 ` Andrew Morton
2018-02-08 0:51 ` Vineet Gupta
2018-02-08 0:51 ` Vineet Gupta
2018-02-08 1:20 ` Vineet Gupta
2018-02-08 1:20 ` Vineet Gupta
2018-02-21 21:23 ` Vineet Gupta
2018-02-21 21:23 ` Vineet Gupta
2018-04-10 22:48 ` James Hogan
2018-04-10 22:48 ` James Hogan
2018-04-11 7:30 ` Arnd Bergmann
2018-04-11 7:30 ` Arnd Bergmann
2018-04-11 9:54 ` James Hogan
2018-04-11 9:54 ` James Hogan
2018-04-11 10:08 ` Arnd Bergmann
2018-04-11 10:08 ` Arnd Bergmann
2018-04-11 10:19 ` James Hogan
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=861992dd-a28d-0f8c-572f-4194d15238df@synopsys.com \
--to=vineet.gupta1@synopsys.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=fenghua.yu@intel.com \
--cc=geert@linux-m68k.org \
--cc=jesper.nilsson@axis.com \
--cc=jpoimboe@redhat.com \
--cc=keescook@chromium.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sparse@chrisli.org \
--cc=starvik@axis.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=will.deacon@arm.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