[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrWNx=H=u2R+JKM6Dr3oMqeiBSS+hdrYrGT=BJ-JrEyL+w@mail.gmail.com>
Date: Mon, 25 Jan 2016 09:33:35 -0800
From: Andy Lutomirski <luto@...capital.net>
To: Matthew Wilcox <matthew.r.wilcox@...el.com>
Cc: Ingo Molnar <mingo@...hat.com>,
Matthew Wilcox <willy@...ux.intel.com>,
Kees Cook <keescook@...omium.org>,
Andrew Morton <akpm@...ux-foundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: Re: [PATCH 1/3] x86: Honour passed pgprot in track_pfn_insert() and track_pfn_remap()
On Mon, Jan 25, 2016 at 9:25 AM, Matthew Wilcox
<matthew.r.wilcox@...el.com> wrote:
> From: Matthew Wilcox <willy@...ux.intel.com>
>
> track_pfn_insert() overwrites the pgprot that is passed in with a value
> based on the VMA's page_prot. This is a problem for people trying to
> do clever things with the new vm_insert_pfn_prot() as it will simply
> overwrite the passed protection flags. If we use the current value of
> the pgprot as the base, then it will behave as people are expecting.
>
> Also fix track_pfn_remap() in the same way.
Well that's embarrassing. Presumably it worked for me because I only
overrode the cacheability bits and lookup_memtype did the right thing.
But shouldn't the PAT code change the memtype if vm_insert_pfn_prot
requests it? Or are there no callers that actually need that? (HPET
doesn't, because there's a plain old ioremapped mapping.)
--Andy
Powered by blists - more mailing lists