Received: by 2002:a17:90a:c8b:0:0:0:0 with SMTP id v11csp2302620pja; Fri, 19 Apr 2019 11:36:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqxwScIINHZWLM5L6CITFowKUv5crmoQLxShcXzSE7Lvw4AxMxSblVsAk29kxRu181x2J/D0 X-Received: by 2002:aa7:8096:: with SMTP id v22mr5523613pff.94.1555698978448; Fri, 19 Apr 2019 11:36:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555698978; cv=none; d=google.com; s=arc-20160816; b=Jlm7y4+677xshqBIOHTrN55gtsVhOtN7TwgNvp4sCWZjmcSJ7A+Q0l0spLK0HCXqqf ZTlSvr8pVj3YIudTieVEr6PgPvpJS2BfKVrY9Y8QTq0FKcybmwsrdkMgeXHglnszD1bH jqBxvGFPKXMJ1hYZIo/wtrLM4YMUCFpapYv7GUJAHKSBvTm7zYZ8acFCA3L0uBL9ML2o i5jZwfacgPHOtrw9dDHXUiabJ1yU65lVMWWXUT0KbBd6KK6/M8BIM/YFOYVg++W6m1/n LG+TAk1lXIAxBuVUqHsLFY6hyz2f5dRUMCgESkxHbdvqFTEdeB/z9FY+4ToHIT6jtR3T h1UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=VbZ14AhUhV2CnGdz9eL+4RGhVN9ZX8J/raSb7y7Ie9Y=; b=HFgg+YBCP+4+9SXeFCo4rZscrdQueD7aGNSDv8TNXpTthTM3eVB84S4cuhfx1d9tRk PHyKbw9lGz9aLSWqF77x7n4tH4rdwrdB5A4YRMHlI6ESYMCWujX8gdwbhkGEM2hxhVYA Jv9UZFRJmmcT++4khMro+cHyDgANZ7FFsdmTo0HxCnf/wM23W7kEHhOeCGUByrQSRJjB lT99EkkOoGIzf4RO4+YCrDVehwyts+vCoD9tTi15fMHoC7vBRCpyUKI06QCifAhbztcK lK/XEMTTknxlFyAb/bxvOH/oQN/xUnH6pPyBj7fW/tva98sFMeHtbmdmp2zK8gL0BImo k5tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=RVgR1liM; 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 e89si6069203plb.99.2019.04.19.11.36.03; Fri, 19 Apr 2019 11:36:18 -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=RVgR1liM; 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 S1728189AbfDSSeb (ORCPT + 99 others); Fri, 19 Apr 2019 14:34:31 -0400 Received: from mail.skyhub.de ([5.9.137.197]:36386 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728202AbfDSSeC (ORCPT ); Fri, 19 Apr 2019 14:34:02 -0400 Received: from zn.tnic (p200300EC2F112E006C6C37C052F44BC9.dip0.t-ipconnect.de [IPv6:2003:ec:2f11:2e00:6c6c:37c0:52f4:4bc9]) (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 F3E511EC072C; Fri, 19 Apr 2019 12:17:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1555669059; 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:references; bh=VbZ14AhUhV2CnGdz9eL+4RGhVN9ZX8J/raSb7y7Ie9Y=; b=RVgR1liMHySIvBlvtqbqJNEX4qouxv5eValcXjObfXH9TAIyD0XXIGMIvzQgetLTDl1snL ne5etwT9pRGsQFWpS+KWx+VeaQQ4A2oDxLJirNbgcUwxyXvzTkU30N8C4NaNkFfSHkzdJE /cgOeKVK3KkWmcp0rLz4c/xEq1x8N5U= Date: Fri, 19 Apr 2019 12:17:33 +0200 From: Borislav Petkov To: Kairui Song , Thomas Gleixner Cc: linux-kernel@vger.kernel.org, Junichi Nomura , Dave Young , Chao Fan , Baoquan He , "x86@kernel.org" , "kexec@lists.infradead.org" Subject: Re: [RFC PATCH] kexec, x86/boot: map systab region in identity mapping before accessing it Message-ID: <20190419101733.GA10324@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam: Yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Breaking thread because this one got too big. On Fri, Apr 19, 2019 at 04:34:58PM +0800, Kairui Song wrote: > There are two approach to fix it, detect if the systab is mapped, and > avoid reading it if not. Ok, so tglx and I discussed this situation which is slowly getting out of hand with all the tinkering. So, here's what we should do - scream loudly now if some of this doesn't make any sense. 1. Junichi's patch should get the systab check above added and sent to 5.1 so that at least some EFI kexecing can work with 5.1 2. Then, the fact whether the kernel has been kexec'ed and which addresses it should use early, should all be passed through boot_params which is either setup by kexec(1) or by the first kernel itself, in the kexec_file_load() case. > the systab region is not mapped by the identity mapping provided by > kexec. 3. Then that needs to be fixed in the first kernel as it is a shortcoming of us starting to parse systab very early. It is the kexec setup code's problem not the early compressed stage's problem that the EFI systab is not mapped. Anything else I've forgotten? Anything I've misrepresented? Thx. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.