Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753575AbbLNVCt (ORCPT ); Mon, 14 Dec 2015 16:02:49 -0500 Received: from mail-ob0-f174.google.com ([209.85.214.174]:34441 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753463AbbLNVCs (ORCPT ); Mon, 14 Dec 2015 16:02:48 -0500 MIME-Version: 1.0 In-Reply-To: <20151214202627.GA15104@amd> References: <20151115070022.GA15417@amd> <20151214080403.GA3708@amd> <20151214085803.GA10520@pd.tnic> <20151214090726.GA6472@amd> <20151214202627.GA15104@amd> From: Andy Lutomirski Date: Mon, 14 Dec 2015 13:02:27 -0800 Message-ID: Subject: Re: 4.4-rc5: ugly warn on: 5 W+X pages found To: Pavel Machek Cc: Linus Torvalds , Borislav Petkov , kernel list , Stephen Smalley , Arjan van de Ven , Brian Gerst , Denys Vlasenko , Peter Anvin , Mike Galbraith , Peter Zijlstra , Thomas Gleixner Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1796 Lines: 47 On Mon, Dec 14, 2015 at 12:26 PM, Pavel Machek wrote: > Hi! > >> > I know. But either someone cares, and it should be fixes, or noone >> > cares, and the check should be removed. >> >> Someone cares, and it should be scheduled to be fixed for 4.5. The EFI >> mapping changes that were required to avoid the warning were much too >> big and late to make 4.4. >> >> So for now, don't enable CONFIG_DEBUG_WX for now. Unless you want to >> actively debug the EFI mapping changes, that is. Which I heartily >> recommend people doing. > > Ok, good, except... This is thinkpad X60. Good old BIOS. It should > have no EFI. > > pavel@duo:~$ dmesg | grep EFI > pavel@duo:~$ > > From the messages I got: > >> [ 3.285993] x86/mm: Found insecure W+X mapping at address >> ffe69000/0xffe69000 > > ---[ Persisent kmap() Area ]--- > 0xffc00000-0xffd28000 1184K pte > 0xffd28000-0xffddd000 724K RW GLB NX pte > 0xffddd000-0xffe69000 560K pte > 0xffe69000-0xffe6e000 20K RW GLB x pte > 0xffe6e000-0xffe6f000 4K pte > ---[ Fixmap Area ]--- > > That is not EFI, right? That's weird. The only API to do that seems to be manually setting kmap_prot to _PAGE_KERNEL_EXEC, and nothing does that. (Why is kmap_prot a variable on x86 at all? It has exactly one writer, and that's the code that initializes it in the first place. Shouldn't we #define kmap_prot _PAGE_KERNEL? --Andy -- 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/