lkml.org 
[lkml]   [2020]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: xtensa question, was Re: [PATCH V1 00/10] Remove duplicated kmap code
On Fri, May 01, 2020 at 02:02:19AM -0700, Max Filippov wrote:
> Hi Christoph,
>
> On Fri, May 1, 2020 at 1:46 AM Christoph Hellwig <hch@infradead.org> wrote:
> > any idea why xtensa uses PAGE_KERNEL_EXEC instead of PAGE_KERNEL
> > for kmap_prot? Mapping all mapped highmem as executable seems rather
> > dangerous.
>
> I sure do: to allow instruction cache flushing when writing to high user
> pages temporarily mapped with kmap. Instruction cache management
> opcodes that operate on virtual addresses would raise an exception if
> the address is not executable.

Seems like this should use kmap_atomic_prot with PAGE_KERNEL_EXEC just
for that case. Which of course didn't exist on xtensa so far, but with
this series will.

\
 
 \ /
  Last update: 2020-05-01 11:20    [W:0.070 / U:0.984 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site