Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1351993pxy; Thu, 29 Apr 2021 05:26:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8YGnWZSyK1dORhBxMEUmsuDmTleMv4KcZCAGzaAOsK5O22sOaBlBvckDWzDMs+LqwcyrK X-Received: by 2002:a17:903:244:b029:ec:9666:9fc6 with SMTP id j4-20020a1709030244b02900ec96669fc6mr34993462plh.63.1619699215755; Thu, 29 Apr 2021 05:26:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619699215; cv=none; d=google.com; s=arc-20160816; b=GODggCZWogM6kDSlRblOYPrCVRCKip+aRezNZbSy59PNJTcNVYCd8C2j9LGykyeBun fztCxhE2Ve/EaQYjksuPwSlTvGaaYapY0O+YlnHQYdOhUr8+J/1ZHHHL8De15vT/des5 PUqcicooTPyS7hzzIs33pZskvDpUuf2gXkysqiNmNPw0ZPFeCValqnNynzqryFrvIfJM AIgVqKHaKxLYj0e1UmD9ls1ynTKRuHpCwWQRm/tdUPG5Y4SFLzxE/mjU9jzX/4QQ1p6C cYN8/8BDA9ihMTUIyI6Y2Dd8gYjCgTH1dURbWPYNUCqNOJt1KujKvjOVh6MtusJGVrBu C/gQ== 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=rz9iAnX3OWn2JDFVlZ3RHH7TNXHQH76pK/TxsFgUd8I=; b=cOMxcoylnOuOGLSq8AaSN3lkGf56Ijl/d60AjNAurJWOV9eol5PfFwa/6o761XZ48r NhQk5z3OPxj958sRfbxGzY49o+jMVOlnkiaK27hPLqg8XJEKKv6Zp1rlb4wBAucXyGyE ZUloSU3Ne7llJXgw78x+zmNGrpOW97PF7eBtgqIRQbvcO3i9vUNs21bqIDxiSwuz/B1e lZ71XCxUPnRACZNRwo0sVX0KDhH8gao3QMV3PTK7ENVuaJ4tJK4zceGZIV96SRytxvDZ 9hjk+zy9ixyEIxCkVzONkaoA9L/uiUU6ojwwzoZwevyTI2V3f0FuO9Y+MypajcjCVjC3 RGhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hiSafdX0; 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 o16si3152659pfu.239.2021.04.29.05.26.42; Thu, 29 Apr 2021 05:26:55 -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=hiSafdX0; 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 S236023AbhD2M01 (ORCPT + 99 others); Thu, 29 Apr 2021 08:26:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:45362 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236107AbhD2M0Z (ORCPT ); Thu, 29 Apr 2021 08:26:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619699138; 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=rz9iAnX3OWn2JDFVlZ3RHH7TNXHQH76pK/TxsFgUd8I=; b=hiSafdX0573MwQli02mJjnjRnwFevc5OTQqhLz4crMd+Ak5SPWwfN+gVJasSxdS+ZBWYIH sWQOKgG/fPjpa2O7IIAO47HpO+HoR03e9xiIrI5pbTTOLNhHEjbl/zQXSo2sgMAm9Fj1Ew rO0jZ+agpPq6RBDbfdg8RIx2mk1QaAQ= 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-481-cZMzDWWxMHqEdaZ8aCf0oQ-1; Thu, 29 Apr 2021 08:25:35 -0400 X-MC-Unique: cZMzDWWxMHqEdaZ8aCf0oQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 59999803622; Thu, 29 Apr 2021 12:25:32 +0000 (UTC) Received: from t480s.redhat.com (ovpn-114-50.ams2.redhat.com [10.36.114.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id DD6F118796; Thu, 29 Apr 2021 12:25:26 +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 Subject: [PATCH v1 1/7] fs/proc/kcore: drop KCORE_REMAP and KCORE_OTHER Date: Thu, 29 Apr 2021 14:25:13 +0200 Message-Id: <20210429122519.15183-2-david@redhat.com> In-Reply-To: <20210429122519.15183-1-david@redhat.com> References: <20210429122519.15183-1-david@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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. 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.30.2