Re: [PATCH 2/9] ARM: traps: use get_kernel_nofault instead of set_fs()
From: Arnd Bergmann <arnd@arndb.de>
Date: 2020-09-18 12:36:43
Also in:
linux-arch, lkml
From: Arnd Bergmann <arnd@arndb.de>
Date: 2020-09-18 12:36:43
Also in:
linux-arch, lkml
On Fri, Sep 18, 2020 at 9:42 AM Russell King - ARM Linux admin [off-list ref] wrote:
On Thu, Sep 17, 2020 at 07:29:37PM +0200, Arnd Bergmann wrote:quoted
On Tue, Sep 8, 2020 at 8:15 AM Christoph Hellwig [off-list ref] wrote: I looked through the history now and the only code path I could find that would arrive here this way is from bad_mode(), indicating that there is probably a hardware bug or the contents of *regs are corrupted.Yes, that's correct. It isn't something entirely theoretical, although we never see it now, it used to happen in the distant past due to saved regs corruption. If bad_mode() ever gets called, all bets are off and we're irrecoverably crashing. Note that in that case, while user_mode(regs) may return true or false, regs->ARM_sp and regs->ARM_lr are always the SVC mode stack and return address after regs has been stacked, and not the expected values for the parent context (which we have most likely long since destroyed.)
Ok, I have rewritten the patch and my changelog text accordingly, sending
an updated version now.
Thanks,
Arnd
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel