All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Emese Revfy <re.emese@gmail.com>
Cc: Laura Abbott <labbott@redhat.com>,
	linux-kbuild <linux-kbuild@vger.kernel.org>,
	PaX Team <pageexec@freemail.hu>,
	Brad Spengler <spender@grsecurity.net>,
	"kernel-hardening@lists.openwall.com" 
	<kernel-hardening@lists.openwall.com>,
	Michal Marek <mmarek@suse.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Fengguang Wu <fengguang.wu@intel.com>,
	Dmitry Vyukov <dvyukov@google.com>,
	LKML <linux-kernel@vger.kernel.org>,
	David Brown <david.brown@linaro.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	minipli@ld-linux.so
Subject: Re: [PATCH v9 3/4] Add Cyclomatic complexity GCC plugin
Date: Wed, 15 Jun 2016 15:41:28 -0700	[thread overview]
Message-ID: <CAGXu5jL4sq1zibXqg1KsoRQfdfyB5K_-6+GGL=kKOSWUXNxoUg@mail.gmail.com> (raw)
In-Reply-To: <20160615225331.abb990e0302757ea9a6a3500@gmail.com>

On Wed, Jun 15, 2016 at 1:53 PM, Emese Revfy <re.emese@gmail.com> wrote:
> On Tue, 14 Jun 2016 12:29:59 -0700
> Laura Abbott <labbott@redhat.com> wrote:
>
>> On 05/23/2016 03:10 PM, Emese Revfy wrote:
>> 1) make mrproper
>> 2) make defconfig
>> 3) enable GCC_PLUGINS, GCC_PLUGIN_CYC_COMPLEXITY
>> 4) enable FUNCTION_TRACER (it will select other options as well)
>> 5) make && make modules
>>
>> ERROR: "__fentry__" [net/ipv4/netfilter/ipt_MASQUERADE.ko] undefined!
>> ERROR: "__fentry__" [fs/efivarfs/efivarfs.ko] undefined!
>> ERROR: "__fentry__" [drivers/thermal/x86_pkg_temp_thermal.ko] undefined!
>> scripts/Makefile.modpost:91: recipe for target '__modpost' failed
>> make[1]: *** [__modpost] Error 1
>
> The patch below fixes this bug, but I think it is ugly.
> https://github.com/ephox-gcc-plugins/gcc-plugins_linux-next/commit/73e2d117daa7f3c6aee8935ecbb318354ff9cd82
>
> If anyone has a better idea to fix this, please let me know.

I think the logic looks fine, but I think I would name it more
generically. For example, call it something plugin-agnostic like
KBUILD_CFLAGS_MINIMUM.

I actually wonder if I can use this same logic to fix the stack
protector detection code...

-Kees

-- 
Kees Cook
Chrome OS & Brillo Security

WARNING: multiple messages have this Message-ID (diff)
From: Kees Cook <keescook@chromium.org>
To: Emese Revfy <re.emese@gmail.com>
Cc: Laura Abbott <labbott@redhat.com>,
	linux-kbuild <linux-kbuild@vger.kernel.org>,
	PaX Team <pageexec@freemail.hu>,
	Brad Spengler <spender@grsecurity.net>,
	"kernel-hardening@lists.openwall.com"
	<kernel-hardening@lists.openwall.com>,
	Michal Marek <mmarek@suse.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Fengguang Wu <fengguang.wu@intel.com>,
	Dmitry Vyukov <dvyukov@google.com>,
	LKML <linux-kernel@vger.kernel.org>,
	David Brown <david.brown@linaro.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	minipli@ld-linux.so
Subject: [kernel-hardening] Re: [PATCH v9 3/4] Add Cyclomatic complexity GCC plugin
Date: Wed, 15 Jun 2016 15:41:28 -0700	[thread overview]
Message-ID: <CAGXu5jL4sq1zibXqg1KsoRQfdfyB5K_-6+GGL=kKOSWUXNxoUg@mail.gmail.com> (raw)
In-Reply-To: <20160615225331.abb990e0302757ea9a6a3500@gmail.com>

