[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5608703E.5070406@sr71.net>
Date: Sun, 27 Sep 2015 15:39:58 -0700
From: Dave Hansen <dave@...1.net>
To: Ingo Molnar <mingo@...nel.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 10/26] x86, pkeys: notify userspace about protection key
faults
On 09/25/2015 11:20 PM, Ingo Molnar wrote:
> * Dave Hansen <dave@...1.net> wrote:
...
>> Since follow_pte() fails for all huge
>> pages, it just falls back to pulling the protection key out of the VMA,
>> which _does_ work for huge pages.
>
> That might be true for explicit hugetlb vmas, but what about transparent hugepages
> that can show up in regular vmas?
All PTEs (large or small) established under a given VMA have the same
protection key. Any change in protection key for a range will either
change or split the VMA.
So I think it's safe to rely on the VMA entirely. Well, as least as
safe as the PTE. It's definitely a wee bit racy, which I'll elaborate
on when I repost the patches.
>> I've actually removed the PTE walking and I just now use the VMA directly. I
>> don't see a ton of additional value from walking the page tables when we can get
>> what we need from the VMA.
>
> That's actually good, because it's also cheap, especially if we can get rid of the
> extra find_vma().
>
> and we (thankfully) have no non-linear vmas to worry about anymore.
Yep.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists