From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Date: Mon, 09 Nov 2015 16:39:10 +0000 Subject: Re: [kernel-hardening] Re: [PATCH] video: constify geode ops structures Message-Id: <20151109163910.GU18797@mwanda> List-Id: References: <1447018493-20631-1-git-send-email-Julia.Lawall@lip6.fr> <20151108221624.GP18797@mwanda> <20151109054253.GQ18797@mwanda> <20151109134942.GB8264@mwanda> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Julia Lawall Cc: Joe Perches , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Kees Cook , kernel-hardening@lists.openwall.com On Mon, Nov 09, 2015 at 02:50:47PM +0000, Julia Lawall wrote: > > > On Mon, 9 Nov 2015, Dan Carpenter wrote: > > > Actually, it looks like Emese Revfy is going to merge the GCC plugin > > constify stuff sooner rather than later so maybe adding all these consts > > isn't going to be needed. > > Is there any advantage of const over the plugin? The consts are easy to > add. Less syntax. It's a whitelist instead of blacklist so we don't miss anything. > > Does the plugin help for structures that have non-function fields? Yeah. You can mark a struct as __do_const in the .h file and it will make them all const automatically. regards, dan carpenter