From: f.fainelli@gmail.com (Florian Fainelli)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: fix for bad_mode() handler to always result in panic
Date: Wed, 8 Aug 2018 11:23:33 -0700 [thread overview]
Message-ID: <1bfd65dc-3bf2-f40f-2337-d7f95f4c756e@gmail.com> (raw)
In-Reply-To: <CAM5rFu-_x1EfXE72X-4_5XcO6zK86itiny16mgwoRrDBB2=oAA@mail.gmail.com>
On 08/08/2018 11:18 AM, Hari Vyas wrote:
> On Tue, Aug 7, 2018 at 5:57 PM, Greg KH <greg@kroah.com> wrote:
>> On Tue, Aug 07, 2018 at 04:33:48PM +0530, Hari Vyas wrote:
>>> bad_mode() handler is called for invalid or undefined
>>> instruction in el1 level or when irq,fiq,sync or error
>>> situation happen in el1 or el0 level.
>>>
>>> As per latest code, above abnormal situation may not result in
>>> panic always due to die() call if user mode is determined at
>>> that moment. That will just result in kill of current process
>>> and panic will be avoided which it must not.
>>>
>>> Link: https://bugzilla.kernel.org/show_bug.cgi?id=200637
>>> Signed-off-by: Hari Vyas <hari.vyas@broadcom.com>
>>> ---
>>> arch/arm64/kernel/traps.c | 1 -
>>> 1 file changed, 1 deletion(-)
>>>
>>> diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c
>>> index d399d45..716ee73 100644
>>> --- a/arch/arm64/kernel/traps.c
>>> +++ b/arch/arm64/kernel/traps.c
>>> @@ -621,7 +621,6 @@ asmlinkage void bad_mode(struct pt_regs *regs, int reason, unsigned int esr)
>>> handler[reason], smp_processor_id(), esr,
>>> esr_get_class_string(esr));
>>>
>>> - die("Oops - bad mode", regs, 0);
>>> local_daif_mask();
>>> panic("bad mode");
>>> }
>>> --
>>> 1.9.1
>>
>> <formletter>
>>
>> This is not the correct way to submit patches for inclusion in the
>> stable kernel tree. Please read:
>> https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
>> for how to do this properly.
>>
>> </formletter>
>
> Thanks. Probably my mistake to include stable kernel list for regular
> minor patch.
> In any case, will take care about it along with arm maintainers and
> developers review comments which I am awaiting.
Also, if this is a real fix, then providing an appropriate Fixes: tag
would help understand when this broke, and how far back this needs to be
backported to. This of course, assumes that your patch is the right
course of action.
--
Florian
next prev parent reply other threads:[~2018-08-08 18:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-07 11:03 [PATCH] arm64: fix for bad_mode() handler to always result in panic Hari Vyas
2018-08-07 12:27 ` Greg KH
2018-08-08 18:18 ` Hari Vyas
2018-08-08 18:23 ` Florian Fainelli [this message]
2018-08-10 16:46 ` Hari Vyas
2018-08-21 14:16 ` Hari Vyas
2018-08-21 17:38 ` Will Deacon
2018-08-22 6:31 ` Hari Vyas
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=1bfd65dc-3bf2-f40f-2337-d7f95f4c756e@gmail.com \
--to=f.fainelli@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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).