From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90944C4360F for ; Thu, 4 Apr 2019 14:12:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 67A8C20882 for ; Thu, 4 Apr 2019 14:12:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728699AbfDDOMu (ORCPT ); Thu, 4 Apr 2019 10:12:50 -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