From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5DD1DC433B4 for ; Sun, 2 May 2021 06:32:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3369E61462 for ; Sun, 2 May 2021 06:32:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230089AbhEBGc4 (ORCPT ); Sun, 2 May 2021 02:32:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:59766 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbhEBGcz (ORCPT ); Sun, 2 May 2021 02:32:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 99E0761057; Sun, 2 May 2021 06:31:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619937124; bh=qL1B1QT4PpYn1h9YGj03tGeQZLDs+ChkBvvTAwTmFBc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TgIeVS0ngZ+Uig3csISk5AB6RZ07CQ3YfksmsyKupiBZXIUwJYBS2eBdaRZvkSjcX WIrV6ut42Yj5gR1+UdA/NnKAE3yUqRPVma6wwzMelniHeh4csUjFXQ6lhjhT7meFTH 5fxUM4a+tXZJOChTH8nFx4i71BqQe0QG2ObXpWPiv2UJTXApHo3+1mgNmdgjv4PmMT Ayf+NSTkA8A5TXNOkfapVPaDtzUcXZXOngTVM9y9L6O/b6Ht5czAV7Dl5B0HQNJv/X yhXdpBxZ/QwOG42gYF63XGRRC72Ae1izFm1A5V6AJCFKr2w64Gfa7DPAjIUgwfPu1f x/30S+CYcAPbQ== Date: Sun, 2 May 2021 09:31:52 +0300 From: Mike Rapoport To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, Andrew Morton , "Michael S. Tsirkin" , Jason Wang , Alexey Dobriyan , "Matthew Wilcox (Oracle)" , Oscar Salvador , Michal Hocko , Roman Gushchin , Alex Shi , Steven Price , Mike Kravetz , Aili Yao , Jiri Bohac , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Naoya Horiguchi , linux-hyperv@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v1 1/7] fs/proc/kcore: drop KCORE_REMAP and KCORE_OTHER Message-ID: References: <20210429122519.15183-1-david@redhat.com> <20210429122519.15183-2-david@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210429122519.15183-2-david@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-hyperv@vger.kernel.org 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 Reviewed-by: Mike Rapoport > --- > 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.