Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754425AbbKWOhV (ORCPT ); Mon, 23 Nov 2015 09:37:21 -0500 Received: from mail-wm0-f48.google.com ([74.125.82.48]:37355 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753451AbbKWOhS convert rfc822-to-8bit (ORCPT ); Mon, 23 Nov 2015 09:37:18 -0500 Date: Mon, 23 Nov 2015 16:37:14 +0200 From: Mihai =?UTF-8?B?RG9uyJt1?= To: Pavel Machek Cc: linux-kernel@vger.kernel.org, Kees Cook , Stephen Smalley Subject: Re: 4.4-rc0: 5 W+X pages found Message-ID: <20151123163714.00f06010@mdontu-l.dsd.bitdefender.biz> In-Reply-To: <20151115070022.GA15417@amd> References: <20151115070022.GA15417@amd> Organization: Home MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3718 Lines: 78 On Sun, 15 Nov 2015 08:00:22 +0100 Pavel Machek wrote: > Kernel complains: > > [ 5.256044] ------------[ cut here ]------------ > [ 5.259267] WARNING: CPU: 0 PID: 1 at > arch/x86/mm/dump_pagetables.c:225 note_page+0x5ec/0x790() > [ 5.262668] x86/mm: Found insecure W+X mapping at address > ffe69000/0xffe69000 > [ 5.267109] Modules linked in: > [ 5.271403] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.3.0+ #122 > [ 5.275679] Hardware name: LENOVO 17097HU/17097HU, BIOS 7BETD8WW > (2.19 ) 03/31/2011 > [ 5.279957] 00000000 00000000 f5cffeac c42b9f18 f5cffed8 f5cffec8 > c404062b 000000e1 > [ 5.284387] c403ca9c f5cfff50 00000163 00000000 f5cffee0 c4040686 > 00000009 f5cffed8 > [ 5.288815] c4d268ac f5cffef4 f5cfff1c c403ca9c c4d1f494 000000e1 > c4d268ac ffe69000 > [ 5.293314] Call Trace: > [ 5.297602] [] dump_stack+0x41/0x59 > [ 5.301864] [] warn_slowpath_common+0x6b/0xa0 > [ 5.306054] [] ? note_page+0x5ec/0x790 > [ 5.310209] [] warn_slowpath_fmt+0x26/0x30 > [ 5.314358] [] note_page+0x5ec/0x790 > [ 5.318440] [] ptdump_walk_pgd_level_core+0x14f/0x230 > [ 5.322578] [] ptdump_walk_pgd_level_checkwx+0x11/0x20 > [ 5.326632] [] mark_rodata_ro+0xcd/0xf0 > [ 5.330625] [] kernel_init+0x17/0xc0 > [ 5.334585] [] ret_from_kernel_thread+0x21/0x38 > [ 5.338585] [] ? rest_init+0xa0/0xa0 > [ 5.342583] ---[ end trace bc9ac0874ad9a058 ]--- > [ 5.346630] x86/mm: Checked W+X mappings: FAILED, 5 W+X pages > found. > > ...I'm not quite sure why it does backtrace, or how to debug this > one... That is a modest number. [ 2.493559] ------------[ cut here ]------------ [ 2.493563] WARNING: CPU: 2 PID: 1 at arch/x86/mm/dump_pagetables.c:225 note_page+0x5e1/0x780() [ 2.493565] x86/mm: Found insecure W+X mapping at address ffff88000009d000/0xffff88000009d000 [ 2.493565] Modules linked in: [ 2.493568] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.4.0-rc2 #2 [ 2.493569] Hardware name: Dell Inc. Latitude E7440/07F3F4, BIOS A15 05/19/2015 [ 2.493570] 0000000000000000 00000000c03551f4 ffff88040c7cbd48 ffffffffaa54851c [ 2.493572] ffff88040c7cbd90 ffff88040c7cbd80 ffffffffaa13a662 ffff88040c7cbe90 [ 2.493573] 8000000000000163 0000000000000004 0000000000000000 0000000000000000 [ 2.493575] Call Trace: [ 2.493579] [] dump_stack+0x4e/0x82 [ 2.493582] [] warn_slowpath_common+0x82/0xc0 [ 2.493583] [] warn_slowpath_fmt+0x5c/0x80 [ 2.493585] [] note_page+0x5e1/0x780 [ 2.493587] [] ptdump_walk_pgd_level_core+0x2c4/0x3f0 [ 2.493588] [] ptdump_walk_pgd_level_checkwx+0x17/0x20 [ 2.493591] [] mark_rodata_ro+0xef/0x100 [ 2.493594] [] ? rest_init+0x90/0x90 [ 2.493595] [] kernel_init+0x1d/0xe0 [ 2.493596] [] ret_from_fork+0x3f/0x70 [ 2.493598] [] ? rest_init+0x90/0x90 [ 2.493599] ---[ end trace e2aec56d15b94609 ]--- [ 2.498994] x86/mm: Checked W+X mappings: FAILED, 104640 W+X pages found. All the while I have: $ zgrep NX /proc/config.gz CONFIG_DEBUG_SET_MODULE_RONX=y I added to CC the people involved in pushing this feature to mainline, maybe they can point me to a possible cause. -- Mihai Donțu -- 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/