From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751938AbdC0TeX (ORCPT ); Mon, 27 Mar 2017 15:34:23 -0400 Received: from mail-it0-f45.google.com ([209.85.214.45]:36753 "EHLO mail-it0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751327AbdC0TeR (ORCPT ); Mon, 27 Mar 2017 15:34:17 -0400 MIME-Version: 1.0 In-Reply-To: <87inmujz49.fsf@rasmusvillemoes.dk> References: <1485894263-91051-1-git-send-email-keescook@chromium.org> <1485894263-91051-2-git-send-email-keescook@chromium.org> <851a0c99-db08-c3a8-f5c6-2e567971e2eb@au1.ibm.com> <87inmujz49.fsf@rasmusvillemoes.dk> From: Kees Cook Date: Mon, 27 Mar 2017 12:33:23 -0700 X-Google-Sender-Auth: wELnFUYaT-F35H08kwm1661Zw1Y Message-ID: Subject: Re: [PATCH v5 1/4] gcc-plugins: Add the initify gcc plugin To: Rasmus Villemoes Cc: Andrew Donnellan , LKML , Emese Revfy , Arnd Bergmann , Josh Triplett , PaX Team , Masahiro Yamada , minipli@ld-linux.so, Russell King , Catalin Marinas , David Brown , "benh@kernel.crashing.org" , Thomas Gleixner , Andrew Morton , Jeff Layton , Sam Ravnborg , "kernel-hardening@lists.openwall.com" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 27, 2017 at 12:31 PM, Rasmus Villemoes wrote: > On Mon, Mar 27 2017, Kees Cook wrote: > >> On Mon, Mar 27, 2017 at 12:38 AM, Andrew Donnellan >> wrote: >>> On 01/02/17 07:24, Kees Cook wrote: >>>> >>>> From: Emese Revfy >>>> >>>> The kernel already has a mechanism to free up code and data memory that >>>> is only used during kernel or module initialization. This plugin will >>>> teach the compiler to find more such code and data that can be freed >>>> after initialization. >>> >>> >>> Currently checking whether we can wire this up for powerpc without too many >>> problems... >> >> Cool, thanks. FWIW, note that this plugin is a bit back-burnered at >> the moment. I've got this in my -next tree still, but it needs some >> rather large changes to how it does its annotations before Linus will >> accept it. > > Why not just hardcode the annotations in the plugin itself? I'd expect > just making it know about mem*, str*, and the various *printf/printk > functions would get 90% of the benefits. The prototypes of these > aren't gonna change anytime soon, so there's no compelling reason to > keep the annotations with the declarations. The plugin can still do > its sanity checking when it compiles a function with one of these names. Yup, I think that's another entirely workable solution too. I just meant to say that I don't have time at the moment to look at it (if you want to, please do), and I think Emese is already happy with how the annotations work, so I don't think she'd want to work on it either (but she can correct me if I'm wrong). -Kees -- Kees Cook Pixel Security