Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932949AbcLILe3 convert rfc822-to-8bit (ORCPT ); Fri, 9 Dec 2016 06:34:29 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:59011 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932465AbcLILe1 (ORCPT ); Fri, 9 Dec 2016 06:34:27 -0500 From: Arnd Bergmann To: Kees Cook Cc: Stephen Rothwell , Randy Dunlap , Olof Johansson , Mark Brown , info@kernelci.org, Linus Torvalds , Andrew Morton , Will Deacon , Russell King - ARM Linux , LKML , Linux-Next , Fengguang Wu , Andrew Donnellan , Michael Ellerman , Laura Abbott , "x86@kernel.org" Subject: Re: enabling COMPILE_TEST support for GCC plugins in v4.11 Date: Fri, 09 Dec 2016 12:33:22 +0100 Message-ID: <5572017.jUy2fe8FTb@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K0:wMLFKC0lGOW+1MJ7gXTG7m8mroRKr+6WTa7rh9g19ndvQ7T1yz/ 4T+helxNz5LaAvCOoWoDP4Ln3PD9YgerCL5hGmIIxJXGduh2PIbg3E8JqBICyzTq+ia03Gd cetnX/BolF9vLAfj4jj57C2PT1HZucNkQhfTLQ6jFr1ZQnuqkdA1wZOvRAS0nECKdfa/OFT Q8xyJrgRzurvmvhboASLw== X-UI-Out-Filterresults: notjunk:1;V01:K0:5D0IxZ8gPwQ=:Op6vEgrBq/6r3z1fjI1DIF XFizTSlmd61hYJPDSwLqIlMktRhIusSzkT1xpiQ5r5WXnlY6f4IxO8DlGQNP1sIfLKYe2NQYf JkEAUmY443J5RwRuadQl7j9rUXtsbbDRcfTqWMnGKLzy/T+h5P6FRUnka4buRdu0mt/wBwYSc JHnsDpzBowz1NZbLVNgkangzUcsG82xRzxGDH0q4qJCEeFfcABmcE9ZGDFphLEoIL1098rJ6I SPH5gTZRGmaL1vRqu3v0ZfW5NLaImzNXVBsVf2Zpln+5CJJrx3uwGwgPMH9VCD79ItzWQk7B5 94mI33vIgUhdx4MT1jaNJxvSOQiJ3K6y6y2qNY77qI7Vjs4MsfqaZugH0U4fl1jBQWqtR/t5S bDn04/fVg/tgbh8V24KTxnCiWBcyytXry/Xo6l4LuBbA1+j66gGel2eTW5SAYhWJCcIS9Ol/L oKVcghi6EjAWBqKXzZbH6M9kSChoiJBCcAjN+yA8rZeuJTj3fEzTJoqQMBz56LFhxffFkCPSA jvlW16kGTRo75u9jJ2NZa00fpOKgOXN5bfWzac8b3hNR7aysfZwrw7v9Vx+s6rctyx5PL+9jK MfTObp8/ODeT9lD7KnXlf+WLm3E6OdLmiZL7vtcgb1R3RyNWngPrYhkLXgkxUILK5G+a1pI80 ad8sCBgg1sFooj2JrJRikOlIgtDsG5Gz7X7rdalt6Fiszw9bK59K6ryNzJuSIlJKh/tuDsnns 64p9xGJAHs1aa26H Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3556 Lines: 65 On Thursday, December 8, 2016 11:00:42 AM CET Kees Cook wrote: > Hi, > > I'd like to get the GCC plugins building under > allyesconfig/allmodconfig for -next soon (with the intention of > landing the change in v4.11). Specifically, I intend to revert > a519167e753e ("gcc-plugins: disable under COMPILE_TEST"). > > Right now the plugins are only supported on x86, arm, and arm64, > though powerpc may happen in either v4.10 or v4.11 as well. This means > that the autobuilders for these architectures need to have the "gcc > plugin development" package installed which contains the GCC headers > needed for the plugins. For Debian/Ubuntu, this is gcc-$N-plugin-dev > (and for cross compilers: gcc-$N-plugin-dev-$arch-linux-$abi). For > Fedora, it is gcc-plugin-devel (though I'm not sure the naming for > cross compilers). Manual builds of compilers should already have these > headers installed. > > The "noisy" plugin, cyc_complexity, is just an example, and I have > disabled it (which is pending[1] for v4.10). The remaining ones > (sancov and latent_entropy) are what I'm hoping to see tested > tree-wide (with the expectation that more are coming down the road: > initify, randstruct, structleak, constify, ...) > > IIUC, the 0day builder already has the headers installed. I tried to > look through linux-next to find all the other folks that do > autobuilding on these architectures; apologies if I've missed anyone. > > If you have a moment, applying 215e2aa6c024[1] and reverting > a519167e753e for an allyesconfig/allmodconfig build should let you > know if things are working correctly with headers installed. If anyone > sees any problems, please let me know and I can queue up fixes. > > Thanks! > > -Kees > > [1] http://git.kernel.org/cgit/linux/kernel/git/kees/linux.git/commit/?h=for-next/gcc-plugins&id=215e2aa6c024d27cdbe88e2ea88cb59dcab588eb This is what I got on x86-64 with a gcc-7.0.0 snapshot: In file included from /git/arm-soc/scripts/gcc-plugins/gcc-common.h:42:0, from :1: /home/arnd/cross-gcc/lib/gcc/x86_64-linux/7.0.0/plugin/include/emit-rtl.h:371:41: error: use of enum ‘memmodel’ without previous declaration extern bool need_atomic_barrier_p (enum memmodel, bool); ^ In file included from /git/arm-soc/scripts/gcc-plugins/gcc-common.h:94:0, from :1: /home/arnd/cross-gcc/lib/gcc/x86_64-linux/7.0.0/plugin/include/tree-ssanames.h:70:40: error: use of enum ‘value_range_type’ without previous declaration extern void set_range_info (tree, enum value_range_type, const wide_int_ref &, ^ /home/arnd/cross-gcc/lib/gcc/x86_64-linux/7.0.0/plugin/include/tree-ssanames.h:73:13: error: use of enum ‘value_range_type’ without previous declaration extern enum value_range_type get_range_info (const_tree, wide_int *, ^ /home/arnd/cross-gcc/lib/gcc/x86_64-linux/7.0.0/plugin/include/tree-ssanames.h:98:55: error: use of enum ‘value_range_type’ without previous declaration extern void duplicate_ssa_name_range_info (tree, enum value_range_type, ^ Cannot use CONFIG_GCC_PLUGINS: your gcc installation does not support plugins, perhaps the necessary headers are missing? scripts/Makefile.gcc-plugins:51: recipe for target 'gcc-plugins-check' failed I manually fixed up the gcc header files to include the ones with the definition for now, to address those, but I don't know if that change is correct. Arnd