Re: [PATCH V8 41/44] kmap: Ensure kmap works for devmap pages

From: Ira Weiny
Date: Tue Mar 01 2022 - 14:52:03 EST


On Tue, Mar 01, 2022 at 11:45:41AM -0800, Ira Weiny wrote:
> On Fri, Feb 04, 2022 at 01:07:10PM -0800, Dan Williams wrote:
> > On Thu, Jan 27, 2022 at 9:55 AM <ira.weiny@xxxxxxxxx> wrote:
> > >
> > > From: Ira Weiny <ira.weiny@xxxxxxxxx>
> > >
>
> >
> > > Co-opt the kmap_{local_page,atomic}() to mediate access to PKS protected
> > > pages via the devmap facility. kmap_{local_page,atomic}() are both
> > > thread local mappings so they work well with the thread specific
> > > protections available.
> > >
> > > kmap(), on the other hand, allows for global mappings to be established,
> > > Which is incompatible with the underlying PKS facility.
> >
> > Why is kmap incompatible with PKS? I know why, but this is a claim
> > without evidence. If you documented that in a previous patch, there's
> > no harm and copying and pasting into this one. A future git log user
> > will thank you for not making them go to lore to try to find the one
> > patch with the details.
>
> Good point.
>

FWIW, I just noticed the previous paragraph mentioned the PKS protections were
thread local. I'll still reiterate and clarify here.

Ira