From: Heiko Carstens <hca@linux.ibm.com> To: Marco Elver <elver@google.com>, Alexander Potapenko <glider@google.com> Cc: Sven Schnelle <svens@linux.ibm.com>, Vasily Gorbik <gor@linux.ibm.com>, Christian Borntraeger <borntraeger@de.ibm.com>, kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Subject: [PATCH 4/4] s390: add kfence region to pagetable dumper Date: Wed, 28 Jul 2021 21:02:54 +0200 [thread overview] Message-ID: <20210728190254.3921642-5-hca@linux.ibm.com> (raw) In-Reply-To: <20210728190254.3921642-1-hca@linux.ibm.com> From: Sven Schnelle <svens@linux.ibm.com> Signed-off-by: Sven Schnelle <svens@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> --- arch/s390/mm/dump_pagetables.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/s390/mm/dump_pagetables.c b/arch/s390/mm/dump_pagetables.c index e40a30647d99..07dcec925bf4 100644 --- a/arch/s390/mm/dump_pagetables.c +++ b/arch/s390/mm/dump_pagetables.c @@ -4,6 +4,7 @@ #include <linux/seq_file.h> #include <linux/debugfs.h> #include <linux/mm.h> +#include <linux/kfence.h> #include <linux/kasan.h> #include <asm/ptdump.h> #include <asm/kasan.h> @@ -21,6 +22,8 @@ enum address_markers_idx { IDENTITY_BEFORE_END_NR, KERNEL_START_NR, KERNEL_END_NR, + KFENCE_START_NR, + KFENCE_END_NR, IDENTITY_AFTER_NR, IDENTITY_AFTER_END_NR, #ifdef CONFIG_KASAN @@ -40,6 +43,10 @@ static struct addr_marker address_markers[] = { [IDENTITY_BEFORE_END_NR] = {(unsigned long)_stext, "Identity Mapping End"}, [KERNEL_START_NR] = {(unsigned long)_stext, "Kernel Image Start"}, [KERNEL_END_NR] = {(unsigned long)_end, "Kernel Image End"}, +#ifdef CONFIG_KFENCE + [KFENCE_START_NR] = {0, "KFence Pool Start"}, + [KFENCE_END_NR] = {0, "KFence Pool End"}, +#endif [IDENTITY_AFTER_NR] = {(unsigned long)_end, "Identity Mapping Start"}, [IDENTITY_AFTER_END_NR] = {0, "Identity Mapping End"}, #ifdef CONFIG_KASAN @@ -248,6 +255,9 @@ static void sort_address_markers(void) static int pt_dump_init(void) { +#ifdef CONFIG_KFENCE + unsigned long kfence_start = (unsigned long)__kfence_pool; +#endif /* * Figure out the maximum virtual address being accessible with the * kernel ASCE. We need this to keep the page table walker functions @@ -262,6 +272,10 @@ static int pt_dump_init(void) address_markers[VMEMMAP_END_NR].start_address = (unsigned long)vmemmap + vmemmap_size; address_markers[VMALLOC_NR].start_address = VMALLOC_START; address_markers[VMALLOC_END_NR].start_address = VMALLOC_END; +#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 sort_address_markers(); #ifdef CONFIG_PTDUMP_DEBUGFS debugfs_create_file("kernel_page_tables", 0400, NULL, NULL, &ptdump_fops); -- 2.25.1
prev parent reply other threads:[~2021-07-28 19:03 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-28 19:02 [PATCH 0/4] s390: add kfence support Heiko Carstens 2021-07-28 19:02 ` [PATCH 1/4] s390/mm: implement set_memory_4k() Heiko Carstens 2021-07-28 19:02 ` [PATCH 2/4] kfence: add function to mask address bits Heiko Carstens 2021-07-28 19:28 ` Christian Borntraeger 2021-07-29 7:48 ` Marco Elver 2021-07-29 12:25 ` Heiko Carstens 2021-07-29 12:27 ` Marco Elver 2021-07-29 12:27 ` Marco Elver 2021-07-29 12:43 ` Alexander Potapenko 2021-07-29 12:43 ` Alexander Potapenko 2021-07-29 13:47 ` Sven Schnelle 2021-07-29 13:59 ` Alexander Potapenko 2021-07-29 13:59 ` Alexander Potapenko 2021-07-28 19:02 ` [PATCH 3/4] s390: add support for KFENCE Heiko Carstens 2021-07-28 19:02 ` Heiko Carstens [this message]
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=20210728190254.3921642-5-hca@linux.ibm.com \ --to=hca@linux.ibm.com \ --cc=borntraeger@de.ibm.com \ --cc=elver@google.com \ --cc=glider@google.com \ --cc=gor@linux.ibm.com \ --cc=kasan-dev@googlegroups.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=linux-s390@vger.kernel.org \ --cc=svens@linux.ibm.com \ --subject='Re: [PATCH 4/4] s390: add kfence region to pagetable dumper' \ /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
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.