Re: Query regarding Linux Arm pagetable setup
Catalin Marinas <[email protected]> Thu, 5 May 2016 17:59:01 +0100
| Newsgroups | gmane.linux.ports.arm.general |
|---|---|
| Message-ID | <[email protected]> |
On Thu, May 05, 2016 at 05:04:57PM +0100, Russell King - ARM Linux wrote: > On Thu, May 05, 2016 at 04:17:08PM +0530, Dushyant Behl wrote: > > Also, another thing which I noticed is that kernel is mapping the high > > interrupt vectors (addr 0xFFFF0000) in the user process's page table > > with read only permissions and user bit enabled. > > Can you also explain why kernel is mapping the kernel's pages with the > > user bit? > > The vector page is used to provide a set of userspace helpers so that > userspace can be more independent of the CPU than it otherwise would > be - things like a cmpxchg implementation, memory barrier, and a TLS > helper. You can turn this off, provided you know for certain that > your userspace does not make use of these facilities. > > > Also are there any other kernel pages which are marked with similar > > user bit and read only permissions in the pagetables with possible > > aliasing in the kernel's address space too? > > No. Actually, most read-only user pages (e.g. mmap'ed code) have an alias in the kernel linear mapping or temporarily in highmem (after kmap). -- Catalin