Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1226398 > unrolled thread

[PATCH 6/7] arm64: Make the kernel page dump utility aware of the CONT bit

Started byJeremy Linton <jeremy.linton@arm.com>
First post2015-09-16 21:10 +0200
Last post2015-09-18 10:40 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 6/7] arm64: Make the kernel page dump utility aware of the CONT bit Jeremy Linton <jeremy.linton@arm.com> - 2015-09-16 21:10 +0200
    Re: [PATCH 6/7] arm64: Make the kernel page dump utility aware of  the CONT bit Huang Shijie <shijie.huang@arm.com> - 2015-09-18 09:10 +0200
    Re: [PATCH 6/7] arm64: Make the kernel page dump utility aware of  the CONT bit Huang Shijie <shijie.huang@arm.com> - 2015-09-18 10:40 +0200

#1226398 — [PATCH 6/7] arm64: Make the kernel page dump utility aware of the CONT bit

FromJeremy Linton <jeremy.linton@arm.com>
Date2015-09-16 21:10 +0200
Subject[PATCH 6/7] arm64: Make the kernel page dump utility aware of the CONT bit
Message-ID<q9qfE-4Y7-7@gated-at.bofh.it>
The kernel page dump utility needs to be aware of the CONT bit before
it will break up pages ranges for display.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
---
 arch/arm64/mm/dump.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/mm/dump.c b/arch/arm64/mm/dump.c
index f3d6221..5a22a11 100644
--- a/arch/arm64/mm/dump.c
+++ b/arch/arm64/mm/dump.c
@@ -67,6 +67,12 @@ static struct addr_marker address_markers[] = {
 	{ -1,			NULL },
 };
 
+/*
+ * The page dumper groups page table entries of the same type into a single
+ * description. It uses pg_state to track the range information while
+ * iterating over the pte entries. When the continuity is broken it then
+ * dumps out a description of the range.
+ */
 struct pg_state {
 	struct seq_file *seq;
 	const struct addr_marker *marker;
@@ -114,6 +120,16 @@ static const struct prot_bits pte_bits[] = {
 		.set	= "NG",
 		.clear	= "  ",
 	}, {
+		.mask	= PTE_CONT,
+		.val	= PTE_CONT,
+		.set	= "CON",
+		.clear	= "   ",
+	}, {
+		.mask	= PTE_TABLE_BIT,
+		.val	= PTE_TABLE_BIT,
+		.set	= "   ",
+		.clear	= "BLK",
+	}, {
 		.mask	= PTE_UXN,
 		.val	= PTE_UXN,
 		.set	= "UXN",
@@ -198,7 +214,7 @@ static void note_page(struct pg_state *st, unsigned long addr, unsigned level,
 		unsigned long delta;
 
 		if (st->current_prot) {
-			seq_printf(st->seq, "0x%16lx-0x%16lx   ",
+			seq_printf(st->seq, "0x%016lx-0x%016lx   ",
 				   st->start_address, addr);
 
 			delta = (addr - st->start_address) >> 10;
-- 
2.4.3


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1227609 — Re: [PATCH 6/7] arm64: Make the kernel page dump utility aware of the CONT bit

FromHuang Shijie <shijie.huang@arm.com>
Date2015-09-18 09:10 +0200
SubjectRe: [PATCH 6/7] arm64: Make the kernel page dump utility aware of the CONT bit
Message-ID<q9XXX-3Se-17@gated-at.bofh.it>
In reply to#1226398
On Wed, Sep 16, 2015 at 02:03:05PM -0500, Jeremy Linton wrote:
Hi Jeremy,
> The kernel page dump utility needs to be aware of the CONT bit before
> it will break up pages ranges for display.
> 
> Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
> ---
>  arch/arm64/mm/dump.c | 18 +++++++++++++++++-
>  1 file changed, 17 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/mm/dump.c b/arch/arm64/mm/dump.c
> index f3d6221..5a22a11 100644
> --- a/arch/arm64/mm/dump.c
> +++ b/arch/arm64/mm/dump.c
> @@ -67,6 +67,12 @@ static struct addr_marker address_markers[] = {
>  	{ -1,			NULL },
>  };
>  
> +/*
> + * The page dumper groups page table entries of the same type into a single
> + * description. It uses pg_state to track the range information while
> + * iterating over the pte entries. When the continuity is broken it then
> + * dumps out a description of the range.
> + */
>  struct pg_state {
>  	struct seq_file *seq;
>  	const struct addr_marker *marker;
> @@ -114,6 +120,16 @@ static const struct prot_bits pte_bits[] = {
>  		.set	= "NG",
>  		.clear	= "  ",
>  	}, {
> +		.mask	= PTE_CONT,
> +		.val	= PTE_CONT,
> +		.set	= "CON",
> +		.clear	= "   ",
> +	}, {
> +		.mask	= PTE_TABLE_BIT,
> +		.val	= PTE_TABLE_BIT,
> +		.set	= "   ",
> +		.clear	= "BLK",
Please update the commit message, since your patch also add the TABLE_BIT, not
only the CONT bit.

thanks
Huang Shijie

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1227649 — Re: [PATCH 6/7] arm64: Make the kernel page dump utility aware of the CONT bit

FromHuang Shijie <shijie.huang@arm.com>
Date2015-09-18 10:40 +0200
SubjectRe: [PATCH 6/7] arm64: Make the kernel page dump utility aware of the CONT bit
Message-ID<q9Zn5-5KK-23@gated-at.bofh.it>
In reply to#1226398
On Wed, Sep 16, 2015 at 02:03:05PM -0500, Jeremy Linton wrote:
> The kernel page dump utility needs to be aware of the CONT bit before
> it will break up pages ranges for display.
> 
> Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
> ---
>  arch/arm64/mm/dump.c | 18 +++++++++++++++++-
>  1 file changed, 17 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/mm/dump.c b/arch/arm64/mm/dump.c
> index f3d6221..5a22a11 100644
> --- a/arch/arm64/mm/dump.c
> +++ b/arch/arm64/mm/dump.c
> @@ -67,6 +67,12 @@ static struct addr_marker address_markers[] = {
>  	{ -1,			NULL },
>  };
>  
> +/*
> + * The page dumper groups page table entries of the same type into a single
> + * description. It uses pg_state to track the range information while
> + * iterating over the pte entries. When the continuity is broken it then
> + * dumps out a description of the range.
> + */
>  struct pg_state {
>  	struct seq_file *seq;
>  	const struct addr_marker *marker;
> @@ -114,6 +120,16 @@ static const struct prot_bits pte_bits[] = {
>  		.set	= "NG",
>  		.clear	= "  ",
>  	}, {
> +		.mask	= PTE_CONT,
> +		.val	= PTE_CONT,
> +		.set	= "CON",
> +		.clear	= "   ",
> +	}, {
> +		.mask	= PTE_TABLE_BIT,
> +		.val	= PTE_TABLE_BIT,
> +		.set	= "   ",
> +		.clear	= "BLK",
I think the PTE_TABLE_BIT should be not here. Since PTE_TABLE_BIT is in bit 1,
it should be placed before the PTE_USER which is in bit 6.

thanks
Huang Shijie

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web