From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.skyhub.de ([2a01:4f8:190:11c2::b:1457]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEwLF-0006LJ-Rz for kexec@lists.infradead.org; Fri, 12 Apr 2019 13:35:45 +0000 Date: Fri, 12 Apr 2019 15:35:29 +0200 From: Borislav Petkov 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-Disposition: inline In-Reply-To: <20190412084956.GC19808@zn.tnic> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Junichi Nomura Cc: Chao Fan , Kairui Song , Baoquan He , "x86@kernel.org" , "kexec@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Dave Young 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. _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec