Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2940202imm; Fri, 24 Aug 2018 07:56:35 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ9lsiYU+l3iFcLzd8KeHUT1YdwNlleYI4gOtDmCp43UpOKa+w2xXItzU9SZFCkb4YNsbzW X-Received: by 2002:a17:902:b111:: with SMTP id q17-v6mr2058369plr.284.1535122595936; Fri, 24 Aug 2018 07:56:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535122595; cv=none; d=google.com; s=arc-20160816; b=vQ+itFgSNJaDDdl6MjdbdOT5hamdIjzFumiUOen65fb2rpBTh6rJYyW4A0NnBeuAG7 /h0RNshZ7BpNSD3GJNCcxsiX02nlQLe+7cVmnI/VKh72t60ls16hfd5rK7D1Ghh9DoZo li5aLH5Fa6MaRB07tr6MznoJlDkkfbk3l16NuoxL8iM20cKBTzMXeeG7wMwGJ+MQACUa Pqdby9zernWMV2euWkifJoClCz1jsrB2sckqmFOXNoSYDkSN+CWfbD3t5JjsumgXplrl lVqULwFnLjlQI/Bh05LG/Xnajtj3m5mS7/qIu9sxpGltw8h66w1497PetRw0Nr5hh118 oxGQ== 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:arc-authentication-results; bh=OooKl+RZsjpCEQayk7Caf/YPdw/AgbEll1T9D+eWddU=; b=KT6do8fJTmlBOelZvkcOc8InVX6cUuLCYsaeZzTkXY31/s+48/2/1kfof1tRGFZZpR 0FG7buMWtO72BWOcZWnSIVylfOpel1eQxQ/2b87Yj3D1bLzUQBHeu4pryHdxjBGB0Q5j /r9jiaiESo++qWTXXMKgGOeOcOVmAhL1u2Hf3nicO0pC3zoIR3FbqIMWgbMMtU+JqlKr d/2MXRFnWtf2FBqvDwWx++EE5HFC2HqCurmM94kdHliVUM81z6DRZwmMFZCUjsgjK4Nw T48hx5Jopo+HrTmqZMcLtrzWpA4dke7OueiXmiYOeydKE/NDV9TWCoPUzVj4MsTcJbog o/cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeblueprint-co-uk.20150623.gappssmtp.com header.s=20150623 header.b=FOcIIFKT; 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 f127-v6si8066141pfb.290.2018.08.24.07.56.20; Fri, 24 Aug 2018 07:56:35 -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=@codeblueprint-co-uk.20150623.gappssmtp.com header.s=20150623 header.b=FOcIIFKT; 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 S1727514AbeHXS3e (ORCPT + 99 others); Fri, 24 Aug 2018 14:29:34 -0400 Received: from mail-ed1-f46.google.com ([209.85.208.46]:37392 "EHLO mail-ed1-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726360AbeHXS3e (ORCPT ); Fri, 24 Aug 2018 14:29:34 -0400 Received: by mail-ed1-f46.google.com with SMTP id b10-v6so6021490eds.4 for ; Fri, 24 Aug 2018 07:54:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeblueprint-co-uk.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=OooKl+RZsjpCEQayk7Caf/YPdw/AgbEll1T9D+eWddU=; b=FOcIIFKTc1Tg2m8kianP2DaMCJgU9mNUutt2YDvSYjBgIVBOGcsXqzOmdOVtebgqKm Muo7mh/XPxySTGTO8QEkKyWPiIhWYcemAy5uuMGuFoparucOIIr7W4CM42k6dge2K+C2 DfuM9GS2HKvW6owuiohpqYLCnwjHhSMrHfua5yuWYTdZl04R8tX4jQoxKZyO0iWjKBte DO6RxTx8XG1zuYkWYzqEr0RV0y55axG8cI0oo35er8t9XQJSRq8+/6mRR7+EjsS8Wz59 yrC4ZcTnEhgN7wTrlJ8ME5i03X70YNqLN33pw9/DGO0RKPGKrBEmQ4Rg9TLjlDzZwZB2 nl7w== 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=OooKl+RZsjpCEQayk7Caf/YPdw/AgbEll1T9D+eWddU=; b=mfpUcLWkcGq6tU5D2fsrlWxuOchSabN5BkMZwsk+FNjJX+CA3I+LRsV5VveGh5TZ0X EQ5q/0YTzJSNngwBbqHWx1rySE8o20vNJMYybeJduCbw9O8UE86K/PFM0IBf8dJBk+Nj xYU1I9rpE0GRJxeog9aR5hUOSEH0qZdsmr1HFFU8b24DaRkl/ARPl069FIs9Dh3o3r27 YdKfCiwT3BS3/M/KxXCeT7ceaT/0Gjam1hYNuteQh7Lv8xXobYndZbreblE0S0H/A199 2FIdUz+8y7YvMAielNbrlQC8US1JTDySToaUixcFIqPSxpNaws/pB8MN1AM0FBObdcYc xsEw== X-Gm-Message-State: APzg51ASnvHXqYr/8QPhLnfxUF4oTNtsN7pMQlq5UAyrylHDchLa/IFF Rn7cUR2ruHaL1JlfP2mw5KXoJA== X-Received: by 2002:a50:dd88:: with SMTP id w8-v6mr3225039edk.204.1535122473192; Fri, 24 Aug 2018 07:54:33 -0700 (PDT) Received: from localhost ([94.13.61.204]) by smtp.gmail.com with ESMTPSA id e15-v6sm2993060edb.60.2018.08.24.07.54.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Aug 2018 07:54:32 -0700 (PDT) Date: Fri, 24 Aug 2018 15:54:31 +0100 From: Matt Fleming To: Roland Dreier Cc: Greg Kroah-Hartman , ben.hutchings@codethink.co.uk, LKML , stable@vger.kernel.org, bp@suse.de, Andrew Morton , Andy Lutomirski , luto@kernel.org, ard.biesheuvel@linaro.org, bp@alien8.de, brgerst@gmail.com, davej@codemonkey.org.uk, dvlasenk@redhat.com, "H. Peter Anvin" , Linus Torvalds , Peter Zijlstra , sai.praneeth.prakhya@intel.com, sds@tycho.nsa.gov, Thomas Gleixner , toshi.kani@hp.com, linux-efi@vger.kernel.org, Ingo Molnar , Yazen.Ghannam@amd.com Subject: Re: [PATCH 4.4 103/105] Revert "x86/mm/pat: Ensure cpa->pfn only contains page frame numbers" Message-ID: <20180824145431.GC4253@codeblueprint.co.uk> References: <20171215092305.994559179@linuxfoundation.org> <20171215092311.347628971@linuxfoundation.org> <20180823061253.GA8803@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 23 Aug, at 09:37:28AM, Roland Dreier wrote: > > > This is bad enough that 4.4.148 and all newer 4.4.y crash early in > > > boot on some EFI systems that I have. > > > > Ugh, not good. > > > > > For now I am re-applying the "ensure cpa->pfn only contains page frame > > > numbers" patch, ported on top of 4.4.151. > > > > I can try to add it back and see what blows up, want me to attempt that? > > Not sure what to say... the current state is obviously broken. If you > look at what 02ff2769edbc is doing, it's clear that we're now shifting > cpa->pfn by PAGE_SHIFT where we weren't before, so we're putting bogus > values in the page table. And this is enough that my server system > booting with EFI crashes early in boot efi_enter_virtual_mode() with > the symptom that NX is improperly set on some pages (booting with > "noexec=off" fixes things, although obviously I don't want to run that > way). FWIW I can confirm that reverting the single patch 02ff2769edbc > fixes things, as does the cpa->pfn fix I mentioned above. > > It's hard for me to make a call on applying "ensure cpa->pfn only > contains page frame numbers" without knowing the problems it caused > before. The patch looks fine to me and I definitely need it, but > maybe it exposes some other bug elsewhere? Maybe Ben or Matt remember > more above why this was reverted in 4.4.106? Otherwise I'd say yeah, > we should re-apply it, since I don't think we want to revert > 02ff2769edbc. For the record, I wasn't even aware it had been reverted.