[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YI5HWCDgHJzb4nkt@kernel.org>
Date: Sun, 2 May 2021 09:31:52 +0300
From: Mike Rapoport <rppt@...nel.org>
To: David Hildenbrand <david@...hat.com>
Cc: linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
"Michael S. Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
Alexey Dobriyan <adobriyan@...il.com>,
"Matthew Wilcox (Oracle)" <willy@...radead.org>,
Oscar Salvador <osalvador@...e.de>,
Michal Hocko <mhocko@...e.com>, Roman Gushchin <guro@...com>,
Alex Shi <alex.shi@...ux.alibaba.com>,
Steven Price <steven.price@....com>,
Mike Kravetz <mike.kravetz@...cle.com>,
Aili Yao <yaoaili@...gsoft.com>, Jiri Bohac <jbohac@...e.cz>,
"K. Y. Srinivasan" <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
Wei Liu <wei.liu@...nel.org>,
Naoya Horiguchi <naoya.horiguchi@....com>,
linux-hyperv@...r.kernel.org,
virtualization@...ts.linux-foundation.org,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH v1 1/7] fs/proc/kcore: drop KCORE_REMAP and KCORE_OTHER
On Thu, Apr 29, 2021 at 02:25:13PM +0200, David Hildenbrand wrote:
> Commit db779ef67ffe ("proc/kcore: Remove unused kclist_add_remap()")
> removed the last user of KCORE_REMAP.
>
> Commit 595dd46ebfc1 ("vfs/proc/kcore, x86/mm/kcore: Fix SMAP fault when
> dumping vsyscall user page") removed the last user of KCORE_OTHER.
>
> Let's drop both types. While at it, also drop vaddr in "struct
> kcore_list", used by KCORE_REMAP only.
>
> Signed-off-by: David Hildenbrand <david@...hat.com>
Reviewed-by: Mike Rapoport <rppt@...ux.ibm.com>
> ---
> fs/proc/kcore.c | 7 ++-----
> include/linux/kcore.h | 3 ---
> 2 files changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
> index 4d2e64e9016c..09f77d3c6e15 100644
> --- a/fs/proc/kcore.c
> +++ b/fs/proc/kcore.c
> @@ -380,11 +380,8 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos)
> phdr->p_type = PT_LOAD;
> phdr->p_flags = PF_R | PF_W | PF_X;
> phdr->p_offset = kc_vaddr_to_offset(m->addr) + data_offset;
> - if (m->type == KCORE_REMAP)
> - phdr->p_vaddr = (size_t)m->vaddr;
> - else
> - phdr->p_vaddr = (size_t)m->addr;
> - if (m->type == KCORE_RAM || m->type == KCORE_REMAP)
> + phdr->p_vaddr = (size_t)m->addr;
> + if (m->type == KCORE_RAM)
> phdr->p_paddr = __pa(m->addr);
> else if (m->type == KCORE_TEXT)
> phdr->p_paddr = __pa_symbol(m->addr);
> diff --git a/include/linux/kcore.h b/include/linux/kcore.h
> index da676cdbd727..86c0f1d18998 100644
> --- a/include/linux/kcore.h
> +++ b/include/linux/kcore.h
> @@ -11,14 +11,11 @@ enum kcore_type {
> KCORE_RAM,
> KCORE_VMEMMAP,
> KCORE_USER,
> - KCORE_OTHER,
> - KCORE_REMAP,
> };
>
> struct kcore_list {
> struct list_head list;
> unsigned long addr;
> - unsigned long vaddr;
> size_t size;
> int type;
> };
> --
> 2.30.2
>
--
Sincerely yours,
Mike.
Powered by blists - more mailing lists