From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932431AbdCVUsh (ORCPT ); Wed, 22 Mar 2017 16:48:37 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:49556 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932279AbdCVUs2 (ORCPT ); Wed, 22 Mar 2017 16:48:28 -0400 Date: Wed, 22 Mar 2017 21:48:19 +0100 From: Michael Holzheu To: Dave Young Cc: "Eric W. Biederman" , Baoquan He , Xunlei Pang , Atsushi Kumagai , Petr Tesarik , linux-kernel@vger.kernel.org, akpm@linux-foundation.org, kexec@lists.infradead.org, mahesh@linux.vnet.ibm.com, hbathini@linux.vnet.ibm.com Subject: Re: [PATCH v3 1/3] kexec: Move vmcoreinfo out of the kernel's .bss section In-Reply-To: <20170322043004.GB4424@dhcp-128-65.nay.redhat.com> References: <1489989033-1179-1-git-send-email-xlpang@redhat.com> <87pohbz4lo.fsf@xmission.com> <20170322025536.GA4424@dhcp-128-65.nay.redhat.com> <87pohaxam1.fsf@xmission.com> <20170322043004.GB4424@dhcp-128-65.nay.redhat.com> Organization: IBM X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17032220-0040-0000-0000-0000036C605B X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17032220-0041-0000-0000-00001F6178EB Message-Id: <20170322214819.0b64d49c@TP-holzheu> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-22_17:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703220178 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Wed, 22 Mar 2017 12:30:04 +0800 schrieb Dave Young : > On 03/21/17 at 10:18pm, Eric W. Biederman wrote: > > Dave Young writes: > > [snip] > > > I think makedumpfile is using it, but I also vote to remove the > > > CRASHTIME. It is better not to do this while crashing and a makedumpfile > > > userspace patch is needed to drop the use of it. > > > > > >> > > >> As we are looking at reliability concerns removing CRASHTIME should make > > >> everything in vmcoreinfo a boot time constant. Which should simplify > > >> everything considerably. > > > > > > It is a nice improvement.. > > > > We also need to take a close look at what s390 is doing with vmcoreinfo. > > As apparently it is reading it in a different kind of crashdump process. > > Yes, need careful review from s390 and maybe ppc64 especially about > patch 2/3, better to have comments from IBM about s390 dump tool and ppc > fadump. Added more cc. On s390 we have at least an issue with patch 1/3. For stand-alone dump and also because we create the ELF header for kdump in the new kernel we save the pointer to the vmcoreinfo note in the old kernel on a defined memory address in our absolute zero lowcore. This is done in arch/s390/kernel/setup.c: static void __init setup_vmcoreinfo(void) { mem_assign_absolute(S390_lowcore.vmcore_info, paddr_vmcoreinfo_note()); } Since with patch 1/3 paddr_vmcoreinfo_note() returns NULL at this point in time we have a problem here. To solve this - I think - we could move the initialization to arch/s390/kernel/machine_kexec.c: void arch_crash_save_vmcoreinfo(void) { VMCOREINFO_SYMBOL(lowcore_ptr); VMCOREINFO_SYMBOL(high_memory); VMCOREINFO_LENGTH(lowcore_ptr, NR_CPUS); mem_assign_absolute(S390_lowcore.vmcore_info, paddr_vmcoreinfo_note()); } Probably related to this is my observation that patch 3/3 leads to an empty VMCOREINFO note for kdump on s390. The note is there ... # readelf -n /var/crash/127.0.0.1-2017-03-22-21:14:39/vmcore | grep VMCORE VMCOREINFO 0x0000068e Unknown note type: (0x00000000) But it contains only zeros. Unfortunately I have not yet understood the reason for this. Michael