[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1603784517.12492.2.camel@mtkswgap22>
Date: Tue, 27 Oct 2020 15:41:57 +0800
From: Miles Chen <miles.chen@...iatek.com>
To: Russell King - ARM Linux admin <linux@...linux.org.uk>
CC: Catalin Marinas <catalin.marinas@....com>,
Minchan Kim <minchan@...nel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>,
<linux-mediatek@...ts.infradead.org>, <wsd_upstream@...iatek.com>,
Suren Baghdasaryan <surenb@...gle.com>
Subject: Re: [PATCH v2 4/4] arm: replace vector mem type with read-only type
On Fri, 2020-10-23 at 11:12 +0100, Russell King - ARM Linux admin wrote:
> On Fri, Oct 23, 2020 at 05:14:37PM +0800, Miles Chen wrote:
> > Since kernel no longer writes to the vector, try to replace
> > the vector mem type with read-only type and remove L_PTE_MT_VECTORS.
> >
> > from Catalin in [1]:
> > "
> > > I don't think this matters since the kernel no longer writes to the
> > > vectors page at run-time but it needs cleaning up a bit (and testing in
> > > case I missed something). IOW, do we still need a dedicated mapping type
> > > for the vectors or we can simply use the read-only user page attributes?
> > "
>
> Catalin is incorrect. If CONFIG_KUSER_HELPERS is enabled, then the
> vectors page is definitely written to - it's a user interface, so
> it's not going to change:
>
> #ifdef CONFIG_KUSER_HELPERS
> /*
> * User space must never try to access this
> * directly. Expect your app to break
> * eventually if you do so. The user helper
> * at 0xffff0fe0 must be used instead. (see
> * entry-armv.S for details)
> */
> *((unsigned int *)0xffff0ff0) = val;
> #endif
>
Thanks for the comment.
We have to keep L_PTE_MT_VECTORS for KUSER_HELPERS.
Miles
Powered by blists - more mailing lists