Re: [PATCH V1 00/10] Remove duplicated kmap code

2020-05-01 Thread Ira Weiny
On Fri, May 01, 2020 at 01:54:56AM -0700, Christoph Hellwig wrote: > In addition to the work already it the series, it seems like > LAST_PKMAP_MASK, PKMAP_ADDR and PKMAP_NR can also be consolidated > to common code. Agreed, I mentioned in the cover letter there are similarities... > > Also

Re: xtensa question, was Re: [PATCH V1 00/10] Remove duplicated kmap code

2020-05-01 Thread Max Filippov
On Fri, May 1, 2020 at 2:19 AM Christoph Hellwig wrote: > > 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 wrote: > > > any idea why xtensa uses PAGE_KERNEL_EXEC instead of PAGE_KERNEL > > > for kmap_prot?

Re: xtensa question, was Re: [PATCH V1 00/10] Remove duplicated kmap code

2020-05-01 Thread Christoph Hellwig
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 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.

Re: xtensa question, was Re: [PATCH V1 00/10] Remove duplicated kmap code

2020-05-01 Thread Max Filippov
Hi Christoph, On Fri, May 1, 2020 at 1:46 AM Christoph Hellwig 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

Re: [PATCH V1 00/10] Remove duplicated kmap code

2020-05-01 Thread Christoph Hellwig
In addition to the work already it the series, it seems like LAST_PKMAP_MASK, PKMAP_ADDR and PKMAP_NR can also be consolidated to common code. Also kmap_atomic_high_prot / kmap_atomic_pfn could move into common code, maybe keyed off a symbol selected by the actual users that need it. It also

xtensa question, was Re: [PATCH V1 00/10] Remove duplicated kmap code

2020-05-01 Thread Christoph Hellwig
Hi Max, any idea why xtensa uses PAGE_KERNEL_EXEC instead of PAGE_KERNEL for kmap_prot? Mapping all mapped highmem as executable seems rather dangerous.

Re: [PATCH V1 00/10] Remove duplicated kmap code

2020-04-30 Thread Michael Ellerman
ira.we...@intel.com writes: > From: Ira Weiny > > The kmap infrastructure has been copied almost verbatim to every architecture. > This series consolidates obvious duplicated code by defining core functions > which call into the architectures only when needed. > > Some of the k[un]map_atomic()

[PATCH V1 00/10] Remove duplicated kmap code

2020-04-30 Thread ira . weiny
From: Ira Weiny The kmap infrastructure has been copied almost verbatim to every architecture. This series consolidates obvious duplicated code by defining core functions which call into the architectures only when needed. Some of the k[un]map_atomic() implementations have some similarities but