Re: [PATCH v1 1/7] fs/proc/kcore: drop KCORE_REMAP and KCORE_OTHER

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

Reviewed-by: Mike Rapoport <rppt@xxxxxxxxxxxxx>

> ---
>  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.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux