All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent Whitchurch <vincent.whitchurch@axis.com>
To: Will Deacon <will@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	kernel <kernel@axis.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] arm64: ptdump: Allow dumping user page tables
Date: Tue, 19 Oct 2021 14:33:08 +0200	[thread overview]
Message-ID: <20211019123307.GA20031@axis.com> (raw)
In-Reply-To: <20211019120931.GJ13251@willie-the-truck>

On Tue, Oct 19, 2021 at 02:09:32PM +0200, Will Deacon wrote:
> On Fri, Oct 01, 2021 at 04:56:03PM +0200, Vincent Whitchurch wrote:
> > Add a user_page_tables debugfs file (similar to kernel_page_tables) to
> > dump out the userspace page tables for the current process.  This
> > provides details which are not available via pagemap (such as the memory
> > type) and is useful when, for example, debugging ->mmap()
> > implementations.
> > 
> > Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
> > ---
> >  arch/arm64/mm/ptdump.c | 15 ++++++++++++++-
> >  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> How does this serialise with things like task exit?

A task can only read its own page tables using this file, and the mm
lock is held during the walk in ptdump_walk_pgd().  Isn't that
sufficient?

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Vincent Whitchurch <vincent.whitchurch@axis.com>
To: Will Deacon <will@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	kernel <kernel@axis.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] arm64: ptdump: Allow dumping user page tables
Date: Tue, 19 Oct 2021 14:33:08 +0200	[thread overview]
Message-ID: <20211019123307.GA20031@axis.com> (raw)
In-Reply-To: <20211019120931.GJ13251@willie-the-truck>

On Tue, Oct 19, 2021 at 02:09:32PM +0200, Will Deacon wrote:
> On Fri, Oct 01, 2021 at 04:56:03PM +0200, Vincent Whitchurch wrote:
> > Add a user_page_tables debugfs file (similar to kernel_page_tables) to
> > dump out the userspace page tables for the current process.  This
> > provides details which are not available via pagemap (such as the memory
> > type) and is useful when, for example, debugging ->mmap()
> > implementations.
> > 
> > Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
> > ---
> >  arch/arm64/mm/ptdump.c | 15 ++++++++++++++-
> >  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> How does this serialise with things like task exit?

A task can only read its own page tables using this file, and the mm
lock is held during the walk in ptdump_walk_pgd().  Isn't that
sufficient?

  reply	other threads:[~2021-10-19 12:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-01 14:56 [PATCH] arm64: ptdump: Allow dumping user page tables Vincent Whitchurch
2021-10-01 14:56 ` Vincent Whitchurch
2021-10-19 12:09 ` Will Deacon
2021-10-19 12:09   ` Will Deacon
2021-10-19 12:33   ` Vincent Whitchurch [this message]
2021-10-19 12:33     ` Vincent Whitchurch

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=20211019123307.GA20031@axis.com \
    --to=vincent.whitchurch@axis.com \
    --cc=catalin.marinas@arm.com \
    --cc=kernel@axis.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=will@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.