From: Kees Cook <keescook@google.com>
To: Will Deacon <will.deacon@arm.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
Linux-Next Mailing List <linux-next@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Alexander Popov <alex.popov@linux.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Laura Abbott <labbott@redhat.com>
Subject: Re: linux-next: build failure after merge of the kspp tree
Date: Fri, 27 Jul 2018 09:00:19 -0700 [thread overview]
Message-ID: <CAGXu5jJ=0YBYKkQM3=KZRp1o3fT0yGY6-0UDkkit0WenFM3oDg@mail.gmail.com> (raw)
In-Reply-To: <20180727132742.GB28549@arm.com>
On Fri, Jul 27, 2018 at 6:27 AM, Will Deacon <will.deacon@arm.com> wrote:
> On Fri, Jul 27, 2018 at 02:01:06PM +0100, Will Deacon wrote:
>> On Fri, Jul 27, 2018 at 01:55:22PM +0100, Will Deacon wrote:
>> > On Fri, Jul 27, 2018 at 08:55:11PM +1000, Stephen Rothwell wrote:
>> > > On Fri, 27 Jul 2018 19:06:47 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>> > > >
>> > > > On Fri, 27 Jul 2018 19:02:07 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>> > > > >
>> > > > > After merging the kspp tree, today's linux-next build (x86_64
>> > > > > allmodconfig) failed like this:
>> > > > >
>> > > > > cc1: error: plugin stackleak_plugin should be specified before -fplugin-arg-stackleak_plugin-disable in the command line
>> > > > >
>> > > > > Maybe caused by commit
>> > > > >
>> > > > > a8b9eaddb9c0 ("gcc-plugins: Add STACKLEAK plugin for tracking the kernel stack")
>> > > > >
>> > > > > I have used the kspp tree from next-20180726 for today.
>> > > >
>> > > > Well, that obviously didn't work since the tree hasn't changed for a
>> > > > few days.
>> > > >
>> > > > I can't see what has interacted to make this happen, so I have dropped
>> > > > the kspp tree for today.
>> > >
>> > > Actually, it may have been caused by commit
>> > >
>> > > 0b3e336601b8 ("arm64: Add support for STACKLEAK gcc plugin")
>> > >
>> > > from the arm64 tree.
>> >
>> > Thanks, Stephen. I managed to reproduce this by merging for-next/kspp from
>> > Kees's tree and for-next/core from the arm64 tree. The failure happens when
>> > building the EFI stub, so the commit you mention above is almost certainly
>> > the culprit.
>> >
>> > We build the stub with the following GCC invocation:
>> >
>> > gcc -Wp,-MD,drivers/firmware/efi/libstub/.efi-stub-helper.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.9/include -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -mcmodel=small -m64 -D__KERNEL__ -O2 -fPIC -fno-strict-aliasing -mno-red-zone -mno-mmx -mno-sse -fshort-wchar -DDISABLE_BRANCH_PROFILING -D__NO_FORTIFY -ffreestanding -fno-stack-protector -fplugin-arg-stackleak_plugin-disable -fno-builtin -DKBUILD_BASENAME='"efi_stub_helper"' -DKBUILD_MODNAME='"efi_stub_helper"' -c -o drivers/firmware/efi/libstub/.tmp_efi-stub-helper.o drivers/firmware/efi/libstub/efi-stub-helper.c
>> >
>> > so given that we're not passing any -fplugin= option anyway (because we
>> > override KBUILD_CFLAGS for the stub), I don't understand why we need
>> > to the disable option at all.
>> >
>> > Laura?
>>
>> ... ah, but arm and arm64 inherit the old KBUILD_CFLAGS via the
>> cflags-$(CONFIG_ARM64) and cflags-$(CONFIG_ARM) definitions, so they
>> would be the places where we need to disable the plugin.
>
> i.e. something like the diff below.
>
> Will
>
> --->8
>
> diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile
> index 25dd2a14560d..f3700fe08908 100644
> --- a/drivers/firmware/efi/libstub/Makefile
> +++ b/drivers/firmware/efi/libstub/Makefile
> @@ -11,9 +11,11 @@ cflags-$(CONFIG_X86) += -m$(BITS) -D__KERNEL__ -O2 \
> -fPIC -fno-strict-aliasing -mno-red-zone \
> -mno-mmx -mno-sse -fshort-wchar
>
> -cflags-$(CONFIG_ARM64) := $(subst -pg,,$(KBUILD_CFLAGS)) -fpie
> +cflags-$(CONFIG_ARM64) := $(subst -pg,,$(KBUILD_CFLAGS)) -fpie \
> + $(DISABLE_STACKLEAK_PLUGIN)
> cflags-$(CONFIG_ARM) := $(subst -pg,,$(KBUILD_CFLAGS)) \
> - -fno-builtin -fpic -mno-single-pic-base
> + -fno-builtin -fpic -mno-single-pic-base \
> + $(DISABLE_STACKLEAK_PLUGIN)
>
> cflags-$(CONFIG_EFI_ARMSTUB) += -I$(srctree)/scripts/dtc/libfdt
>
> @@ -21,7 +23,6 @@ KBUILD_CFLAGS := $(cflags-y) -DDISABLE_BRANCH_PROFILING \
> -D__NO_FORTIFY \
> $(call cc-option,-ffreestanding) \
> $(call cc-option,-fno-stack-protector) \
> - $(DISABLE_STACKLEAK_PLUGIN)
>
> GCOV_PROFILE := n
> KASAN_SANITIZE := n
Ah! Thanks for tracking this down!
-Kees
--
Kees Cook
Pixel Security
next prev parent reply other threads:[~2018-07-27 16:00 UTC|newest]
Thread overview: 111+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-27 9:02 linux-next: build failure after merge of the kspp tree Stephen Rothwell
2018-07-27 9:06 ` Stephen Rothwell
2018-07-27 10:55 ` Stephen Rothwell
2018-07-27 12:55 ` Will Deacon
2018-07-27 13:01 ` Will Deacon
2018-07-27 13:27 ` Will Deacon
2018-07-27 16:00 ` Kees Cook [this message]
2018-07-30 7:33 ` Stephen Rothwell
2018-07-30 14:47 ` Laura Abbott
2018-07-30 16:37 ` Will Deacon
2018-07-30 18:31 ` [PATCH] efi/libstub: Only disable stackleak plugin for arm64 Laura Abbott
2018-07-30 19:09 ` Kees Cook
2018-07-31 8:51 ` Will Deacon
2018-07-31 10:09 ` linux-next: build failure after merge of the kspp tree Will Deacon
2018-07-31 11:27 ` Stephen Rothwell
-- strict thread matches above, loose matches on Subject: below --
2024-03-05 3:50 Stephen Rothwell
2024-03-05 9:54 ` Kees Cook
2023-09-14 1:50 Stephen Rothwell
2023-09-14 3:07 ` Kees Cook
2023-01-05 2:25 Stephen Rothwell
2023-01-05 3:22 ` Kees Cook
2023-01-05 4:24 ` Stephen Rothwell
2022-12-01 3:07 Stephen Rothwell
2022-12-01 16:31 ` Kees Cook
2022-07-28 10:55 Stephen Rothwell
2022-07-28 15:12 ` Matthias Kaehlcke
2022-05-05 7:40 Stephen Rothwell
2022-05-07 17:18 ` Kees Cook
2022-03-16 7:32 Stephen Rothwell
2022-03-17 1:01 ` Linus Walleij
2022-03-17 8:24 ` Marc Zyngier
2022-03-09 10:10 Stephen Rothwell
2022-03-09 16:52 ` Kees Cook
2022-03-09 16:58 ` Hans de Goede
2022-03-09 17:18 ` Kees Cook
2022-02-28 22:27 Stephen Rothwell
2022-02-28 23:02 ` Kees Cook
2022-03-02 9:16 ` Stephen Rothwell
2022-03-03 7:29 ` Stephen Rothwell
2022-01-30 23:09 Stephen Rothwell
2022-01-31 4:04 ` Kees Cook
2022-01-31 4:59 ` Stephen Rothwell
2022-01-31 6:19 ` Kees Cook
2022-01-31 19:10 ` Saeed Mahameed
2022-01-31 21:06 ` Kees Cook
2022-01-30 22:34 Stephen Rothwell
2022-01-30 23:24 ` Herbert Xu
2022-01-31 0:15 ` Stephen Rothwell
2022-01-31 0:20 ` Herbert Xu
2022-01-31 0:41 ` Stephen Rothwell
2022-01-25 3:50 Stephen Rothwell
2022-01-25 7:44 ` Kees Cook
2022-01-25 13:27 ` Masami Hiramatsu
2022-01-25 14:01 ` Steven Rostedt
2022-01-25 17:53 ` Kees Cook
2022-01-25 14:31 ` Masami Hiramatsu
2022-01-25 15:49 ` Steven Rostedt
2022-01-25 17:54 ` Kees Cook
2022-01-25 18:41 ` Steven Rostedt
2022-01-25 20:57 ` Kees Cook
2022-01-25 21:23 ` Steven Rostedt
2022-01-25 21:28 ` Steven Rostedt
2022-01-25 22:07 ` Kees Cook
2022-01-25 22:21 ` Steven Rostedt
2022-01-26 0:35 ` Masami Hiramatsu
2022-01-26 1:16 ` Steven Rostedt
2022-01-26 3:18 ` Kees Cook
2022-01-26 3:26 ` Steven Rostedt
2022-01-26 19:41 ` Beau Belgrave
2022-01-26 21:00 ` Steven Rostedt
2022-01-26 3:52 ` Masami Hiramatsu
2022-01-26 4:06 ` Steven Rostedt
2022-01-26 3:17 ` Kees Cook
2022-01-25 22:01 ` Kees Cook
2022-01-25 3:24 Stephen Rothwell
2022-01-25 3:43 ` Kees Cook
2022-02-08 4:42 ` Stephen Rothwell
2022-02-08 6:13 ` Kees Cook
2022-01-25 2:55 Stephen Rothwell
2022-01-25 3:02 ` Stephen Rothwell
2022-01-25 3:22 ` Kees Cook
2022-01-25 0:57 Stephen Rothwell
2022-01-25 3:35 ` Kees Cook
2022-01-25 14:07 ` David Sterba
2021-09-16 3:34 Stephen Rothwell
2021-09-16 6:00 ` Kees Cook
2021-08-26 7:52 Stephen Rothwell
2021-08-26 15:38 ` Kees Cook
2020-06-23 3:51 Stephen Rothwell
2020-06-23 3:56 ` David Miller
2020-06-21 13:48 Stephen Rothwell
2020-06-21 15:36 ` Kees Cook
2017-11-08 5:23 Stephen Rothwell
2017-11-08 23:43 ` Kees Cook
2017-11-09 0:18 ` Darrick J. Wong
2017-11-09 0:31 ` Kees Cook
2017-06-20 4:56 Stephen Rothwell
2017-06-20 5:39 ` Kees Cook
2017-06-20 5:42 ` John Johansen
2017-06-20 5:39 ` John Johansen
2017-06-26 18:19 ` Kees Cook
2017-06-27 3:33 ` James Morris
2017-06-27 22:16 ` Kees Cook
2017-06-28 5:48 ` James Morris
2017-06-16 1:30 Stephen Rothwell
2017-06-16 2:51 ` Daniel Micay
2017-06-16 2:52 ` Daniel Micay
2017-06-16 3:20 ` Kees Cook
2017-06-16 3:31 ` Stephen Rothwell
2017-06-19 0:23 ` Stephen Rothwell
2017-06-19 21:01 ` Kees Cook
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='CAGXu5jJ=0YBYKkQM3=KZRp1o3fT0yGY6-0UDkkit0WenFM3oDg@mail.gmail.com' \
--to=keescook@google.com \
--cc=alex.popov@linux.com \
--cc=catalin.marinas@arm.com \
--cc=labbott@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=will.deacon@arm.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 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).