On Wed, Jun 15, 2016 at 1:53 PM, Emese Revfy <re.emese@gmail.com> wrote:
> On Tue, 14 Jun 2016 12:29:59 -0700
> Laura Abbott <labbott@redhat.com> wrote:
>
>> On 05/23/2016 03:10 PM, Emese Revfy wrote:
>> 1) make mrproper
>> 2) make defconfig
>> 3) enable GCC_PLUGINS, GCC_PLUGIN_CYC_COMPLEXITY
>> 4) enable FUNCTION_TRACER (it will select other options as well)
>> 5) make && make modules
>>
>> ERROR: "__fentry__" [net/ipv4/netfilter/ipt_MASQUERADE.ko] undefined!
>> ERROR: "__fentry__" [fs/efivarfs/efivarfs.ko] undefined!
>> ERROR: "__fentry__" [drivers/thermal/x86_pkg_temp_thermal.ko] undefined!
>> scripts/Makefile.modpost:91: recipe for target '__modpost' failed
>> make[1]: *** [__modpost] Error 1
>
> The patch below fixes this bug, but I think it is ugly.
> https://github.com/ephox-gcc-plugins/gcc-plugins_linux-next/commit/73e2d117daa7f3c6aee8935ecbb318354ff9cd82
>
> If anyone has a better idea to fix this, please let me know.

I think the logic looks fine, but I think I would name it more
generically. For example, call it something plugin-agnostic like
KBUILD_CFLAGS_MINIMUM.

I actually wonder if I can use this same logic to fix the stack
protector detection code...

-Kees

-- 
Kees Cook
Chrome OS & Brillo Security

  reply	other threads:[~2016-06-15 22:41 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-23 22:07 [PATCH v9 0/4] Introduce GCC plugin infrastructure Emese Revfy
2016-05-23 22:07 ` [kernel-hardening] " Emese Revfy
2016-05-23 22:08 ` [PATCH v9 1/4] Shared library support Emese Revfy
2016-05-23 22:08   ` [kernel-hardening] " Emese Revfy
2016-05-23 22:09 ` [PATCH v9 2/4] GCC plugin infrastructure Emese Revfy
2016-05-23 22:09   ` [kernel-hardening] " Emese Revfy
2016-05-23 22:10 ` [PATCH v9 3/4] Add Cyclomatic complexity GCC plugin Emese Revfy
2016-05-23 22:10   ` [kernel-hardening] " Emese Revfy
2016-06-14 19:29   ` Laura Abbott
2016-06-14 19:29     ` [kernel-hardening] " Laura Abbott
2016-06-14 22:33     ` Emese Revfy
2016-06-14 22:33       ` [kernel-hardening] " Emese Revfy
2016-06-15 20:53     ` Emese Revfy
2016-06-15 20:53       ` [kernel-hardening] " Emese Revfy
2016-06-15 22:41       ` Kees Cook [this message]
2016-06-15 22:41         ` Kees Cook
2016-06-15 22:41         ` Kees Cook
2016-05-23 22:11 ` [PATCH v9 4/4] Add sancov plugin Emese Revfy
2016-05-23 22:11   ` [kernel-hardening] " Emese Revfy
2016-05-24 17:04 ` [PATCH v9 0/4] Introduce GCC plugin infrastructure Kees Cook
2016-05-24 17:04   ` [kernel-hardening] " Kees Cook
2016-05-24 17:04   ` Kees Cook
2016-05-25 10:46   ` Michal Marek
2016-05-25 10:46     ` [kernel-hardening] " Michal Marek
2016-05-25 10:46     ` Michal Marek
2016-05-25 17:12     ` Kees Cook
2016-05-25 17:12       ` [kernel-hardening] " Kees Cook
2016-05-25 17:12       ` Kees Cook
2016-06-07 20:58       ` Michal Marek
2016-06-07 20:58         ` [kernel-hardening] " Michal Marek
2016-06-07 20:58         ` Michal Marek
2016-06-07 20:59         ` Kees Cook
2016-06-07 20:59           ` [kernel-hardening] " Kees Cook
2016-06-07 20:59           ` Kees Cook
2016-06-07 21:59           ` Emese Revfy
2016-06-07 21:59             ` [kernel-hardening] " Emese Revfy
2016-06-07 21:59             ` Emese Revfy
2016-06-07 21:58             ` Kees Cook
2016-06-07 21:58               ` [kernel-hardening] " Kees Cook
2016-06-07 21:58               ` Kees Cook
2016-06-08  6:59               ` Michal Marek
2016-06-08  6:59                 ` [kernel-hardening] " Michal Marek
2016-06-08  6:59                 ` Michal Marek

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='CAGXu5jL4sq1zibXqg1KsoRQfdfyB5K_-6+GGL=kKOSWUXNxoUg@mail.gmail.com' \
    --to=keescook@chromium.org \
    --cc=david.brown@linaro.org \
    --cc=dvyukov@google.com \
    --cc=fengguang.wu@intel.com \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=labbott@redhat.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=minipli@ld-linux.so \
    --cc=mmarek@suse.com \
    --cc=pageexec@freemail.hu \
    --cc=re.emese@gmail.com \
    --cc=spender@grsecurity.net \
    --cc=yamada.masahiro@socionext.com \
    /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.