Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1851838imm; Thu, 23 Aug 2018 09:47:33 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyXAmJaMkOatYVHsgSeGabQXUrLNRUOyRgLe9zVxUuhWozSajVSGTS1Uqb4L9hSRMCvpI2P X-Received: by 2002:a63:e45:: with SMTP id 5-v6mr23717991pgo.438.1535042853345; Thu, 23 Aug 2018 09:47:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535042853; cv=none; d=google.com; s=arc-20160816; b=wx58yMzbfcU00eLJao58T7NW/ZxWg/xvMqttjD/RDagyXVBIpP0D+Gm5DrG0qARg27 s/PC0MupMJ3JsOW8a5DnK2uHdZxBlsMHXq7PRN2ov0fL9pJpRcnOKi2t/BS7rDem0OqO Zb6Bhc1wMuMDzp6iUXxvz68F9GJxRJrRujNjm88XtbduebvGN1Ukpjxy9vRKJg5zxtKH zOw4VWyygCuR1LYLM9vnORo0WYm2KoZWfEdDRa/f6aDVLVQ4YVYwgH9XyamhdVrtdSPV ajnU65lEul3gTsJf/Y4YGQmIpM1LlD/LY/n8GEvEcntnB1JSg+KXF+fCHL2/TDiYynal 3UtA== 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:dkim-signature :arc-authentication-results; bh=LjaRiPtoYR1TUV2xS3nIQikfWGj8T6ZtGvRjPOVZdQc=; b=hEkkIasJgRZZt+IG4887FE9fhlt0vd/+mBaWBTB8N11zU4RhcjFcE55XfEXZv1wTLq PsWa88mv0XwjaPd39pmQyoXUK0hzfgJCgG4Iwrvqv6c7pRqJYvdrUKQh8ewV9iUrHWrQ Ghx8zkLFeq4nsP/sBl//f8RaX9szvHc+7A4LPnMOrrzVeRsg7Xn4vKmvh4ct/Jy7yqVE oHC/QnDeA9PUuibsixGv4TaHhph3RNrb1TW1IZ0+iOVfI70sjKjv8LklauYxIs6EVK7C 3n5Ih3DnC9Tet9ZXU3j1y4H7fidyJNUFtJu2IuOtuHqwMn09F0cKfRsdkF5MhWlIbpvD c8OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@purestorage.com header.s=google header.b=G+I98Tei; 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=REJECT sp=REJECT dis=NONE) header.from=purestorage.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 12-v6si4810580plb.203.2018.08.23.09.47.18; Thu, 23 Aug 2018 09:47:33 -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=@purestorage.com header.s=google header.b=G+I98Tei; 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=REJECT sp=REJECT dis=NONE) header.from=purestorage.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726330AbeHWUIQ (ORCPT + 99 others); Thu, 23 Aug 2018 16:08:16 -0400 Received: from mail-lf1-f43.google.com ([209.85.167.43]:42132 "EHLO mail-lf1-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726117AbeHWUIP (ORCPT ); Thu, 23 Aug 2018 16:08:15 -0400 Received: by mail-lf1-f43.google.com with SMTP id z11-v6so4531147lff.9 for ; Thu, 23 Aug 2018 09:37:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LjaRiPtoYR1TUV2xS3nIQikfWGj8T6ZtGvRjPOVZdQc=; b=G+I98TeiFo9+G+KTLzOEMEg0Bzku6CnZvhr+Q/7LXbEU7+FUXVbR+uMjBhSilGmdYl /TWPrjlUz9XmIdTR/xBVIs0CKHM9FLaOpW4Pan0BunubSahr8W89/65e9tIOEpdgxvVj 7xvYiLy+3E170Hfk7jdOmf8DefpMBOTgBQofU= 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=LjaRiPtoYR1TUV2xS3nIQikfWGj8T6ZtGvRjPOVZdQc=; b=c1gJV4KIttyzT1oZziG9BQoE5rZ0dC2p2zEA+gjh7a9wqEZDyQPMtLCrh6KOlNchRI UYQoFkTPSnlYN2cR8kDGuqw7D86DuntNEz3vQbpAdGxv43Ne7xsG/AkiLTwtiDNLm2UO tXZOpTY/MhfWvlJp/bZ2Oa2BBLn72ElhKbWxC4GahcPxJgmvbcsv0mCuXyPiOG7uDYL3 vaq8Ptsho1MAz3EHHwIv99gjHKLyESDE+N7sxmsnlk2zueIMyWbS4ApSx+rjabrq4EEW B0ZPzg1JZNnm0sYVjEJpXqRBZ5sXiIab0GppTd+AxVo+MKS8II3lylx+KlxKw/8dmkZ3 IxkQ== X-Gm-Message-State: AOUpUlGkD/zCJcHoTB7S6A0C847PML0WkJzr2LQCR95+KccgTrIG9e39 J/mACkOyVcTAnDU8RhLQNzTwTcnjna0jugVHdFYYUpfeBE8= X-Received: by 2002:a19:cb93:: with SMTP id b141-v6mr20136415lfg.119.1535042262779; Thu, 23 Aug 2018 09:37:42 -0700 (PDT) MIME-Version: 1.0 References: <20171215092305.994559179@linuxfoundation.org> <20171215092311.347628971@linuxfoundation.org> <20180823061253.GA8803@kroah.com> In-Reply-To: <20180823061253.GA8803@kroah.com> From: Roland Dreier Date: Thu, 23 Aug 2018 09:37:28 -0700 Message-ID: Subject: Re: [PATCH 4.4 103/105] Revert "x86/mm/pat: Ensure cpa->pfn only contains page frame numbers" To: Greg Kroah-Hartman , matt@codeblueprint.co.uk, ben.hutchings@codethink.co.uk Cc: 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 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 > > 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. - R.