All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Emese Revfy <re.emese@gmail.com>
Cc: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	pageexec@freemail.hu, spender@grsecurity.net,
	kernel-hardening@lists.openwall.com,
	Michal Marek <mmarek@suse.com>, Kees Cook <keescook@chromium.org>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	fengguang.wu@intel.com, Dmitry Vyukov <dvyukov@google.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5 2/5] GCC plugin infrastructure
Date: Sat, 26 Mar 2016 11:39:32 +0900	[thread overview]
Message-ID: <CAK7LNATK-r09tJ5K8u8vRdRR0dXywAJ=LbbhaigZkfMm3UUPmA@mail.gmail.com> (raw)
In-Reply-To: <20160324010749.f7e547e1df12b4944c5fa490@gmail.com>

Hi Emese,



2016-03-24 9:07 GMT+09:00 Emese Revfy <re.emese@gmail.com>:
> On Fri, 11 Mar 2016 15:25:19 +0900
> Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
>
>> You sprinkle "gcc-plugins" target in the top Makefile, which I do not like.
>>
>> Can you descend into scripts/gcc-plugins from scripts/Makefile?
>>
>>
>>  subdir-$(CONFIG_MODVERSIONS) += genksyms
>>  subdir-y                     += mod
>>  subdir-$(CONFIG_SECURITY_SELINUX) += selinux
>>  subdir-$(CONFIG_DTC)         += dtc
>>  subdir-$(CONFIG_GDB_SCRIPTS) += gdb
>> +subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins
>>
>>
>> This is how other host tools do, I think.
>
> Hi,
>
> I tried to remove the gcc-plugins target but sadly in this case the plugins aren't complied.
> I don't know if I understand how it should work. I pushed a commit:
> https://github.com/ephox-gcc-plugins/gcc-plugins_linux-next/commit/0b005b886bde6c4b9134d01f830d88d464911a65
> Could you please help me with what I did wrong?
>


Sorry, I missed this problem.

GCC-plugins must be compiled before descending into ./Kbuild.


Please apply the following on top of commit 0b005b88
and check if it works.




diff --git a/Makefile b/Makefile
index 1c7a379..bd643d3 100644
--- a/Makefile
+++ b/Makefile
@@ -1009,6 +1009,9 @@ archprepare: archheaders archscripts prepare1
scripts_basic
 prepare0: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
 prepare0: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 prepare0: archprepare FORCE
+ifdef CONFIG_GCC_PLUGINS
+       $(Q)$(MAKE) $(build)=scripts/gcc-plugins
+endif
        $(Q)$(MAKE) $(build)=.

 # All the preparing..
diff --git a/scripts/Makefile b/scripts/Makefile
index 0ba652c..1d80897 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -45,7 +45,6 @@ subdir-y                     += mod
 subdir-$(CONFIG_SECURITY_SELINUX) += selinux
 subdir-$(CONFIG_DTC)         += dtc
 subdir-$(CONFIG_GDB_SCRIPTS) += gdb
-subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins

 # Let clean descend into subdirs
-subdir-        += basic kconfig package
+subdir-        += basic kconfig package gcc-plugins





-- 
Best Regards
Masahiro Yamada

WARNING: multiple messages have this Message-ID (diff)
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Emese Revfy <re.emese@gmail.com>
Cc: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	pageexec@freemail.hu, spender@grsecurity.net,
	kernel-hardening@lists.openwall.com,
	Michal Marek <mmarek@suse.com>, Kees Cook <keescook@chromium.org>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	fengguang.wu@intel.com, Dmitry Vyukov <dvyukov@google.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [kernel-hardening] Re: [PATCH v5 2/5] GCC plugin infrastructure
Date: Sat, 26 Mar 2016 11:39:32 +0900	[thread overview]
Message-ID: <CAK7LNATK-r09tJ5K8u8vRdRR0dXywAJ=LbbhaigZkfMm3UUPmA@mail.gmail.com> (raw)
In-Reply-To: <20160324010749.f7e547e1df12b4944c5fa490@gmail.com>

Hi Emese,



2016-03-24 9:07 GMT+09:00 Emese Revfy <re.emese@gmail.com>:
> On Fri, 11 Mar 2016 15:25:19 +0900
> Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
>
>> You sprinkle "gcc-plugins" target in the top Makefile, which I do not like.
>>
>> Can you descend into scripts/gcc-plugins from scripts/Makefile?
>>
>>
>>  subdir-$(CONFIG_MODVERSIONS) += genksyms
>>  subdir-y                     += mod
>>  subdir-$(CONFIG_SECURITY_SELINUX) += selinux
>>  subdir-$(CONFIG_DTC)         += dtc
>>  subdir-$(CONFIG_GDB_SCRIPTS) += gdb
>> +subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins
>>
>>
>> This is how other host tools do, I think.
>
> Hi,
>
> I tried to remove the gcc-plugins target but sadly in this case the plugins aren't complied.
> I don't know if I understand how it should work. I pushed a commit:
> https://github.com/ephox-gcc-plugins/gcc-plugins_linux-next/commit/0b005b886bde6c4b9134d01f830d88d464911a65
> Could you please help me with what I did wrong?
>


Sorry, I missed this problem.

GCC-plugins must be compiled before descending into ./Kbuild.


Please apply the following on top of commit 0b005b88
and check if it works.




diff --git a/Makefile b/Makefile
index 1c7a379..bd643d3 100644
--- a/Makefile
+++ b/Makefile
@@ -1009,6 +1009,9 @@ archprepare: archheaders archscripts prepare1
scripts_basic
 prepare0: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
 prepare0: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 prepare0: archprepare FORCE
+ifdef CONFIG_GCC_PLUGINS
+       $(Q)$(MAKE) $(build)=scripts/gcc-plugins
+endif
        $(Q)$(MAKE) $(build)=.

 # All the preparing..
diff --git a/scripts/Makefile b/scripts/Makefile
index 0ba652c..1d80897 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -45,7 +45,6 @@ subdir-y                     += mod
 subdir-$(CONFIG_SECURITY_SELINUX) += selinux
 subdir-$(CONFIG_DTC)         += dtc
 subdir-$(CONFIG_GDB_SCRIPTS) += gdb
-subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins

 # Let clean descend into subdirs
-subdir-        += basic kconfig package
+subdir-        += basic kconfig package gcc-plugins





-- 
Best Regards
Masahiro Yamada

  reply	other threads:[~2016-03-26  2:39 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-06 23:02 [PATCH v5 0/5] Introduce GCC plugin infrastructure Emese Revfy
2016-03-06 23:02 ` [kernel-hardening] " Emese Revfy
2016-03-06 23:03 ` [PATCH v5 1/5] Shared library support Emese Revfy
2016-03-06 23:03   ` [kernel-hardening] " Emese Revfy
2016-03-07 21:05   ` Kees Cook
2016-03-07 21:05     ` [kernel-hardening] " Kees Cook
2016-03-07 21:05     ` Kees Cook
2016-03-07 21:32     ` Emese Revfy
2016-03-07 21:32       ` [kernel-hardening] " Emese Revfy
2016-03-07 21:32       ` Emese Revfy
2016-03-11  6:19   ` Masahiro Yamada
2016-03-11  6:19     ` [kernel-hardening] " Masahiro Yamada
2016-03-14 20:14     ` Emese Revfy
2016-03-14 20:14       ` [kernel-hardening] " Emese Revfy
2016-03-16  7:50       ` Masahiro Yamada
2016-03-16  7:50         ` [kernel-hardening] " Masahiro Yamada
2016-03-06 23:04 ` [PATCH v5 2/5] GCC plugin infrastructure Emese Revfy
2016-03-06 23:04   ` [kernel-hardening] " Emese Revfy
2016-03-09  9:01   ` David Brown
2016-03-09 20:50     ` Kees Cook
2016-03-09 20:50       ` Kees Cook
2016-03-09 22:07       ` Emese Revfy
2016-03-09 22:07         ` Emese Revfy
2016-03-09 22:03     ` Emese Revfy
2016-03-11  6:25   ` Masahiro Yamada
2016-03-11  6:25     ` [kernel-hardening] " Masahiro Yamada
2016-03-14 20:52     ` Emese Revfy
2016-03-14 20:52       ` [kernel-hardening] " Emese Revfy
2016-03-16  7:41       ` Masahiro Yamada
2016-03-16  7:41         ` [kernel-hardening] " Masahiro Yamada
2016-03-16 21:06         ` Emese Revfy
2016-03-16 21:06           ` [kernel-hardening] " Emese Revfy
2016-03-14 21:25     ` PaX Team
2016-03-14 21:25       ` [kernel-hardening] " PaX Team
2016-03-16  7:34       ` Masahiro Yamada
2016-03-16  7:34         ` [kernel-hardening] " Masahiro Yamada
2016-03-16 12:49         ` PaX Team
2016-03-16 12:49           ` [kernel-hardening] " PaX Team
2016-03-17  4:09           ` Masahiro Yamada
2016-03-17  4:09             ` [kernel-hardening] " Masahiro Yamada
2016-03-24  0:07     ` Emese Revfy
2016-03-24  0:07       ` [kernel-hardening] " Emese Revfy
2016-03-26  2:39       ` Masahiro Yamada [this message]
2016-03-26  2:39         ` Masahiro Yamada
2016-03-27 21:09         ` Emese Revfy
2016-03-27 21:09           ` [kernel-hardening] " Emese Revfy
2016-04-02  4:32           ` Masahiro Yamada
2016-04-02  4:32             ` [kernel-hardening] " Masahiro Yamada
2016-03-06 23:05 ` [PATCH v5 3/5] Add Cyclomatic complexity GCC plugin Emese Revfy
2016-03-06 23:05   ` [kernel-hardening] " Emese Revfy
2016-03-11  6:26   ` Masahiro Yamada
2016-03-11  6:26     ` [kernel-hardening] " Masahiro Yamada
2016-03-14 21:02     ` Emese Revfy
2016-03-14 21:02       ` [kernel-hardening] " Emese Revfy
2016-03-06 23:06 ` [PATCH v5 4/5] Documentation for the GCC plugin infrastructure Emese Revfy
2016-03-06 23:06   ` [kernel-hardening] " Emese Revfy
2016-03-06 23:07 ` [PATCH v5 5/5] Add sancov plugin Emese Revfy
2016-03-06 23:07   ` [kernel-hardening] " Emese Revfy
2016-03-07 21:07   ` Kees Cook
2016-03-07 21:07     ` [kernel-hardening] " Kees Cook
2016-03-07 21:07     ` Kees Cook
2016-03-07 21:29     ` Emese Revfy
2016-03-07 21:29       ` [kernel-hardening] " Emese Revfy
2016-03-07 21:29       ` Emese Revfy
2016-03-08 10:54     ` Dmitry Vyukov
2016-03-08 10:54       ` [kernel-hardening] " Dmitry Vyukov
2016-03-08 10:54       ` Dmitry Vyukov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK7LNATK-r09tJ5K8u8vRdRR0dXywAJ=LbbhaigZkfMm3UUPmA@mail.gmail.com' \
    --to=yamada.masahiro@socionext.com \
    --cc=dvyukov@google.com \
    --cc=fengguang.wu@intel.com \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=mmarek@suse.com \
    --cc=pageexec@freemail.hu \
    --cc=re.emese@gmail.com \
    --cc=spender@grsecurity.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.