linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Song Liu <songliubraving@fb.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Kernel Team <Kernel-team@fb.com>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>,
	Joerg Roedel <jroedel@suse.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Andy Lutomirski <luto@kernel.org>
Subject: Re: [PATCH v2] x86/mm/pti: in pti_clone_pgtable(), increase addr properly
Date: Sat, 24 Aug 2019 02:12:23 +0000	[thread overview]
Message-ID: <33ED1189-0509-4F66-A96B-8CBD465889C3@fb.com> (raw)
In-Reply-To: <20190821103010.GJ2386@hirez.programming.kicks-ass.net>



> On Aug 21, 2019, at 3:30 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> 
> On Wed, Aug 21, 2019 at 12:10:08PM +0200, Peter Zijlstra wrote:
>> On Tue, Aug 20, 2019 at 01:23:14PM -0700, Song Liu wrote:
> 
>>> host-5.2-after # grep "x  pmd" /sys/kernel/debug/page_tables/dump_pid
>>> 0x0000000000600000-0x0000000000e00000           8M USR ro         PSE         x  pmd
>>> 0xffffffff81000000-0xffffffff81e00000          14M     ro         PSE     GLB x  pmd
>>> 
>>> So after this patch, the 5.2 based kernel has 7 PMDs instead of 1 PMD
>>> in 4.16 kernel.
>> 
>> This basically gives rise to more questions than it provides answers.
>> You seem to have 'forgotten' to provide the equivalent mappings on the
>> two older kernels. The fact that they're not PMD is evident, but it
>> would be very good to know what is mapped, and what -- if anything --
>> lives in the holes we've (accidentally) created.
>> 
>> Can you please provide more complete mappings? Basically provide the
>> whole cpu_entry_area mapping.
> 
> I tried on my local machine and:
> 
>  cat /debug/page_tables/kernel | awk '/^---/ { p=0 } /CPU entry/ { p=1 } { if (p) print $0 }' > ~/cea-{before,after}.txt
> 
> resulted in _identical_ files ?!?!
> 
> Can you share your before and after dumps?

I was really dumb on this. The actual issue this that kprobe on 
CONFIG_KPROBES_ON_FTRACE splits kernel text PMDs (0xffffffff81000000-). 

I will dig more into this. 

Sorry for being silent, somehow I didn't see this email until just now.

Song

      reply	other threads:[~2019-08-24  2:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-20 20:23 [PATCH v2] x86/mm/pti: in pti_clone_pgtable(), increase addr properly Song Liu
2019-08-21  9:41 ` Song Liu
2019-08-21 10:17   ` Thomas Gleixner
2019-08-24  0:59     ` Thomas Gleixner
2019-08-24  2:10       ` Song Liu
2019-08-21 10:10 ` Peter Zijlstra
2019-08-21 10:30   ` Peter Zijlstra
2019-08-24  2:12     ` Song Liu [this message]

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=33ED1189-0509-4F66-A96B-8CBD465889C3@fb.com \
    --to=songliubraving@fb.com \
    --cc=Kernel-team@fb.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=jroedel@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@kernel.org \
    --cc=peterz@infradead.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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).