Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752442AbbKIRGu (ORCPT ); Mon, 9 Nov 2015 12:06:50 -0500 Received: from mail-wm0-f43.google.com ([74.125.82.43]:33828 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751710AbbKIRGs (ORCPT ); Mon, 9 Nov 2015 12:06:48 -0500 Date: Mon, 9 Nov 2015 18:05:55 +0100 From: Emese Revfy To: kernel-hardening@lists.openwall.com Cc: Julia Lawall , Dan Carpenter , Joe Perches , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Kees Cook Subject: Re: [kernel-hardening] Re: [PATCH] video: constify geode ops structures Message-Id: <20151109180555.28c45c3ccaf2042dd7fefec4@gmail.com> In-Reply-To: References: <1447018493-20631-1-git-send-email-Julia.Lawall@lip6.fr> <20151108221624.GP18797@mwanda> <20151109054253.GQ18797@mwanda> <20151109134942.GB8264@mwanda> X-Mailer: Sylpheed 3.4.3 (GTK+ 2.24.28; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1379 Lines: 33 On Mon, 9 Nov 2015 14:50:47 +0000 (GMT) Julia Lawall 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. Hi, I think it's a very good advantage that the plugin constifies automatically without regular maintenance (e.g., generate patches with coccinelle, send patches to the maintainers every new kernel version). ;) But if it doesn't convince you, I did constification by hand (with a coccinelle script) some years ago. There are too many types that can be const and it took too long to prepare and get the maintainers to accept the patches. And it never ends as there are always new types that can be const. > Does the plugin help for structures that have non-function fields? Yes, it does. See __do_const here: http://www.openwall.com/lists/kernel-hardening/2015/11/06/11 or more about the constify plugin: https://pax.grsecurity.net/docs/PaXTeam-H2HC13-PaX-gcc-plugins.pdf -- Emese -- 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/