Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp733977ybl; Fri, 30 Aug 2019 06:26:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqzcIg/BxvtXlrSJS9TIMq21P1dpW9cgOUZ1gMbNZ1FPpdkNibxvl8406itNq6dR89sllRNx X-Received: by 2002:a62:e50f:: with SMTP id n15mr15421630pff.208.1567171601310; Fri, 30 Aug 2019 06:26:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567171601; cv=none; d=google.com; s=arc-20160816; b=hDj9dqyFY8IQjER9FbuMMIXxl/r1pjOiPE3Nes/do5BBwZ+aRTQk8afpRgYl7A8rR/ kgQJjFD0AlShKw5uDtIVVUUYCTD+9tFngbhjVLm323XxzhXKdvqlLWe4J+rFG1ZYEHOe DqvASC4wM7UwIU09Jost/+B03mwKXAkth7r2tNgS2rjXpmdOhqeConLyrSTq4q8cqADf VVI/jVFCvLjbpbmqsWEH+MRjHioZY/v2NCgrWRZba+KvhKKXDUcKRISJAhOYqjXFm8qp FjwZnfjZ974yuDPNDc9y8dc3gnVvbVXQ2T0VPPzLK9sf99O+5pQD/0ietxFLYdffBHMh oiqA== 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=5Zj/8Y/Y7waYN+TCgDjpWoQ2JSAG8CGbnlMXmewzzjI=; b=f0lA2RbXQWYaLUlXQJZiJCbMQm5JNaL27UEkJXIFKQdqjeYzieJD1Bkwk2Hd41rhvx i0AI1ltggpzbgfTGTsbj7EOTb4WoYuUA8hiMGIc9gWE11FDZlNpDsbza5bCVl+pWPV+Z zp+59hH9/s7UFw5Pq54+mwdylptt8JZGqiW4xGymsKXZBqVuC7K+KSC4qoYa2GwMBMkZ q64Zmle/gcBx6OBkhNsmF+kLxSQGeWZ722AaZcuuiqVPjKqaact/p6Au18ARw5b2Rdzl vg+5WKtmofK1b+6CATO7WgDlfCADdjkYHi+BgG89u9lysEytrlMzsGPr00ZTlZL6948X W3Iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=mEdc7Dis; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 91si4737853pld.380.2019.08.30.06.26.25; Fri, 30 Aug 2019 06:26:41 -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=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=mEdc7Dis; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727945AbfH3NZM (ORCPT + 99 others); Fri, 30 Aug 2019 09:25:12 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:45476 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727135AbfH3NZL (ORCPT ); Fri, 30 Aug 2019 09:25:11 -0400 Received: by mail-ed1-f66.google.com with SMTP id x19so7941871eda.12 for ; Fri, 30 Aug 2019 06:25:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=5Zj/8Y/Y7waYN+TCgDjpWoQ2JSAG8CGbnlMXmewzzjI=; b=mEdc7Disgjzolfg3x9hn20PolxgZLBj70G4baazpIXB4ImfEgklyXg6dJB5u7NmmB5 Rcpm+OynmrhRpiFYRFCSadzfy0X3+A7fS/M7CpXhJI6NysbQgN4O95gTyCE2xPHhDaWc wHQHb1StRwZcSNJ7ci1RbV+f/ER5Q0CYw8LLO/QR9lAnxGmUYdKhlMQGl8dH5qsdTIWQ ot5QwdMa9ykqzcdx9pJTF+NMTk9mmwUwpwz+wX5LXe5SxzYCnnxyckT8M1OgXAPhVJJs nKv+gMmwVs1vPcmL+fe87UB72l2NEO43NJBKb7393jw42mfzLGtWeocVKNCHfmcUkvcm QNNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=5Zj/8Y/Y7waYN+TCgDjpWoQ2JSAG8CGbnlMXmewzzjI=; b=B4MZ7lVUMe8JLM3y96qekr8kXnue+HTIUax6zIh1934q2Nlw2mgjT8rmMjMEgaTwh7 CRW50/gj3yIUODxVM7XmSfsMix3lNx4qkfzrSfsUbkP9DiRmI6vXX8QvppWAEXU5aCin 4zlU6IQyfdVApjWqigbFTOf/nqotHnCnyf3LjUJ6rDfn1KNRCt619iwimY4ku86M3xR5 vFmrPqfgLRnusqywlbGFF+7k+cze2vDXRezDydsqd4eWJ502ZibARJFp17nH2v9pAy79 Ix1wE5QthgwcsEdoyaGpbMzRuhC48Wll8rhL3/Ij5bcqgpmJXtnJZApaBhG9lPWtJgIm 3ucw== X-Gm-Message-State: APjAAAUiDau945ZGj1XUj5cZFwbizklXRILA3aL60Ws1FEFyW/H1Zs0D Ny0WmLikidrG7Ejvx8bThtez0g== X-Received: by 2002:a05:6402:60d:: with SMTP id n13mr15479226edv.303.1567171510061; Fri, 30 Aug 2019 06:25:10 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id h11sm253745edq.74.2019.08.30.06.25.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Aug 2019 06:25:09 -0700 (PDT) Received: by box.localdomain (Postfix, from userid 1000) id 9EB841023D2; Fri, 30 Aug 2019 16:25:13 +0300 (+03) Date: Fri, 30 Aug 2019 16:25:13 +0300 From: "Kirill A. Shutemov" To: Sasha Levin Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, "Kirill A . Shutemov" , Borislav Petkov , "H. Peter Anvin" , Ingo Molnar , Thomas Gleixner , x86-ml Subject: Re: [PATCH AUTOSEL 5.2 51/76] x86/boot/compressed/64: Fix boot on machines with broken E820 table Message-ID: <20190830132513.emsgzw6nty2blfv5@box> References: <20190829181311.7562-1-sashal@kernel.org> <20190829181311.7562-51-sashal@kernel.org> <20190829221723.eicsws3q7gp6nx37@box> <20190830120638.GW5281@sasha-vm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190830120638.GW5281@sasha-vm> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 30, 2019 at 08:06:38AM -0400, Sasha Levin wrote: > On Fri, Aug 30, 2019 at 01:17:23AM +0300, Kirill A. Shutemov wrote: > > On Thu, Aug 29, 2019 at 02:12:46PM -0400, Sasha Levin wrote: > > > From: "Kirill A. Shutemov" > > > > > > [ Upstream commit 0a46fff2f9108c2c44218380a43a736cf4612541 ] > > > > > > BIOS on Samsung 500C Chromebook reports very rudimentary E820 table that > > > consists of 2 entries: > > > > > > BIOS-e820: [mem 0x0000000000000000-0x0000000000000fff] usable > > > BIOS-e820: [mem 0x00000000fffff000-0x00000000ffffffff] reserved > > > > > > It breaks logic in find_trampoline_placement(): bios_start lands on the > > > end of the first 4k page and trampoline start gets placed below 0. > > > > > > Detect underflow and don't touch bios_start for such cases. It makes > > > kernel ignore E820 table on machines that doesn't have two usable pages > > > below BIOS_START_MAX. > > > > > > Fixes: 1b3a62643660 ("x86/boot/compressed/64: Validate trampoline placement against E820") > > > Signed-off-by: Kirill A. Shutemov > > > Signed-off-by: Borislav Petkov > > > Cc: "H. Peter Anvin" > > > Cc: Ingo Molnar > > > Cc: Thomas Gleixner > > > Cc: x86-ml > > > Link: https://bugzilla.kernel.org/show_bug.cgi?id=203463 > > > Link: https://lkml.kernel.org/r/20190813131654.24378-1-kirill.shutemov@linux.intel.com > > > Signed-off-by: Sasha Levin > > > > Please postpone backporting the patch (and into other trees). There's a > > fixup for it: > > > > http://lore.kernel.org/r/20190826133326.7cxb4vbmiawffv2r@box > > Sure. Should I just queue it up for a week or two later (along with the > fixes), or do you want to let me know when? You can queue it up later (two weeks is fine) once the fixup hit Linus' tree. -- Kirill A. Shutemov