From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-f44.google.com ([209.85.208.44]:38574 "EHLO mail-ed1-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726556AbeHXS3e (ORCPT ); Fri, 24 Aug 2018 14:29:34 -0400 Received: by mail-ed1-f44.google.com with SMTP id h33-v6so3436746edb.5 for ; Fri, 24 Aug 2018 07:54:33 -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: Sender: stable-owner@vger.kernel.org List-ID: 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.