linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Steven Price <steven.price@arm.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Andy Lutomirski <luto@kernel.org>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH 1/2] x86: mm: ptdump: Calculate effective permissions correctly
Date: Wed, 27 May 2020 16:55:26 +0100	[thread overview]
Message-ID: <9aafccf1-0995-bea5-c814-c8cd9d719d12@arm.com> (raw)
In-Reply-To: <5a7fc0d5-14c5-d263-daf1-bf81da30d91e@suse.com>

On 27/05/2020 16:15, Jan Beulich wrote:
> On 21.05.2020 17:23, Steven Price wrote:
>> By switching the x86 page table dump code to use the generic code the
>> effective permissions are no longer calculated correctly because the
>> note_page() function is only called for *leaf* entries. To calculate the
>> actual effective permissions it is necessary to observe the full
>> hierarchy of the page tree.
>>
>> Introduce a new callback for ptdump which is called for every entry and
>> can therefore update the prot_levels array correctly. note_page() can
>> then simply access the appropriate element in the array.
>>
>> Reported-by: Jan Beulich <jbeulich@suse.com>
>> Fixes: 2ae27137b2db ("x86: mm: convert dump_pagetables to use walk_page_range")
>> Signed-off-by: Steven Price <steven.price@arm.com>
> 
> This (with the later correction) and the 2nd patch
> Tested-by: Jan Beulich <jbeulich@suse.com>
> 
> It allowed me to go and finally find why under Xen there was still
> a single W+X mapping left - another bug, another patch.
> 
> Thanks, Jan
> 

Thanks for testing (and sorry for breaking it in the first place)!

Steve


  reply	other threads:[~2020-05-27 16:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-21 15:23 [PATCH 0/2] Fix W+X debug feature on x86 Steven Price
2020-05-21 15:23 ` [PATCH 1/2] x86: mm: ptdump: Calculate effective permissions correctly Steven Price
     [not found]   ` <20200522180741.GB1337@Qians-MacBook-Air.local>
2020-05-26 10:41     ` Steven Price
2020-05-27 15:15   ` Jan Beulich
2020-05-27 15:55     ` Steven Price [this message]
2020-05-21 15:23 ` [PATCH 2/2] mm: ptdump: Expand type of 'val' in note_page() Steven Price
2020-05-21 19:08 ` [PATCH 0/2] Fix W+X debug feature on x86 Andrew Morton
2020-05-22 12:50   ` Steven Price

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9aafccf1-0995-bea5-c814-c8cd9d719d12@arm.com \
    --to=steven.price@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=jbeulich@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).