From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752501AbbKIQjk (ORCPT ); Mon, 9 Nov 2015 11:39:40 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:18650 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752439AbbKIQjh (ORCPT ); Mon, 9 Nov 2015 11:39:37 -0500 Date: Mon, 9 Nov 2015 19:39:10 +0300 From: Dan Carpenter To: Julia Lawall Cc: Joe Perches , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Kees Cook , kernel-hardening@lists.openwall.com Subject: Re: [kernel-hardening] Re: [PATCH] video: constify geode ops structures Message-ID: <20151109163910.GU18797@mwanda> References: <1447018493-20631-1-git-send-email-Julia.Lawall@lip6.fr> <20151108221624.GP18797@mwanda> <20151109054253.GQ18797@mwanda> <20151109134942.GB8264@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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