From mboxrd@z Thu Jan 1 00:00:00 1970 Reply-To: kernel-hardening@lists.openwall.com 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 Subject: Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory 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: 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