Re: [PATCH V8 37/44] memremap_pages: Set PKS PKey in PTEs if PGMAP_PROTECTIONS is requested

From: Ira Weiny
Date: Tue Mar 01 2022 - 13:15:31 EST


On Fri, Feb 04, 2022 at 09:41:59AM -0800, Dan Williams wrote:
> On Thu, Jan 27, 2022 at 9:55 AM <ira.weiny@xxxxxxxxx> wrote:
> >
> > From: Ira Weiny <ira.weiny@xxxxxxxxx>
> >
> > When the user requests protections the dev_pagemap mappings need to have
> > a PKEY set.
> >
> > Define devmap_protection_adjust_pgprot() to add the PKey to the page
> > protections. Call it when PGMAP_PROTECTIONS is requested when remapping
> > pages.
> >
> > Signed-off-by: Ira Weiny <ira.weiny@xxxxxxxxx>
> > ---
>
> Does this patch have a reason to exist independent of the patch that
> introduced devmap_protection_enable()?
>
> Otherwise looks ok.

Just easier to review this specific change. For V8 I split the patches up
quite a bit to be much more direct to 1 change/patch. I think it worked out
well and I don't plan to merge much in V9 because as you say this change looks
good. :-D

Ira