* [PATCH 0/2] s390/kmsan: Two follow-up patches @ 2024-07-23 12:44 Ilya Leoshkevich 2024-07-23 12:44 ` [PATCH 1/2] s390/kmsan: Fix merge conflict with get_lowcore() introduction Ilya Leoshkevich 2024-07-23 12:44 ` [PATCH 2/2] s390/ptdump: Add KMSAN page markers Ilya Leoshkevich 0 siblings, 2 replies; 7+ messages in thread From: Ilya Leoshkevich @ 2024-07-23 12:44 UTC (permalink / raw) To: Heiko Carstens, Vasily Gorbik, Alexander Gordeev Cc: linux-s390, Ilya Leoshkevich Hi, This is a follow-up to [1]. Patch 1 fixes a conflict with the lowcore refactoring. Patch 2 had to be excluded from the original submission to expedite its integration, so I'm sending it now. Best regards, Ilya Ilya Leoshkevich (2): s390/kmsan: Fix merge conflict with get_lowcore() introduction s390/ptdump: Add KMSAN page markers arch/s390/include/asm/kmsan.h | 6 +++--- arch/s390/mm/dump_pagetables.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 3 deletions(-) -- 2.45.2 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] s390/kmsan: Fix merge conflict with get_lowcore() introduction 2024-07-23 12:44 [PATCH 0/2] s390/kmsan: Two follow-up patches Ilya Leoshkevich @ 2024-07-23 12:44 ` Ilya Leoshkevich 2024-07-23 13:18 ` Heiko Carstens 2024-07-25 9:10 ` Alexander Gordeev 2024-07-23 12:44 ` [PATCH 2/2] s390/ptdump: Add KMSAN page markers Ilya Leoshkevich 1 sibling, 2 replies; 7+ messages in thread From: Ilya Leoshkevich @ 2024-07-23 12:44 UTC (permalink / raw) To: Heiko Carstens, Vasily Gorbik, Alexander Gordeev Cc: linux-s390, Ilya Leoshkevich Resolve the conflict between commit 2a48c8c9cf87 ("s390/kmsan: implement the architecture-specific functions") and commit 39976f1278a9 ("s390: Remove S390_lowcore"). Fixes: 2a48c8c9cf87 ("s390/kmsan: implement the architecture-specific functions") Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> --- arch/s390/include/asm/kmsan.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/s390/include/asm/kmsan.h b/arch/s390/include/asm/kmsan.h index 27db65fbf3f6..f73e181d09ae 100644 --- a/arch/s390/include/asm/kmsan.h +++ b/arch/s390/include/asm/kmsan.h @@ -12,8 +12,8 @@ static inline bool is_lowcore_addr(void *addr) { - return addr >= (void *)&S390_lowcore && - addr < (void *)(&S390_lowcore + 1); + return addr >= (void *)get_lowcore() && + addr < (void *)(get_lowcore() + 1); } static inline void *arch_kmsan_get_meta_or_null(void *addr, bool is_origin) @@ -25,7 +25,7 @@ static inline void *arch_kmsan_get_meta_or_null(void *addr, bool is_origin) * order to get a distinct struct page. */ addr += (void *)lowcore_ptr[raw_smp_processor_id()] - - (void *)&S390_lowcore; + (void *)get_lowcore(); if (KMSAN_WARN_ON(is_lowcore_addr(addr))) return NULL; return kmsan_get_metadata(addr, is_origin); -- 2.45.2 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] s390/kmsan: Fix merge conflict with get_lowcore() introduction 2024-07-23 12:44 ` [PATCH 1/2] s390/kmsan: Fix merge conflict with get_lowcore() introduction Ilya Leoshkevich @ 2024-07-23 13:18 ` Heiko Carstens 2024-07-25 9:10 ` Alexander Gordeev 1 sibling, 0 replies; 7+ messages in thread From: Heiko Carstens @ 2024-07-23 13:18 UTC (permalink / raw) To: Ilya Leoshkevich; +Cc: Vasily Gorbik, Alexander Gordeev, linux-s390 On Tue, Jul 23, 2024 at 02:44:11PM +0200, Ilya Leoshkevich wrote: > Resolve the conflict between commit 2a48c8c9cf87 ("s390/kmsan: > implement the architecture-specific functions") and commit 39976f1278a9 > ("s390: Remove S390_lowcore"). > > Fixes: 2a48c8c9cf87 ("s390/kmsan: implement the architecture-specific functions") > Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> > --- > arch/s390/include/asm/kmsan.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Heiko Carstens <hca@linux.ibm.com> ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] s390/kmsan: Fix merge conflict with get_lowcore() introduction 2024-07-23 12:44 ` [PATCH 1/2] s390/kmsan: Fix merge conflict with get_lowcore() introduction Ilya Leoshkevich 2024-07-23 13:18 ` Heiko Carstens @ 2024-07-25 9:10 ` Alexander Gordeev 1 sibling, 0 replies; 7+ messages in thread From: Alexander Gordeev @ 2024-07-25 9:10 UTC (permalink / raw) To: Ilya Leoshkevich; +Cc: Heiko Carstens, Vasily Gorbik, linux-s390 On Tue, Jul 23, 2024 at 02:44:11PM +0200, Ilya Leoshkevich wrote: > Resolve the conflict between commit 2a48c8c9cf87 ("s390/kmsan: > implement the architecture-specific functions") and commit 39976f1278a9 > ("s390: Remove S390_lowcore"). > > Fixes: 2a48c8c9cf87 ("s390/kmsan: implement the architecture-specific functions") > Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> > --- > arch/s390/include/asm/kmsan.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com> ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] s390/ptdump: Add KMSAN page markers 2024-07-23 12:44 [PATCH 0/2] s390/kmsan: Two follow-up patches Ilya Leoshkevich 2024-07-23 12:44 ` [PATCH 1/2] s390/kmsan: Fix merge conflict with get_lowcore() introduction Ilya Leoshkevich @ 2024-07-23 12:44 ` Ilya Leoshkevich 2024-07-23 13:18 ` Heiko Carstens 2024-07-25 9:10 ` Alexander Gordeev 1 sibling, 2 replies; 7+ messages in thread From: Ilya Leoshkevich @ 2024-07-23 12:44 UTC (permalink / raw) To: Heiko Carstens, Vasily Gorbik, Alexander Gordeev Cc: linux-s390, Ilya Leoshkevich Add KMSAN vmalloc metadata areas to /sys/kernel/debug/kernel_page_tables. Example output: 0x000003a95fff9000-0x000003a960000000 28K PTE I ---[ vmalloc Area End ]--- ---[ Kmsan vmalloc Shadow Start ]--- 0x000003a960000000-0x000003a960010000 64K PTE RW NX [...] 0x000003d3dfff9000-0x000003d3e0000000 28K PTE I ---[ Kmsan vmalloc Shadow End ]--- ---[ Kmsan vmalloc Origins Start ]--- 0x000003d3e0000000-0x000003d3e0010000 64K PTE RW NX [...] 0x000003fe5fff9000-0x000003fe60000000 28K PTE I ---[ Kmsan vmalloc Origins End ]--- ---[ Kmsan Modules Shadow Start ]--- 0x000003fe60000000-0x000003fe60001000 4K PTE RW NX [...] 0x000003fe60100000-0x000003fee0000000 2047M PMD I ---[ Kmsan Modules Shadow End ]--- ---[ Kmsan Modules Origins Start ]--- 0x000003fee0000000-0x000003fee0001000 4K PTE RW NX [...] 0x000003fee0100000-0x000003ff60000000 2047M PMD I ---[ Kmsan Modules Origins End ]--- ---[ Modules Area Start ]--- 0x000003ff60000000-0x000003ff60001000 4K PTE RO X 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 45db5f47b22d..98dab3e049de 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, @@ -65,6 +75,16 @@ static struct addr_marker address_markers[] = { [VMEMMAP_END_NR] = {0, "vmemmap Area End"}, [VMALLOC_NR] = {0, "vmalloc Area Start"}, [VMALLOC_END_NR] = {0, "vmalloc Area End"}, +#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 [MODULES_NR] = {0, "Modules Area Start"}, [MODULES_END_NR] = {0, "Modules Area End"}, [ABS_LOWCORE_NR] = {0, "Lowcore Area Start"}, @@ -306,6 +326,16 @@ static int pt_dump_init(void) #ifdef CONFIG_KFENCE address_markers[KFENCE_START_NR].start_address = kfence_start; address_markers[KFENCE_END_NR].start_address = kfence_start + KFENCE_POOL_SIZE; +#endif +#ifdef CONFIG_KMSAN + address_markers[KMSAN_VMALLOC_SHADOW_START_NR].start_address = KMSAN_VMALLOC_SHADOW_START; + address_markers[KMSAN_VMALLOC_SHADOW_END_NR].start_address = KMSAN_VMALLOC_SHADOW_END; + address_markers[KMSAN_VMALLOC_ORIGIN_START_NR].start_address = KMSAN_VMALLOC_ORIGIN_START; + address_markers[KMSAN_VMALLOC_ORIGIN_END_NR].start_address = KMSAN_VMALLOC_ORIGIN_END; + address_markers[KMSAN_MODULES_SHADOW_START_NR].start_address = KMSAN_MODULES_SHADOW_START; + address_markers[KMSAN_MODULES_SHADOW_END_NR].start_address = KMSAN_MODULES_SHADOW_END; + address_markers[KMSAN_MODULES_ORIGIN_START_NR].start_address = KMSAN_MODULES_ORIGIN_START; + address_markers[KMSAN_MODULES_ORIGIN_END_NR].start_address = KMSAN_MODULES_ORIGIN_END; #endif sort_address_markers(); #ifdef CONFIG_PTDUMP_DEBUGFS -- 2.45.2 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] s390/ptdump: Add KMSAN page markers 2024-07-23 12:44 ` [PATCH 2/2] s390/ptdump: Add KMSAN page markers Ilya Leoshkevich @ 2024-07-23 13:18 ` Heiko Carstens 2024-07-25 9:10 ` Alexander Gordeev 1 sibling, 0 replies; 7+ messages in thread From: Heiko Carstens @ 2024-07-23 13:18 UTC (permalink / raw) To: Ilya Leoshkevich; +Cc: Vasily Gorbik, Alexander Gordeev, linux-s390 On Tue, Jul 23, 2024 at 02:44:12PM +0200, Ilya Leoshkevich wrote: > Add KMSAN vmalloc metadata areas to > /sys/kernel/debug/kernel_page_tables. Example output: > > 0x000003a95fff9000-0x000003a960000000 28K PTE I > ---[ vmalloc Area End ]--- > ---[ Kmsan vmalloc Shadow Start ]--- > 0x000003a960000000-0x000003a960010000 64K PTE RW NX > [...] > 0x000003d3dfff9000-0x000003d3e0000000 28K PTE I > ---[ Kmsan vmalloc Shadow End ]--- > ---[ Kmsan vmalloc Origins Start ]--- > 0x000003d3e0000000-0x000003d3e0010000 64K PTE RW NX > [...] > 0x000003fe5fff9000-0x000003fe60000000 28K PTE I > ---[ Kmsan vmalloc Origins End ]--- > ---[ Kmsan Modules Shadow Start ]--- > 0x000003fe60000000-0x000003fe60001000 4K PTE RW NX > [...] > 0x000003fe60100000-0x000003fee0000000 2047M PMD I > ---[ Kmsan Modules Shadow End ]--- > ---[ Kmsan Modules Origins Start ]--- > 0x000003fee0000000-0x000003fee0001000 4K PTE RW NX > [...] > 0x000003fee0100000-0x000003ff60000000 2047M PMD I > ---[ Kmsan Modules Origins End ]--- > ---[ Modules Area Start ]--- > 0x000003ff60000000-0x000003ff60001000 4K PTE RO X > > Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> > --- > arch/s390/mm/dump_pagetables.c | 30 ++++++++++++++++++++++++++++++ > 1 file changed, 30 insertions(+) Reviewed-by: Heiko Carstens <hca@linux.ibm.com> ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] s390/ptdump: Add KMSAN page markers 2024-07-23 12:44 ` [PATCH 2/2] s390/ptdump: Add KMSAN page markers Ilya Leoshkevich 2024-07-23 13:18 ` Heiko Carstens @ 2024-07-25 9:10 ` Alexander Gordeev 1 sibling, 0 replies; 7+ messages in thread From: Alexander Gordeev @ 2024-07-25 9:10 UTC (permalink / raw) To: Ilya Leoshkevich; +Cc: Heiko Carstens, Vasily Gorbik, linux-s390 On Tue, Jul 23, 2024 at 02:44:12PM +0200, Ilya Leoshkevich wrote: > Add KMSAN vmalloc metadata areas to > /sys/kernel/debug/kernel_page_tables. Example output: > > 0x000003a95fff9000-0x000003a960000000 28K PTE I > ---[ vmalloc Area End ]--- > ---[ Kmsan vmalloc Shadow Start ]--- > 0x000003a960000000-0x000003a960010000 64K PTE RW NX > [...] > 0x000003d3dfff9000-0x000003d3e0000000 28K PTE I > ---[ Kmsan vmalloc Shadow End ]--- > ---[ Kmsan vmalloc Origins Start ]--- > 0x000003d3e0000000-0x000003d3e0010000 64K PTE RW NX > [...] > 0x000003fe5fff9000-0x000003fe60000000 28K PTE I > ---[ Kmsan vmalloc Origins End ]--- > ---[ Kmsan Modules Shadow Start ]--- > 0x000003fe60000000-0x000003fe60001000 4K PTE RW NX > [...] > 0x000003fe60100000-0x000003fee0000000 2047M PMD I > ---[ Kmsan Modules Shadow End ]--- > ---[ Kmsan Modules Origins Start ]--- > 0x000003fee0000000-0x000003fee0001000 4K PTE RW NX > [...] > 0x000003fee0100000-0x000003ff60000000 2047M PMD I > ---[ Kmsan Modules Origins End ]--- > ---[ Modules Area Start ]--- > 0x000003ff60000000-0x000003ff60001000 4K PTE RO X > > Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> > --- > arch/s390/mm/dump_pagetables.c | 30 ++++++++++++++++++++++++++++++ > 1 file changed, 30 insertions(+) Acked-by: Alexander Gordeev <agordeev@linux.ibm.com> ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-07-25 9:10 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-07-23 12:44 [PATCH 0/2] s390/kmsan: Two follow-up patches Ilya Leoshkevich 2024-07-23 12:44 ` [PATCH 1/2] s390/kmsan: Fix merge conflict with get_lowcore() introduction Ilya Leoshkevich 2024-07-23 13:18 ` Heiko Carstens 2024-07-25 9:10 ` Alexander Gordeev 2024-07-23 12:44 ` [PATCH 2/2] s390/ptdump: Add KMSAN page markers Ilya Leoshkevich 2024-07-23 13:18 ` Heiko Carstens 2024-07-25 9:10 ` Alexander Gordeev
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox