Re: [PATCH v2] ARM: mm: Provide better fault message for permission fault

From: Russell King (Oracle)
Date: Mon Sep 26 2022 - 11:31:09 EST


On Mon, Sep 26, 2022 at 09:26:50PM +0800, Kefeng Wang wrote:
>
> On 2022/9/26 18:13, Russell King (Oracle) wrote:
> > On Mon, Sep 19, 2022 at 06:38:45PM +0800, Kefeng Wang wrote:
> > > If there is a permission fault in __do_kernel_fault(), we only
> > > print the generic "paging request" message which don't show
> > > read, write or excute information, let's provide better fault
> > > message for them.
> > I don't like this change. With CPUs that do not have the ability to
> > relocate the vectors to 0xffff0000, the vectors live at address 0,
> > so NULL pointer dereferences can produce permission faults.
> The __do_user_fault(), do_DataAbort() and do_PrefetchAbort() shows
> the FSR when printing, we could do it in die_kernel_fault(), and
> which will be easy for us to check whether the page fault is permision
> fault,

We print the hex value already in the oops:

Internal error: Oops: (fsr hex value) [#num] ...

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!