Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3829288yba; Tue, 23 Apr 2019 10:17:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwySdgW5o9u+xhExIrOHo0n0RQLA7vk1hrrU+pF4bmjOfJ0FRFwmwFk29IbD0/NqtGzwfqP X-Received: by 2002:a17:902:4165:: with SMTP id e92mr27667480pld.10.1556039834278; Tue, 23 Apr 2019 10:17:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556039834; cv=none; d=google.com; s=arc-20160816; b=KJFMQDm85mwv/c7rqtvg4jVm0S53pw771utqsNdl8RyeA+npsNFRbJEDtuI32Za6tZ 3IsEATBAwWHgkiyZBG4ZTtoyls2AAtB0SsJVr5Pq+B7SfbgNqTENXEN+lpPCYjiITWj+ +98IghkclEHQhQb85X70iVVWI4lvILfSqLLJVym2LD0TmU1Nl4a2FCnr18Q7RFY8UeEd ZfaGvNZgFK58avcG8ZdS8YyEQ//V75kyY7orB32xif1ee1ppLsYtZhB1Owz3HfM/2dFj c8eS4k4tL3xfvy5Eignp6i0nYj9ccBrOc6epALhKblNqwPiG3rBrv3IWjpsrCV1Ga14S 8yaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=go/WpspTufvCzyVRSJz1x1OJRk17MOMRcR7MhLrkz+g=; b=ZIDlfuZYzktEHTM/TlAAZZwWct+cKONGBWrbdQzoBG7qm6uer+rq0CJdwa7biV40LX M+/nOF9m94SZ0hj5UHQ4idxMKBRIliZlIJhfvkY116SIfEngewNx/C9NjDykMO9jeMaO HIvbBTVlA5SvqlyIClINW2mHQfu8I9H5CyWPwu48o7hyQtDK0gDJmC88YGyTj+UynWjd CoZxSJdT7clQu5BwFgZLjsVlJNfGx0qTaxgYOyfqZ/B0CCLJLVgF8k92xC8Af3/FOObs ZINuWJq2sTxK5R4xgJ9GFKAZKWBGUDYwMF9II9aROWJZ2660ZJwPGUxGZ2NwiM05NYq4 lRBg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a23si16052528pls.188.2019.04.23.10.16.57; Tue, 23 Apr 2019 10:17:14 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729372AbfDWRPV (ORCPT + 99 others); Tue, 23 Apr 2019 13:15:21 -0400 Received: from mail-it1-f194.google.com ([209.85.166.194]:55790 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727656AbfDWRPV (ORCPT ); Tue, 23 Apr 2019 13:15:21 -0400 Received: by mail-it1-f194.google.com with SMTP id y134so1420104itc.5 for ; Tue, 23 Apr 2019 10:15:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=go/WpspTufvCzyVRSJz1x1OJRk17MOMRcR7MhLrkz+g=; b=AYE+289seI14avU0cBWJRmyKmn8/LqOffw/3Dvueqo9CrcYl+t30Y4KRP65g5fd6xJ +HC+13lukkkAn64iKBJEK58nM1WMv2z3TDVDcapWhcYPZa/ZYifmW+9ux19014En68nP UW1G0Sk44yVZzZCKCkzh9Yq9qCFgWU3VzyT7Hr7R7li+JMZyZp7jdnMhCxKRjO6NVF91 OrKmDHfM1QXwD1F/myrcNRReREVNTDwiDSLAn3ib0BKDqag2/kDwn5jUlUrHnlr5rNcA ujss7UUWNZbQE+hOFwd5kT4BWXl2lWXKd7ejLQVDbVB7qICm+J4QuBsQg/LpwAn4Xr2x g1Lw== X-Gm-Message-State: APjAAAXQ3iQMNLW+A40cDgJHV8isOAVr6iNbE5d7u3ULczDXHl8/VLo/ 3qU5t2uuMJDYoJuKbjvWUpsVwRPjququO1y9GSXlhw== X-Received: by 2002:a02:ba94:: with SMTP id g20mr12015282jao.51.1556039720616; Tue, 23 Apr 2019 10:15:20 -0700 (PDT) MIME-Version: 1.0 References: <20190422092804.15534-1-kasong@redhat.com> <965f770a-b103-72fb-eaef-cb337ebe8290@ce.jp.nec.com> In-Reply-To: <965f770a-b103-72fb-eaef-cb337ebe8290@ce.jp.nec.com> From: Kairui Song Date: Tue, 23 Apr 2019 10:15:09 -0700 Message-ID: Subject: Re: [PATCH] x86/kexec: always ensure EFI systab region is mapped To: Junichi Nomura Cc: "linux-kernel@vger.kernel.org" , Borislav Petkov , Thomas Gleixner , Chao Fan , Baoquan He , Dave Young , "x86@kernel.org" , "kexec@lists.infradead.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 22, 2019 at 11:21 PM Junichi Nomura wrote: > > On 4/22/19 6:28 PM, Kairui Song wrote: > > The reason is the systab region is not mapped by the identity mapping > > provided by kexec. Currently kexec only create identity mapping for > > mem regions, wihch won't cover the systab. So second kernel will be > > accessing a not mapped memory region and cause fault. > > But as kexec tend to pad the map region up to PUD size, the > > systab could be included in the map by accident, so it worked on > > some machines, but that will be broken easily and unstable. > > Is the mapping of ACPI tables just by luck, too? > Good question, they should have same issue with systab, I ignored this one. Then in first kernel when doing kexec it should ensure both ACPI tables and the EFI systab are mapped, that should cover everything and make it work. Is there anything else missing? -- Best Regards, Kairui Song