Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2804015ybb; Mon, 30 Mar 2020 13:17:45 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuVqf7yZOHAovVQaZEnEpVc/h59AY1M5pruTeTm1FOR99cy0Rvv/d4a3TdxOToky3ut8qwZ X-Received: by 2002:aca:5454:: with SMTP id i81mr821448oib.23.1585599465501; Mon, 30 Mar 2020 13:17:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585599465; cv=none; d=google.com; s=arc-20160816; b=pn6peB+1XsOEKV4dmzmPgZXThNYjGaK/MxZSRab945JZPdWmraLkTsZ8cL2VAEKuLC ZPJwpP1IhaDAPgRVYQFwTYQt0bEt7VTfbcHDngTKy2VO7NGnIGam2RA6tuOxwgcdMnoX jN5Srr9QP4ie4Tap2vDt8chZmXe6Y5q0KygVwTgN0vtQ0iIUpiE/upSV48ZFeoHcB0MO Eyaxkz7yTlAy/EeTCvTx2ti06vdHQlADkYS23GqUvgjlY/W5H7S3GQ9boxsT0OzCwY/O O2MssBYpc3Hosw1ovmENiB9TZIzFLlC87tuv+xfqvuHxOUeXJxmPm4KeHHHSaRV+/Q6W ZFAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:mime-version:user-agent :message-id:in-reply-to:date:references:cc:to:from; bh=cK0J63slA8ZXk79NkaizYgau8WWxGr0y658IZJ0r/Lc=; b=iOs4Lv1HqOddaY8ogaetPJ9lFY/jbVBeAKVwfj+opbXS0iO4BgQfKGfS3L7Jgpe69w v6XfCOdB0WD3Rjzt6nCkxcbwsPHwZv3Le+V0IpnjT9yvrz4KJz6LqjxrrZtpj9JNrkTC 3Q1hbII3gBcUsmE0WL0dHoIbIPhxAQVEsGgXQoJU4UHiIemHIW1Vg/VXCYdBna+T5OYi EDQyhml8lfqkXahkT1Dij0Yo5J+i02Y5nqWsb+OfiGg7GJTqnZWWlQW01jN5rzSsUvCK bGHrIaso+FHMbthuSkuz4RR+MIKy4l8N6hVRygIT+N1iJ2YcqGnQJbMqADMjocNzFc98 l3CQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xmission.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x13si6430769oto.105.2020.03.30.13.17.31; Mon, 30 Mar 2020 13:17:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xmission.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728376AbgC3UQ5 (ORCPT + 99 others); Mon, 30 Mar 2020 16:16:57 -0400 Received: from out02.mta.xmission.com ([166.70.13.232]:39820 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727936AbgC3UQ5 (ORCPT ); Mon, 30 Mar 2020 16:16:57 -0400 Received: from in02.mta.xmission.com ([166.70.13.52]) by out02.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jJ0pz-0001xk-8G; Mon, 30 Mar 2020 14:16:47 -0600 Received: from ip68-227-160-95.om.om.cox.net ([68.227.160.95] helo=x220.xmission.com) by in02.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.87) (envelope-from ) id 1jJ0py-0005pf-Ai; Mon, 30 Mar 2020 14:16:47 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Kairui Song Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Young , kexec@lists.infradead.org References: <20200330181544.1595733-1-kasong@redhat.com> Date: Mon, 30 Mar 2020 15:14:06 -0500 In-Reply-To: <20200330181544.1595733-1-kasong@redhat.com> (Kairui Song's message of "Tue, 31 Mar 2020 02:15:44 +0800") Message-ID: <87369py50x.fsf@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1jJ0py-0005pf-Ai;;;mid=<87369py50x.fsf@x220.int.ebiederm.org>;;;hst=in02.mta.xmission.com;;;ip=68.227.160.95;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX18POivBtpLy4qX5Ci7Y3ZVo2RKkhoDPLpY= X-SA-Exim-Connect-IP: 68.227.160.95 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on sa06.xmission.com X-Spam-Level: * X-Spam-Status: No, score=1.0 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,LotsOfNums_01,T_TM2_M_HEADER_IN_MSG autolearn=disabled version=3.4.2 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * 1.2 LotsOfNums_01 BODY: Lots of long strings of numbers * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa06 1397; Body=1 Fuz1=1 Fuz2=1] X-Spam-DCC: XMission; sa06 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: *;Kairui Song X-Spam-Relay-Country: X-Spam-Timing: total 497 ms - load_scoreonly_sql: 0.07 (0.0%), signal_user_changed: 11 (2.2%), b_tie_ro: 10 (1.9%), parse: 1.10 (0.2%), extract_message_metadata: 13 (2.6%), get_uri_detail_list: 2.5 (0.5%), tests_pri_-1000: 13 (2.7%), tests_pri_-950: 1.29 (0.3%), tests_pri_-900: 1.02 (0.2%), tests_pri_-90: 90 (18.2%), check_bayes: 89 (17.9%), b_tokenize: 8 (1.6%), b_tok_get_all: 25 (5.1%), b_comp_prob: 2.3 (0.5%), b_tok_touch_all: 50 (10.0%), b_finish: 0.95 (0.2%), tests_pri_0: 324 (65.3%), check_dkim_signature: 0.51 (0.1%), check_dkim_adsp: 2.5 (0.5%), poll_dns_idle: 0.79 (0.2%), tests_pri_10: 4.1 (0.8%), tests_pri_500: 34 (6.9%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH] crash_dump: remove saved_max_pfn X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Kairui Song writes: > This variable is no longer used. > > saved_max_pfn was originally introduce in commit 92aa63a5a1bf ("[PATCH] > kdump: Retrieve saved max pfn"), used to make sure that user does not > try to read the physical memory beyond saved_max_pfn. But since > commit 921d58c0e699 ("vmcore: remove saved_max_pfn check") > it's no longer used for the check. > > Only user left is Calary IOMMU, which start using it from > commit 95b68dec0d52 ("calgary iommu: use the first kernels TCE tables > in kdump"). But again, recently in commit 90dc392fc445 ("x86: Remove > the calgary IOMMU driver"), Calary IOMMU is removed and this variable > no longer have any user. > > So just remove it. > > Signed-off-by: Kairui Song Acked-by: "Eric W. Biederman" Can we merge this through the tip tree? > --- > arch/x86/kernel/e820.c | 8 -------- > include/linux/crash_dump.h | 2 -- > kernel/crash_dump.c | 6 ------ > 3 files changed, 16 deletions(-) > > diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c > index c5399e80c59c..4d13c57f370a 100644 > --- a/arch/x86/kernel/e820.c > +++ b/arch/x86/kernel/e820.c > @@ -910,14 +910,6 @@ static int __init parse_memmap_one(char *p) > return -EINVAL; > > if (!strncmp(p, "exactmap", 8)) { > -#ifdef CONFIG_CRASH_DUMP > - /* > - * If we are doing a crash dump, we still need to know > - * the real memory size before the original memory map is > - * reset. > - */ > - saved_max_pfn = e820__end_of_ram_pfn(); > -#endif > e820_table->nr_entries = 0; > userdef = 1; > return 0; > diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h > index 4664fc1871de..bc156285d097 100644 > --- a/include/linux/crash_dump.h > +++ b/include/linux/crash_dump.h > @@ -97,8 +97,6 @@ extern void unregister_oldmem_pfn_is_ram(void); > static inline bool is_kdump_kernel(void) { return 0; } > #endif /* CONFIG_CRASH_DUMP */ > > -extern unsigned long saved_max_pfn; > - > /* Device Dump information to be filled by drivers */ > struct vmcoredd_data { > char dump_name[VMCOREDD_MAX_NAME_BYTES]; /* Unique name of the dump */ > diff --git a/kernel/crash_dump.c b/kernel/crash_dump.c > index 9c23ae074b40..92da32275af5 100644 > --- a/kernel/crash_dump.c > +++ b/kernel/crash_dump.c > @@ -5,12 +5,6 @@ > #include > #include > > -/* > - * If we have booted due to a crash, max_pfn will be a very low value. We need > - * to know the amount of memory that the previous kernel used. > - */ > -unsigned long saved_max_pfn; > - > /* > * stores the physical address of elf header of crash image > *