Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp870996pxj; Fri, 14 May 2021 19:15:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgTwS+gJD/+Am6rjClqk8/iZXAm7d1tnZERG282K3b76jfE66PfXtQrXpmrbzmwFr/PLAR X-Received: by 2002:a05:6402:5201:: with SMTP id s1mr21216318edd.86.1621044917548; Fri, 14 May 2021 19:15:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621044917; cv=none; d=google.com; s=arc-20160816; b=i2bGtaIKxM3AsCm1EU8XVvKOWlBwmEUQJew/PjqlGmuQECMr+ciFtfkZi8JfzXNgNS BOs1wMbgDeS25DmpbEyMJAnq76B8lVTzFdIMFGyU8xOnyPXV7K+f4kZ6cLkoAla5E1YO q1fcOMVARU5M0Efx4Kq1gU3dE7zwv9GjilJII6zKTB1U01RIP6yElweI3kXbgXkyYlZG FnsOFHBHlZNF5/wmF0H5g2uS0TZG8cZ56yGJGr16XCoeE4AVjVTy0cWASurn67ir9hMD yViPYtyp8dNmvGF0klIXrM9cz83+SVE05t86jq6RXx6vLw5Er7ybmpws8dsCI1ScCLEz 2y9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/osWbHv9H+D8jMkXYe0YG4c0I4+JjXX9FiaLxBUqIoc=; b=OwgNFXiBCaJQR9zpJyrRg3+cyMYQaf1moZATNB5eZmnK3A5PYRltgtIOqtj2wsfLwt JFS3vk33PaZdl0iuxWPubV7GttOoalh6qih++lPfWzOERC9PSHW/J0/KRPxs+UvTr2Qg qqT8F/wwaSJa42KCIqOqDGCOW4Fjs6vDdUv0akjiJgkAVYLk3+FMYnfor3e6ZJQGC8K0 HvZcaOcIT/TaKDtlXSrXR/hvzYqYXWz68hMvZAstxUsIPKT1eU2FKXoacLu9KYgkSXhl WlukbUeH5atDEjBfArGU9qp4FVo6sgiaa/UQ+PzAcWtCmKssj0F1DqNsKlgjrHXIj59S BdaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HZDVD7nL; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h21si7415642eje.504.2021.05.14.19.14.51; Fri, 14 May 2021 19:15:17 -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=@redhat.com header.s=mimecast20190719 header.b=HZDVD7nL; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235105AbhENRYb (ORCPT + 99 others); Fri, 14 May 2021 13:24:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:54173 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235100AbhENRY3 (ORCPT ); Fri, 14 May 2021 13:24:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621012997; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/osWbHv9H+D8jMkXYe0YG4c0I4+JjXX9FiaLxBUqIoc=; b=HZDVD7nLB5/IOXmmTLr71U5oa8afw64y9bLPwc11Qk02PCemuyKHTiqb62jJMB5ufP8aSc Ht8jWEWiry1apNf2DG6l4wUpTbAtC6euVkWpbH7cnovUx4gZxQtRHEaOsKZjkm8dUDfwVX mFwkCwzYUFgO3mmwPqime1uiL5fw87c= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-212-RRS-fpidOpKW1sq9Y9-_rQ-1; Fri, 14 May 2021 13:23:14 -0400 X-MC-Unique: RRS-fpidOpKW1sq9Y9-_rQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1D2E3107ACCA; Fri, 14 May 2021 17:23:11 +0000 (UTC) Received: from t480s.redhat.com (ovpn-114-113.ams2.redhat.com [10.36.114.113]) by smtp.corp.redhat.com (Postfix) with ESMTP id 367F519D9B; Fri, 14 May 2021 17:23:04 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: David Hildenbrand , Andrew Morton , "Michael S. Tsirkin" , Jason Wang , Alexey Dobriyan , Mike Rapoport , "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, Mike Rapoport Subject: [PATCH v2 1/6] fs/proc/kcore: drop KCORE_REMAP and KCORE_OTHER Date: Fri, 14 May 2021 19:22:42 +0200 Message-Id: <20210514172247.176750-2-david@redhat.com> In-Reply-To: <20210514172247.176750-1-david@redhat.com> References: <20210514172247.176750-1-david@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Reviewed-by: Mike Rapoport Signed-off-by: David Hildenbrand --- 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.31.1