From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756288AbcBVXVq (ORCPT ); Mon, 22 Feb 2016 18:21:46 -0500 Received: from r00tworld.com ([212.85.137.150]:48826 "EHLO r00tworld.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755864AbcBVXVo (ORCPT ); Mon, 22 Feb 2016 18:21:44 -0500 From: "PaX Team" To: Kees Cook Date: Tue, 23 Feb 2016 00:21:18 +0100 MIME-Version: 1.0 Subject: Re: [PATCH] lkdtm: add test for executing .rodata Reply-to: pageexec@freemail.hu CC: Ard Biesheuvel , Laura Abbott , Greg Kroah-Hartman , Mark Rutland , Jeremy Linton , Arnd Bergmann , "kernel-hardening@lists.openwall.com" , LKML Message-ID: <56CB97EE.29381.17824260@pageexec.freemail.hu> In-reply-to: References: <20160216214904.GA23723@www.outflux.net>, <56C63747.819.280B3F5@pageexec.freemail.hu>, X-mailer: Pegasus Mail for Windows (4.71.565) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.12 (r00tworld.com [212.85.137.150]); Tue, 23 Feb 2016 00:21:15 +0100 (CET) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22 Feb 2016 at 12:46, Kees Cook wrote: > GCC really wants to declare the section. :( hmm, i see, so how about going about it another way. instead of trying to do this at compile/link time, do it an load/runtime. one way of doing it would be to preserve a page in .rodata then map in a code page underneath that holds your empty function (which you can generate from C). it'd be somewhat similar to how the vsyscall page on amd64 is mapped (or used to be mapped) from the kernel image into its userland visible place.