From mboxrd@z Thu Jan 1 00:00:00 1970 From: Clemens Ladisch Subject: Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory Date: Wed, 25 Nov 2015 11:06:30 +0100 Message-ID: <56558826.1060202@ladisch.de> References: <1448401114-24650-1-git-send-email-keescook@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Mathias Krause , kernel-hardening@lists.openwall.com Cc: "linux-kernel@vger.kernel.org" , Kees Cook , Andy Lutomirski , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , x86-ml , Arnd Bergmann , Michael Ellerman , linux-arch@vger.kernel.org, PaX Team , Emese Revfy List-Id: linux-arch.vger.kernel.org Mathias Krause wrote: > [...] > So, prior extending the usage of the __read_only annotation some > toolchain support is needed. Maybe a gcc plugin that'll warn/error on > code that writes to such a variable but is not __init itself. Or mark them as "const". This would require the initialization code to cast it away, probably with a helper macro. Regards, Clemens From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtprelay01.ispgateway.de ([80.67.31.24]:53805 "EHLO smtprelay01.ispgateway.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752179AbbKYKMM (ORCPT ); Wed, 25 Nov 2015 05:12:12 -0500 Subject: Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory References: <1448401114-24650-1-git-send-email-keescook@chromium.org> From: Clemens Ladisch Message-ID: <56558826.1060202@ladisch.de> Date: Wed, 25 Nov 2015 11:06:30 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Mathias Krause , kernel-hardening@lists.openwall.com Cc: "linux-kernel@vger.kernel.org" , Kees Cook , Andy Lutomirski , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , x86-ml , Arnd Bergmann , Michael Ellerman , linux-arch@vger.kernel.org, PaX Team , Emese Revfy Message-ID: <20151125100630.3TDsq2FTo9f0r9NfNuyzQyeIYlPabkU_zbgJ0ebTBrE@z> Mathias Krause wrote: > [...] > So, prior extending the usage of the __read_only annotation some > toolchain support is needed. Maybe a gcc plugin that'll warn/error on > code that writes to such a variable but is not __init itself. Or mark them as "const". This would require the initialization code to cast it away, probably with a helper macro. Regards, Clemens