linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
To: <lvqiang.huang@unisoc.com>
Cc: kstewart@linuxfoundation.org, mike-sl.lin@mediatek.com,
	alix.wu@mediatek.com, tglx@linutronix.de, eddy.lin@mediatek.com,
	gregkh@linuxfoundation.org, yj.chiang@mediatek.com,
	phil.chang@mediatek.com, linux-kernel@vger.kernel.org,
	linux@armlinux.org.uk, linux-mediatek@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org, matthias.bgg@gmail.com,
	mark-pk.tsai@mediatek.com, info@metux.net, enlai.chu@unisoc.com,
	allison@lohutok.net
Subject: Re: [PATCH] ARM: fix race in for_each_frame
Date: Wed, 13 Nov 2019 11:25:54 +0800	[thread overview]
Message-ID: <20191113032554.21034-1-mark-pk.tsai@mediatek.com> (raw)
In-Reply-To: <64C83867-31FA-4243-A0EB-018AE9A83ACB@unisoc.com>

> Dear Mark,
> Thanks a lot for the reply. 
> 
> As said in last reply, sv_pc can be a module text, then more check needed.

If sv_pc is in module text area, kernel_text_address() returns true.

> 
> And beside crash at 1003, we may also get crash at 1001, the frame is invalid. (The last sv_pv is valid and sv_frame is invalid), then more check needed. 

There's a basic check for sv_fp at the end of 1004.
But I'm not sure is it enough to prevent the 1001 crash you mentioned.
Should we add a verify_stack for sv_fp?

> 
> And we often show_data around the general proposal registers when kernel crash. When they contain an address mapping for a hw register but can’t access because clock gated, it will crash again because do_bad() is involved. (continuous crash in arm and hang at die_lock in arm64)
> 
> So, why not check the __ex_table in do_bad() ?
> 

On our arm platform, kernel just die becuase the Unhandled fault in for_each_frame.
So I'd rather to fix it before the continuous crash happen.
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

  reply	other threads:[~2019-11-13  3:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-12 13:29 [PATCH] ARM: fix race in for_each_frame Mark-PK Tsai
2019-11-12 14:14 ` 黄吕强 (Lvqiang Huang)
2019-11-12 14:35 ` 黄吕强 (Lvqiang Huang)
2019-11-13  3:25   ` Mark-PK Tsai [this message]
2019-11-12 15:20 ` Mark-PK Tsai

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=20191113032554.21034-1-mark-pk.tsai@mediatek.com \
    --to=mark-pk.tsai@mediatek.com \
    --cc=alix.wu@mediatek.com \
    --cc=allison@lohutok.net \
    --cc=eddy.lin@mediatek.com \
    --cc=enlai.chu@unisoc.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=info@metux.net \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=lvqiang.huang@unisoc.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mike-sl.lin@mediatek.com \
    --cc=phil.chang@mediatek.com \
    --cc=tglx@linutronix.de \
    --cc=yj.chiang@mediatek.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;
as well as URLs for NNTP newsgroup(s).