Re: [PATCH v6 32/39] s390/ptdump: Add KMSAN page markers

Ilya Leoshkevich
2024-06-21T08:21:27Z

On Fri, 2024-06-21 at 02:25 +0200, Ilya Leoshkevich wrote:
> Add KMSAN vmalloc metadata areas to kernel_page_tables.
>
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> ---
>  arch/s390/mm/dump_pagetables.c | 30 ++++++++++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
>
> diff --git a/arch/s390/mm/dump_pagetables.c
> b/arch/s390/mm/dump_pagetables.c
> index ffd07ed7b4af..f51e5d0862a3 100644
> --- a/arch/s390/mm/dump_pagetables.c
> +++ b/arch/s390/mm/dump_pagetables.c
> @@ -36,6 +36,16 @@ enum address_markers_idx {
>   VMEMMAP_END_NR,
>   VMALLOC_NR,
>   VMALLOC_END_NR,
> +#ifdef CONFIG_KMSAN
> + KMSAN_VMALLOC_SHADOW_START_NR,
> + KMSAN_VMALLOC_SHADOW_END_NR,
> + KMSAN_VMALLOC_ORIGIN_START_NR,
> + KMSAN_VMALLOC_ORIGIN_END_NR,
> + KMSAN_MODULES_SHADOW_START_NR,
> + KMSAN_MODULES_SHADOW_END_NR,
> + KMSAN_MODULES_ORIGIN_START_NR,
> + KMSAN_MODULES_ORIGIN_END_NR,
> +#endif
>   MODULES_NR,
>   MODULES_END_NR,
>   ABS_LOWCORE_NR,
> @@ -74,6 +84,16 @@ static struct addr_marker address_markers[] = {
>  #ifdef CONFIG_KASAN
>   [KASAN_SHADOW_START_NR] = {KASAN_SHADOW_START,
> "Kasan Shadow Start"},
>   [KASAN_SHADOW_END_NR] = {KASAN_SHADOW_END, "Kasan Shadow
> End"},
> +#endif
> +#ifdef CONFIG_KMSAN
> + [KMSAN_VMALLOC_SHADOW_START_NR] = {0, "Kmsan vmalloc
> Shadow Start"},
> + [KMSAN_VMALLOC_SHADOW_END_NR] = {0, "Kmsan vmalloc Shadow
> End"},
> + [KMSAN_VMALLOC_ORIGIN_START_NR] = {0, "Kmsan vmalloc
> Origins Start"},
> + [KMSAN_VMALLOC_ORIGIN_END_NR] = {0, "Kmsan vmalloc Origins
> End"},
> + [KMSAN_MODULES_SHADOW_START_NR] = {0, "Kmsan Modules
> Shadow Start"},
> + [KMSAN_MODULES_SHADOW_END_NR] = {0, "Kmsan Modules Shadow
> End"},
> + [KMSAN_MODULES_ORIGIN_START_NR] = {0, "Kmsan Modules
> Origins Start"},
> + [KMSAN_MODULES_ORIGIN_END_NR] = {0, "Kmsan Modules Origins
> End"},
>  #endif

Please disregard this patch. It's not essential for the series, and
also has a subtle bug: this block needs to be moved upwards, because
right now { -1, NULL } overlaps [MODULES_NR]. I will resend it
separately later.

>   { -1, NULL }
>  };