From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julia Lawall Date: Mon, 09 Nov 2015 21:55:39 +0000 Subject: Re: [kernel-hardening] Re: [PATCH] video: constify geode ops structures Message-Id: List-Id: References: <1447018493-20631-1-git-send-email-Julia.Lawall@lip6.fr> <20151108221624.GP18797@mwanda> <20151109054253.GQ18797@mwanda> <20151109134942.GB8264@mwanda> <20151109180555.28c45c3ccaf2042dd7fefec4@gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Kees Cook Cc: Julia Lawall , Emese Revfy , "kernel-hardening@lists.openwall.com" , Dan Carpenter , Joe Perches , kernel-janitors@vger.kernel.org, LKML On Mon, 9 Nov 2015, Kees Cook wrote: > On Mon, Nov 9, 2015 at 9:48 AM, Julia Lawall wrote: > > On Mon, 9 Nov 2015, Emese Revfy wrote: > > > >> 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. > > > > What happens if some structures cannot be made const because there is a > > reassignment somewhere? Is there any feedback about the problem? > > AIUI, for now, we can't make those const (though I would be happy to > be corrected). My hope would be to allow reassignment using something > like PaX's kernel_open/kernel_close inlines to allow for temporary > modification of read-only things (as part of the KERNEXEC feature). What I was more wondering was whether there is any feedback about the situation? julia