Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp436625yba; Fri, 12 Apr 2019 06:38:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqxu9/K1grNj5uCPx4XPn+pRfWwb9bMezUfQO77G5/LWNcwT4hQ8lNNKCLXzFfNECulPBeHZ X-Received: by 2002:a63:6a45:: with SMTP id f66mr51164889pgc.7.1555076279973; Fri, 12 Apr 2019 06:37:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555076279; cv=none; d=google.com; s=arc-20160816; b=W8JLc/R50Gf7rgIeVYObUqfrcj1I9V7h32npoQc612tQvBrOBHiy1Lad4Y5O+2MUt6 mfNEZRFcy5dmsXR0TQEuKDozy4/fpWWxZGM4rugpGQEoKd7x7uR+lHekiOSwzfD0oe26 dacf+AFeu5UYp+H/lof71Bx5fz1SrqsfqKEWTTUSvC0GPEpuuM7Mc4GXxr21Fmz/Odz8 q+3mLsnJ1I1tXp2SpvrIlPDfCPVcToJPlj8liSc3Ls/3hVM+383zKso7iPPZNpNY4B4B yTWm3p5qHH0AHb3psUU317AHFXxjQSSYSfCnxpcGRsu3fPA2S95JV/PxGtWnvuoqSJdq uSsA== 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:dkim-signature; bh=UPWzm4vt0PY0+c6ptfDK1JVk5pXwzJlg2U0OHKqmWuM=; b=Mxf5YQLkjbEgzaxCA8l3Nb7yBP7XQV+IXoXKu7ddVya2+/RsQm9uIa1FRjVfkYXi4L /3F2LID1kwOBNOxisT/ALSBmy5aY08pBD2N/Lhz1dj8m3jHHCMCYGovX5wuMpMN5auwU u6oGZEjVN8AoEYV7eUe+oBJBumcToN8wd7WNVDs4ILIDRNTeLMA8iR2DRT0USBhtH6pI v9FMT5bYfbwEK6zUMt81lR3BJ6jiOUDeokjnJdiGOFgjetCn1uFStnNoC1C3T1dW1WpL aspl/j81k3dKT3Ge1Te6xEuzzc8yKLU0lIwOzZxzq5j6dG35l4FTqDpZsx6JuiBREsIp v3zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=VLMZE5yI; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c17si29941616pls.23.2019.04.12.06.37.43; Fri, 12 Apr 2019 06:37:59 -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; dkim=pass header.i=@alien8.de header.s=dkim header.b=VLMZE5yI; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726951AbfDLNfh (ORCPT + 99 others); Fri, 12 Apr 2019 09:35:37 -0400 Received: from mail.skyhub.de ([5.9.137.197]:58026 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726765AbfDLNfh (ORCPT ); Fri, 12 Apr 2019 09:35:37 -0400 Received: from zn.tnic (p200300EC2F08840068A43035F0D96009.dip0.t-ipconnect.de [IPv6:2003:ec:2f08:8400:68a4:3035:f0d9:6009]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id A22581EC00FF; Fri, 12 Apr 2019 15:35:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1555076135; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=UPWzm4vt0PY0+c6ptfDK1JVk5pXwzJlg2U0OHKqmWuM=; b=VLMZE5yIeNBHSYJO5gtOS9RFE0nPnE/DxnEqxK4QL1cL/n30Mmy4QjFVOW8mvYBVD3fBip I7GycxOPpw2zTqEy5Z/Q8SqTq/2fp+58tKKkXVgj866G0jmydI5qCgpFFfdU9nCz91KHRb Tuc6kkH21HBgev+lEkrptFs/h9vFRJI= Date: Fri, 12 Apr 2019 15:35:29 +0200 From: Borislav Petkov To: Junichi Nomura Cc: Dave Young , Chao Fan , Baoquan He , Kairui Song , "x86@kernel.org" , "kexec@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v4] x86/boot: Use efi_setup_data for searching RSDP on kexec-ed kernel Message-ID: <20190412133528.GD19808@zn.tnic> References: <20190411080927.GA30080@zn.tnic> <20190411083738.GC30080@zn.tnic> <2946b5e3-90bf-d617-16a4-d2225b490b5d@ce.jp.nec.com> <20190411125822.GE30080@zn.tnic> <20190412025416.GA11070@jeru.linux.bs1.fc.nec.co.jp> <20190412084956.GC19808@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190412084956.GC19808@zn.tnic> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 12, 2019 at 10:49:56AM +0200, Borislav Petkov wrote: > Now I need to go figure out whether there's a reliable way to know in > the kexec kernel that it *is* a kexec kernel. Actually, thinking about this more, we don't need to know whether the kernel was kexeced or not. Why? Because if it is kexec'ed, kexec(1) passes the required info in setup_data. Now, if for whatever reason the kexec'ed kernel fails to parse that EFI info and get the systab to figure out the RDSP, then it doesn't have any other choice but fail booting. Because there's no way it can figure out where the EFI runtime has been mapped and recover by finding the RDSP from there. So I think we're perfectly fine with the old approach: if (!pa) pa = kexec_get_rsdp_addr(); if (!pa) pa = efi_get_rsdp_addr(); -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.