2021-06-24 12:19:03

by Alexandre Ghiti

[permalink] [raw]
Subject: [PATCH -fixes] riscv: Fix PTDUMP output now BPF region moved back to module region

BPF region was moved back to the region below the kernel at the end of the
module region in commit 3a02764c372c ("riscv: Ensure BPF_JIT_REGION_START
aligned with PMD size"), so reflect this change in kernel page table
output.

Signed-off-by: Alexandre Ghiti <[email protected]>
---
arch/riscv/mm/ptdump.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/riscv/mm/ptdump.c b/arch/riscv/mm/ptdump.c
index 0536ac84b730..22d6555d89dc 100644
--- a/arch/riscv/mm/ptdump.c
+++ b/arch/riscv/mm/ptdump.c
@@ -98,8 +98,8 @@ static struct addr_marker address_markers[] = {
{0, "vmalloc() end"},
{0, "Linear mapping"},
#ifdef CONFIG_64BIT
- {0, "Modules mapping"},
- {0, "Kernel mapping (kernel, BPF)"},
+ {0, "Modules/BPF mapping"},
+ {0, "Kernel mapping"},
#endif
{-1, NULL},
};
--
2.30.2


2021-06-25 13:40:30

by Jisheng Zhang

[permalink] [raw]
Subject: Re: [PATCH -fixes] riscv: Fix PTDUMP output now BPF region moved back to module region

On Thu, 24 Jun 2021 14:17:21 +0200
Alexandre Ghiti <[email protected]> wrote:

> BPF region was moved back to the region below the kernel at the end of the
> module region in commit 3a02764c372c ("riscv: Ensure BPF_JIT_REGION_START
> aligned with PMD size"), so reflect this change in kernel page table
> output.

Nice catch!

>
> Signed-off-by: Alexandre Ghiti <[email protected]>

Reviewed-by: Jisheng Zhang <[email protected]>

> ---
> arch/riscv/mm/ptdump.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/riscv/mm/ptdump.c b/arch/riscv/mm/ptdump.c
> index 0536ac84b730..22d6555d89dc 100644
> --- a/arch/riscv/mm/ptdump.c
> +++ b/arch/riscv/mm/ptdump.c
> @@ -98,8 +98,8 @@ static struct addr_marker address_markers[] = {
> {0, "vmalloc() end"},
> {0, "Linear mapping"},
> #ifdef CONFIG_64BIT
> - {0, "Modules mapping"},
> - {0, "Kernel mapping (kernel, BPF)"},
> + {0, "Modules/BPF mapping"},
> + {0, "Kernel mapping"},
> #endif
> {-1, NULL},
> };


2021-07-06 23:19:05

by Palmer Dabbelt

[permalink] [raw]
Subject: Re: [PATCH -fixes] riscv: Fix PTDUMP output now BPF region moved back to module region

On Thu, 24 Jun 2021 05:17:21 PDT (-0700), [email protected] wrote:
> BPF region was moved back to the region below the kernel at the end of the
> module region in commit 3a02764c372c ("riscv: Ensure BPF_JIT_REGION_START
> aligned with PMD size"), so reflect this change in kernel page table
> output.
>
> Signed-off-by: Alexandre Ghiti <[email protected]>
> ---
> arch/riscv/mm/ptdump.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/riscv/mm/ptdump.c b/arch/riscv/mm/ptdump.c
> index 0536ac84b730..22d6555d89dc 100644
> --- a/arch/riscv/mm/ptdump.c
> +++ b/arch/riscv/mm/ptdump.c
> @@ -98,8 +98,8 @@ static struct addr_marker address_markers[] = {
> {0, "vmalloc() end"},
> {0, "Linear mapping"},
> #ifdef CONFIG_64BIT
> - {0, "Modules mapping"},
> - {0, "Kernel mapping (kernel, BPF)"},
> + {0, "Modules/BPF mapping"},
> + {0, "Kernel mapping"},
> #endif
> {-1, NULL},
> };

Thanks, this is on for-next.

2021-07-08 11:46:00

by Alexandre Ghiti

[permalink] [raw]
Subject: Re: [PATCH -fixes] riscv: Fix PTDUMP output now BPF region moved back to module region

Le 7/07/2021 ? 01:16, Palmer Dabbelt a ?crit?:
> On Thu, 24 Jun 2021 05:17:21 PDT (-0700), [email protected] wrote:
>> BPF region was moved back to the region below the kernel at the end of
>> the
>> module region in commit 3a02764c372c ("riscv: Ensure BPF_JIT_REGION_START
>> aligned with PMD size"), so reflect this change in kernel page table
>> output.
>>
>> Signed-off-by: Alexandre Ghiti <[email protected]>
>> ---
>> ?arch/riscv/mm/ptdump.c | 4 ++--
>> ?1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/riscv/mm/ptdump.c b/arch/riscv/mm/ptdump.c
>> index 0536ac84b730..22d6555d89dc 100644
>> --- a/arch/riscv/mm/ptdump.c
>> +++ b/arch/riscv/mm/ptdump.c
>> @@ -98,8 +98,8 @@ static struct addr_marker address_markers[] = {
>> ???? {0, "vmalloc() end"},
>> ???? {0, "Linear mapping"},
>> ?#ifdef CONFIG_64BIT
>> -??? {0, "Modules mapping"},
>> -??? {0, "Kernel mapping (kernel, BPF)"},
>> +??? {0, "Modules/BPF mapping"},
>> +??? {0, "Kernel mapping"},
>> ?#endif
>> ???? {-1, NULL},
>> ?};
>
> Thanks, this is on for-next.

As this fix was for 5.13, I add stable in cc.

Cc: [email protected] # v5.13

>
> _______________________________________________
> linux-riscv mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-riscv