From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754852AbbI1VQS (ORCPT ); Mon, 28 Sep 2015 17:16:18 -0400 Received: from terminus.zytor.com ([198.137.202.10]:58059 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754440AbbI1VQQ (ORCPT ); Mon, 28 Sep 2015 17:16:16 -0400 Subject: Re: rwx mapping between ex_table and rodata To: Ingo Molnar , Kees Cook References: <56045BC4.7000604@tycho.nsa.gov> <56045C8A.50102@tycho.nsa.gov> <20150925072259.GA17639@gmail.com> Cc: Stephen Smalley , "x86@kernel.org" , lkml From: "H. Peter Anvin" Message-ID: <5609AE16.2070204@zytor.com> Date: Mon, 28 Sep 2015 14:16:06 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150925072259.GA17639@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/25/2015 12:22 AM, Ingo Molnar wrote: >> >> To me it looks like another alignment/padding issue like got fixed >> before. The space between __ex_table and rodata is (seems?) unused, so >> the default page table permissions end up being W+X. Can we fix the >> default to be NX instead? It'll make these bugs stay gone. > > Yeah. Wanna send a patch for that? > At least in the high mapping space, the default should be no permissions (not present), rather than just NX. -hpa