From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753119AbbIYHZi (ORCPT ); Fri, 25 Sep 2015 03:25:38 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:35613 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752453AbbIYHZh (ORCPT ); Fri, 25 Sep 2015 03:25:37 -0400 Date: Fri, 25 Sep 2015 09:25:33 +0200 From: Ingo Molnar To: Kees Cook Cc: Stephen Smalley , "x86@kernel.org" , lkml Subject: Re: rwx mapping between ex_table and rodata Message-ID: <20150925072533.GA17731@gmail.com> References: <56045BC4.7000604@tycho.nsa.gov> <56045C8A.50102@tycho.nsa.gov> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 * Kees Cook wrote: > On Thu, Sep 24, 2015 at 1:26 PM, Stephen Smalley wrote: > > Hi, > > > > With the attached config and 4.3-rc2 on x86_64, I see the following in /sys/kernel/debug/kernel_page_tables: > > ... > > ---[ High Kernel Mapping ]--- > > 0xffffffff80000000-0xffffffff81000000 16M pmd > > 0xffffffff81000000-0xffffffff81600000 6M ro PSE GLB x pmd > > 0xffffffff81600000-0xffffffff81775000 1492K ro GLB x pte > > 0xffffffff81775000-0xffffffff81800000 556K RW GLB x pte > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Btw., I think we should run this lookup automatically in late bootup, if CONFIG_X86_PTDUMP=y, and print a WARN()ing if there's any RWX permissions in the mappings. That makes sure automated testing picks new bugs up. Thanks, Ingo