Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932229AbbKLSrn (ORCPT ); Thu, 12 Nov 2015 13:47:43 -0500 Received: from mail.skyhub.de ([78.46.96.112]:57788 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932077AbbKLSrk (ORCPT ); Thu, 12 Nov 2015 13:47:40 -0500 Date: Thu, 12 Nov 2015 19:47:37 +0100 From: Borislav Petkov To: Matt Fleming Cc: Ingo Molnar , Thomas Gleixner , "H . Peter Anvin" , Toshi Kani , linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, Sai Praneeth Prakhya , Dave Hansen Subject: Re: [PATCH 1/6] x86/mm/pageattr: Ensure cpa->pfn only contains page frame numbers Message-ID: <20151112184737.GJ3838@pd.tnic> References: <1447342823-3612-1-git-send-email-matt@codeblueprint.co.uk> <1447342823-3612-2-git-send-email-matt@codeblueprint.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1447342823-3612-2-git-send-email-matt@codeblueprint.co.uk> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1418 Lines: 35 On Thu, Nov 12, 2015 at 03:40:18PM +0000, Matt Fleming wrote: > The x86 pageattr code is confused about the data that is stored > cpa->pfn, sometimes it's treated as a page fram number and sometimes > it's treated as an unshifted physical address. > > The result of this is that the mapping functions do not map the > intended physical address. > > This isn't a problem in practice because most of the addresses we're > mapping in the EFI code paths are already mapped in 'trampoline_pgd' > and so the pageattr mappings functions don't actually do anything in > this case. But when we move to using a separate page table for the EFI > runtime this will be an issue. > > Cc: Borislav Petkov > Cc: Sai Praneeth Prakhya > Cc: Dave Hansen > Signed-off-by: Matt Fleming > --- > arch/x86/mm/pageattr.c | 12 ++++++------ > arch/x86/platform/efi/efi_64.c | 33 ++++++++++++++++++++++----------- > 2 files changed, 28 insertions(+), 17 deletions(-) Reviewed-by: Borislav Petkov -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/