Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751739AbbKYKGp (ORCPT ); Wed, 25 Nov 2015 05:06:45 -0500 Received: from smtprelay01.ispgateway.de ([80.67.31.24]:55946 "EHLO smtprelay01.ispgateway.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750699AbbKYKGm (ORCPT ); Wed, 25 Nov 2015 05:06:42 -0500 Subject: Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory To: Mathias Krause , kernel-hardening@lists.openwall.com References: <1448401114-24650-1-git-send-email-keescook@chromium.org> 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 From: Clemens Ladisch Message-ID: <56558826.1060202@ladisch.de> Date: Wed, 25 Nov 2015 11:06:30 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Df-Sender: bGludXgta2VybmVsQGNsLmRvbWFpbmZhY3Rvcnkta3VuZGUuZGU= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 614 Lines: 17 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/