lkml.org 
[lkml]   [2018]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [tip:x86/mm] x86/mm: Consider effective protection attributes in W+X check
>>> On 26.02.18 at 11:00, <aryabinin@virtuozzo.com> wrote:
> On 02/26/2018 11:48 AM, tip-bot for Jan Beulich wrote:
>> @@ -351,7 +362,7 @@ static inline bool kasan_page_table(struct seq_file *m, struct pg_state *st,
>> (pgtable_l5_enabled && __pa(pt) == __pa(kasan_zero_p4d)) ||
>> __pa(pt) == __pa(kasan_zero_pud)) {
>> pgprotval_t prot = pte_flags(kasan_zero_pte[0]);
>> - note_page(m, st, __pgprot(prot), 5);
>> + note_page(m, st, __pgprot(prot), 0, 5);
>
> Isn't this disables W+X check for kasan page table?
> Methinks it should be 'prot' here.

Might well be - I actually did ask the question before sending v3,
but didn't get any answer (yet). The kasan_zero_p?d names
suggested to me that this is a shortcut for mappings which
otherwise would be non-present anyway, but that was merely a
guess. As to W+X checks - I can't see how the result could be
any better if the protections of kasan_zero_pte[0] would be
used: Those can't possibly be applicable independent of VA.

Jan

\
 
 \ /
  Last update: 2018-02-26 11:09    [W:0.047 / U:0.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site