Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1703758pxy; Sat, 1 May 2021 23:37:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyECRzGs/LVlobIb5zB0Yo+gmQpj4UCDsRuvd0vSlJH7m0wBfC40UDFqNPMf802Nksfw3xI X-Received: by 2002:a50:c004:: with SMTP id r4mr13764899edb.192.1619937438173; Sat, 01 May 2021 23:37:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619937438; cv=none; d=google.com; s=arc-20160816; b=IrJoyDjrFDKoofy7Ffa/RxkckjK2VTMf5hhHYc33UYZLumGHUqaAVxsQANl+Vavrps iGTahlEGNBeMXCi4yivmv9gFWIVA09d+iI48RZQrFl4MyB/59/kOYOlo3JyReylih7Yc CZ8yFcBWooauvo6wrqdhXJVypujqdvBHEt0xIwa1uK7VR+Q+5sTa9bspI3feDxQAvlR3 pJGMRwBLuaOHbvukKORMG2zPTLuiILY1SiWv6L3t9+LbJyJQfslsv+5Wg72mjWbQsLlh Ui1v2guGUcZTmkWQz8l99CZXWovb3G7tAwaTccAn8NvDzkBQ2Pm/zYYTvbRf1wNAhogP 5fJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ptx+wjLO8JEcf5c0kGwqVKddBahxzE439XFmugYIF9Y=; b=qSchC5efpvy8LfVxzLAS/107MpBIutdV7XfND9ss+w8rvzncCpb9eyLqWHVr7jc9CF s6anY9e5tPULxjJyHf4FbMC96A87rWO1gX9XPeb02QkjDAM7miqI/Mo6agaz+JciaAsX Btw6jCpyp8ATfI8LNMiAbbHrIuVFBmv3aftIBW19iQ6YIl+prpoocKO1xjd/cg7bDmFi fG4rwctSpaHdqyDWauZwqCA4MVJqvuRPBEo4mPj0AhFDSEngn6xtAk2CeFkW2X+QaB9A ujDn8h2j1qbkuBGQJnpvMrQQPplOsk+YL9Op8Ahh2k4jg/LL1HpnZ4Y64/IlCtG73qUi zAFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TgIeVS0n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s4si6388092edr.432.2021.05.01.23.36.55; Sat, 01 May 2021 23:37:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TgIeVS0n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230151AbhEBGc4 (ORCPT + 99 others); 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-kernel@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.