linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gcc-plugin: include memmodel.h and tree_vrp.h for gcc-7
@ 2016-12-16  9:00 Arnd Bergmann
  2016-12-16 14:10 ` Emese Revfy
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2016-12-16  9:00 UTC (permalink / raw)
  To: Kees Cook
  Cc: Kugan, Arnd Bergmann, stable, Emese Revfy, Michal Marek,
	kernel-hardening, linux-kernel

Building our gcc plugins currently fails with the gcc-7 snapshots,
due to some slightly modified header interfaces:

In file included from /git/arm-soc/scripts/gcc-plugins/gcc-common.h:42:0,
                 from <stdin>: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 <stdin>: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 &,

This makes it work again, which will be important once we turn
the plugins on in allmodconfig by default. It probably also
makes sense to backport these to v4.9 and v4.8, which
added the header file originally.

Cc: stable@vger.kernel.org
Suggested-by: Kugan <kugan.vivekanandarajah@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 scripts/gcc-plugins/gcc-common.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h
index 950fd2e64bb7..cb4a9518b58a 100644
--- a/scripts/gcc-plugins/gcc-common.h
+++ b/scripts/gcc-plugins/gcc-common.h
@@ -18,6 +18,9 @@
 
 #include "tree-inline.h"
 #include "version.h"
+#if BUILDING_GCC_VERSION >= 7000
+#include "memmodel.h"
+#endif
 #include "rtl.h"
 #include "tm_p.h"
 #include "flags.h"
@@ -66,6 +69,9 @@
 #include "tree-flow.h"
 #else
 #include "tree-cfgcleanup.h"
+#if BUILDING_GCC_VERSION >= 7000
+#include "tree-vrp.h"
+#endif
 #include "tree-ssa-operands.h"
 #include "tree-into-ssa.h"
 #endif
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] gcc-plugin: include memmodel.h and tree_vrp.h for gcc-7
  2016-12-16  9:00 [PATCH] gcc-plugin: include memmodel.h and tree_vrp.h for gcc-7 Arnd Bergmann
@ 2016-12-16 14:10 ` Emese Revfy
  2016-12-16 19:40   ` Kees Cook
  0 siblings, 1 reply; 3+ messages in thread
From: Emese Revfy @ 2016-12-16 14:10 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kees Cook, Kugan, stable, Michal Marek, kernel-hardening,
	linux-kernel, pageexec

On Fri, 16 Dec 2016 10:00:22 +0100
Arnd Bergmann <arnd@arndb.de> wrote:

> Cc: stable@vger.kernel.org
> Suggested-by: Kugan <kugan.vivekanandarajah@linaro.org>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  scripts/gcc-plugins/gcc-common.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h
> index 950fd2e64bb7..cb4a9518b58a 100644
> --- a/scripts/gcc-plugins/gcc-common.h
> +++ b/scripts/gcc-plugins/gcc-common.h
> @@ -18,6 +18,9 @@
>  
>  #include "tree-inline.h"
>  #include "version.h"
> +#if BUILDING_GCC_VERSION >= 7000
> +#include "memmodel.h"
> +#endif
>  #include "rtl.h"
>  #include "tm_p.h"
>  #include "flags.h"
> @@ -66,6 +69,9 @@
>  #include "tree-flow.h"
>  #else
>  #include "tree-cfgcleanup.h"
> +#if BUILDING_GCC_VERSION >= 7000
> +#include "tree-vrp.h"
> +#endif
>  #include "tree-ssa-operands.h"
>  #include "tree-into-ssa.h"
>  #endif
 
Hi,

Could you please use the upstream gcc-common.h? You can find it here:
https://www.grsecurity.net/~paxguy1/gcc-common.h

Thanks
-- 
Emese

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gcc-plugin: include memmodel.h and tree_vrp.h for gcc-7
  2016-12-16 14:10 ` Emese Revfy
@ 2016-12-16 19:40   ` Kees Cook
  0 siblings, 0 replies; 3+ messages in thread
From: Kees Cook @ 2016-12-16 19:40 UTC (permalink / raw)
  To: Emese Revfy
  Cc: Arnd Bergmann, Kugan, # 3.4.x, Michal Marek, kernel-hardening,
	LKML, pageexec

On Fri, Dec 16, 2016 at 6:10 AM, Emese Revfy <re.emese@gmail.com> wrote:
> On Fri, 16 Dec 2016 10:00:22 +0100
> Arnd Bergmann <arnd@arndb.de> wrote:
>
>> Cc: stable@vger.kernel.org
>> Suggested-by: Kugan <kugan.vivekanandarajah@linaro.org>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> ---
>>  scripts/gcc-plugins/gcc-common.h | 6 ++++++
>>  1 file changed, 6 insertions(+)
>>
>> diff --git a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h
>> index 950fd2e64bb7..cb4a9518b58a 100644
>> --- a/scripts/gcc-plugins/gcc-common.h
>> +++ b/scripts/gcc-plugins/gcc-common.h
>> @@ -18,6 +18,9 @@
>>
>>  #include "tree-inline.h"
>>  #include "version.h"
>> +#if BUILDING_GCC_VERSION >= 7000
>> +#include "memmodel.h"
>> +#endif
>>  #include "rtl.h"
>>  #include "tm_p.h"
>>  #include "flags.h"
>> @@ -66,6 +69,9 @@
>>  #include "tree-flow.h"
>>  #else
>>  #include "tree-cfgcleanup.h"
>> +#if BUILDING_GCC_VERSION >= 7000
>> +#include "tree-vrp.h"
>> +#endif
>>  #include "tree-ssa-operands.h"
>>  #include "tree-into-ssa.h"
>>  #endif
>
> Hi,
>
> Could you please use the upstream gcc-common.h? You can find it here:
> https://www.grsecurity.net/~paxguy1/gcc-common.h

A bunch of the diff between this and the existing gcc-common.h are
commented out includes. :)

I'll strip out those and send the resulting patch. Thanks!

-Kees

-- 
Kees Cook
Nexus Security

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-16 19:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-16  9:00 [PATCH] gcc-plugin: include memmodel.h and tree_vrp.h for gcc-7 Arnd Bergmann
2016-12-16 14:10 ` Emese Revfy
2016-12-16 19:40   ` Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).