Received: by 2002:a17:90a:c8b:0:0:0:0 with SMTP id v11csp2303546pja; Fri, 19 Apr 2019 11:37:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqymc3IUtsIFIeSC+9lhCXEAu4d6MWKxAgYv/PrPNA1nja6cCLJerO6+UPOM1Fq5lij429yd X-Received: by 2002:a17:902:864b:: with SMTP id y11mr5038389plt.1.1555699045994; Fri, 19 Apr 2019 11:37:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555699045; cv=none; d=google.com; s=arc-20160816; b=YyNRUp9fnATKD33sUuiNsKvAj+CWGHDpAQWeozQzXz1HYLHqIfLUXWW/+lVmc0mnoR HUGu+mk9OrKYPbhb9MKoENjvyeCzuhrpCJzZOpJOqlvs7u/nc9+gMkjsDu+k0KmZal0B pY+i7WjgfTqnoHevcp5vDUWO2FUYAQurD72SCA4SuAAjlL2CKHyPyFV16/+a4GSvzSQ9 MaaKNTm8xuWSxbC0JpO86xaH0cig8A5sAcp/QKlvsv5IrAxdQapB8+7fSFXe7X1W6Bex nsuP+gskNxl3JjmafFiZZYonEiGJ4D7zwC1HdvRKcQZHfw3NRrf9WEVUxfTFAAcojxiF bX3A== 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=kt13yk+NKdfiWFO/sWb2l+mHuf8xiV4zJjS1XefOfVQ=; b=z7naQbTHNKEnn2kJ7+aUVORaITopenNdB3V1JnAfIKlxrOJuulpRb3EXd7TMeinenC 6/ZLrKKGbOz2sTsBM4y4Hp6/6FLY8bUzql8njUhHJV0LD3l4qXU02pLUJAZAFVBLq3al 4QKJiHXVPRxy3Z6/fnCKnNNlO8bVD6z2jyyDLBMCwYXByNveoc4NEIHMo0C6kjH24OCN kMtyzZL80f480G3xvPK5cA/0ZXRJqjRqca06f5hFGgQAhBQPZOpX21CpwUY2bOTjB+GI gtUuc9+kCRK8/+6YH5Nd/roxNUUhRVkfgL8asgsAq9GOQv+Q1zvHP/bnA9GenNI84nPc BaYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=qMcVltDQ; 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 z10si5369155pgi.233.2019.04.19.11.37.11; Fri, 19 Apr 2019 11:37:25 -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=qMcVltDQ; 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 S1727560AbfDSSeZ (ORCPT + 99 others); Fri, 19 Apr 2019 14:34:25 -0400 Received: from mail.skyhub.de ([5.9.137.197]:36384 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728284AbfDSSeC (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 E9FCE1EC04B9; Fri, 19 Apr 2019 13:28:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1555673287; 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=kt13yk+NKdfiWFO/sWb2l+mHuf8xiV4zJjS1XefOfVQ=; b=qMcVltDQi/FSqb+ryguk7TJsERARDdIDFiulUbh6pQb32vuPqpRuugzkLI6GyM0NE5UtQu SeeeTVQrXuGmXK2F1cIYWfLe6JtmVvnMlDxaezolqXujDh+orvkqzbbrY90H7Ak2gupCsG 7JkwyGXS5+Q55lTqU2D1i1AD27c7CRA= Date: Fri, 19 Apr 2019 13:28:01 +0200 From: Borislav Petkov To: Baoquan He Cc: Kairui Song , Thomas Gleixner , linux-kernel@vger.kernel.org, Junichi Nomura , Dave Young , Chao Fan , "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: <20190419112801.GB10324@zn.tnic> References: <20190419101733.GA10324@zn.tnic> <20190419105014.GE11060@MiWiFi-R3L-srv> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190419105014.GE11060@MiWiFi-R3L-srv> 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 19, 2019 at 06:50:14PM +0800, Baoquan He wrote: > Talked with Kairui privately just now. Seems Junichi's patch need add > this systab mapping. Since the systab region is not mapped on some > machines. Those machine don't have this issue because they got systab > region luckily coverred by 1 GB page mapping in 1st kernel before > kexec jumping. You don't have to repeat all I that - I know what the problem is. Read what I said again: it is too late for 5.1 to do any involved surgery. > > 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. > > Seems no better way to check if it's kexec-ed kernel, except of the > setup data checking of kexec-ed kernel. Why does that "seem" so? Read again what I said: "should all be passed through boot_params". Which means, boot_params should be extended with a field of a flag to say: "this is a kexec'ed kernel". If it "seems" then it should be made to not "seem" but to work properly. > Yeah, adding the systab mapping looks good. Kairui put it in > decompressing stage just because he wants to cover the case in which the > old kernel kexec jumping to 2nd kernel. Now it seems not very > reasonable, we also have the new kernel kexec jumping to old 2nd kernel. I don't think we can guarantee kexec between old<->new kernel to always work. Otherwise, we can forget all development and improvements of new kernel. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.