Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1253527yba; Thu, 4 Apr 2019 07:15:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqw3uI3jBTXftGFSKRXwzYXt63dkMjr1THFFFIwxph8X/iruL+cLFViEtTIQhZLUYUvyTLYT X-Received: by 2002:a63:f24f:: with SMTP id d15mr6020669pgk.410.1554387302814; Thu, 04 Apr 2019 07:15:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554387302; cv=none; d=google.com; s=arc-20160816; b=HibHyVBnclz7JOWsK4l7CWwg2aEfIzJV+fdkGRGw8yzsSfD9gwYmR4hqAh2OQ6ZRTm Br5NmRzIeFMZfVpkeGyD67xxgZKgi0cnCKozuXLFZZB9q5iN5G+yryQ+ojUJrX66ct/M NnQzkfZfohEV9PSiQjxVbFkmveymfHzffMOlts+rCWcLnsChH+XYBSoKSHhLBpCBODM5 GFW32ydHe7SHFU7ukxvvIo+bU9uC0Dunqq9iC3NPPaA/RVb0Qhv6M9etaLg0BRluPY5w AFd5/oN9GbyGOFW6CA3muzZ7DDGhMYkzB1lG19vUMY1AJpaAyEun2QAWJuh3RTQTAr8p OiKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=MR6cJtjvpTxqxi2tU36+llPqobJAqvIV3eZhw1DiLb8=; b=FtIODkvTOH0rf5hqExDQQ+NdMSHlH/cfec50T2xdmrI4V1gd5/2N0CdHy/CTtwqCCL rkOr9RKtMBp6rWp0po7AlWLZleTrYmih8Pk7eILQjq3d+C26HZ9C1mChkQpZ5nemrsFa Kn+Kh5c+rn8/qp8go2hqkkA5R1YGe+XIFYz+XMdulhJ+tbI47dUEkaTBmSrLID4otMCX yqy9d4VGQMiy+lJKwQI0hE9OVTvyk5dkiN3N3IQBS84Z3lAB8zxp5xY5BCpk6hXXIb4A 8JkMBpEmkZeiPvmha1erXYUZZUe/YxZqbvAtlsdIPxtEhrp/DTbbmp7J7v1k4IMo+iU7 SCKA== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 143si8626696pga.118.2019.04.04.07.14.46; Thu, 04 Apr 2019 07:15:02 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728644AbfDDOMt (ORCPT + 99 others); Thu, 4 Apr 2019 10:12:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44501 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727191AbfDDOMt (ORCPT ); Thu, 4 Apr 2019 10:12:49 -0400 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 mx1.redhat.com (Postfix) with ESMTPS id 86389313F864; Thu, 4 Apr 2019 14:12:49 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-12-97.pek2.redhat.com [10.72.12.97]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1C95D19C69; Thu, 4 Apr 2019 14:12:45 +0000 (UTC) Date: Thu, 4 Apr 2019 22:12:41 +0800 From: Dave Young To: Borislav Petkov Cc: Junichi Nomura , "bhe@redhat.com" , "fanc.fnst@cn.fujitsu.com" , "x86@kernel.org" , "kexec@lists.infradead.org" , "kasong@redhat.com" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v3] x86/boot: Use efi_setup_data for searching RSDP on kexec-ed kernel Message-ID: <20190404141241.GB7789@dhcp-128-65.nay.redhat.com> References: <20190325231000.GA9184@jeru.linux.bs1.fc.nec.co.jp> <20190326135714.GG1867@zn.tnic> <20190327014852.GA3659@MiWiFi-R3L-srv> <73322ba9-e436-68db-7863-afd31607d969@ce.jp.nec.com> <20190328064343.GA1877@MiWiFi-R3L-srv> <20190328074337.GA9470@jeru.linux.bs1.fc.nec.co.jp> <20190328155256.GP22720@zn.tnic> <20190402102529.GA21698@jeru.linux.bs1.fc.nec.co.jp> <20190404073233.GC5708@dhcp-128-65.nay.redhat.com> <20190404122425.GC22539@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190404122425.GC22539@zn.tnic> User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Thu, 04 Apr 2019 14:12:49 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/04/19 at 02:24pm, Borislav Petkov wrote: > On Thu, Apr 04, 2019 at 03:32:33PM +0800, Dave Young wrote: > > BTW, it would be good to start a new thread when you send V4 :) > > Yes please. > > > > + /* Get systab from boot params. */ > > > + systab = (efi_system_table_64_t *) (ei->efi_systab | ((__u64)ei->efi_systab_hi << 32)); > > > + if (!systab) > > > + error("EFI system table not found in kexec boot_params."); > > > > Instead of hang the system, return 0 should be better > > Can the kexec kernel even function if we fail here? It only bootable when people provide acpi_rsdp via cmdline or boot_params. According to current code logic, cmdline/boot_param is handled first so kexec boot will not work in this case. The early code hang can make people confused, it is hard to say what happens and not easy to debug. But if we return 0 then kernel just continue to boot, and fail later because of no acpi root pointer, at least we can have some kernel boot log. Thanks Dave