From mboxrd@z Thu Jan 1 00:00:00 1970 From: Borislav Petkov Subject: Re: [PATCH v4 05/29] x86/mm: Remove kernel_unmap_pages_in_pgd() and efi_cleanup_page_tables() Date: Mon, 27 Jun 2016 09:19:10 +0200 Message-ID: References: Reply-To: kernel-hardening@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: List-Post: List-Help: List-Unsubscribe: List-Subscribe: In-Reply-To: To: Andy Lutomirski , x86@kernel.org Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Nadav Amit , Kees Cook , Brian Gerst , "kernel-hardening@lists.openwall.com" , Linus Torvalds , Josh Poimboeuf , Jann Horn , Heiko Carstens , Matt Fleming , linux-efi@vger.kernel.org List-Id: linux-arch.vger.kernel.org Andy Lutomirski wrote: >kernel_unmap_pages_in_pgd() is dangerous: if a pgd entry in >init_mm.pgd were to be cleared, callers would need to ensure that >the pgd entry hadn't been propagated to any other pgd. > >Its only caller was efi_cleanup_page_tables(), and that, in turn, >was unused, so just delete both functions. This leaves a couple of >other helpers unused, so delete them, too. > >Cc: Matt Fleming >Cc: linux-efi@vger.kernel.org >Reviewed-by: Matt Fleming >Signed-off-by: Andy Lutomirski >--- > arch/x86/include/asm/efi.h | 1 - > arch/x86/include/asm/pgtable_types.h | 2 -- > arch/x86/mm/pageattr.c | 28 ---------------------------- > arch/x86/platform/efi/efi.c | 2 -- > arch/x86/platform/efi/efi_32.c | 3 --- > arch/x86/platform/efi/efi_64.c | 5 ----- > 6 files changed, 41 deletions(-) Acked-by: Borislav Petkov -- Sent from a small device: formatting sucks and brevity is inevitable. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.skyhub.de ([78.46.96.112]:36774 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751721AbcF0HT0 (ORCPT ); Mon, 27 Jun 2016 03:19:26 -0400 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH v4 05/29] x86/mm: Remove kernel_unmap_pages_in_pgd() and efi_cleanup_page_tables() From: Borislav Petkov Date: Mon, 27 Jun 2016 09:19:10 +0200 Message-ID: Sender: linux-arch-owner@vger.kernel.org List-ID: To: Andy Lutomirski , x86@kernel.org Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Nadav Amit , Kees Cook , Brian Gerst , "kernel-hardening@lists.openwall.com" , Linus Torvalds , Josh Poimboeuf , Jann Horn , Heiko Carstens , Matt Fleming , linux-efi@vger.kernel.org Message-ID: <20160627071910.mEEy_KtGep4FmFNf-I-iFXDazvah-Xruhy_PcciFcY8@z> Andy Lutomirski wrote: >kernel_unmap_pages_in_pgd() is dangerous: if a pgd entry in >init_mm.pgd were to be cleared, callers would need to ensure that >the pgd entry hadn't been propagated to any other pgd. > >Its only caller was efi_cleanup_page_tables(), and that, in turn, >was unused, so just delete both functions. This leaves a couple of >other helpers unused, so delete them, too. > >Cc: Matt Fleming >Cc: linux-efi@vger.kernel.org >Reviewed-by: Matt Fleming >Signed-off-by: Andy Lutomirski >--- > arch/x86/include/asm/efi.h | 1 - > arch/x86/include/asm/pgtable_types.h | 2 -- > arch/x86/mm/pageattr.c | 28 ---------------------------- > arch/x86/platform/efi/efi.c | 2 -- > arch/x86/platform/efi/efi_32.c | 3 --- > arch/x86/platform/efi/efi_64.c | 5 ----- > 6 files changed, 41 deletions(-) Acked-by: Borislav Petkov -- Sent from a small device: formatting sucks and brevity is inevitable.