kernel-hardening.lists.openwall.com archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Rong Chen <rong.a.chen@intel.com>
Cc: Russell King - ARM Linux <linux@armlinux.org.uk>,
	kbuild test robot <lkp@intel.com>, Arnd Bergmann <arnd@arndb.de>,
	Kernel Hardening <kernel-hardening@lists.openwall.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Emese Revfy <re.emese@gmail.com>,
	kbuild-all@01.org, Laura Abbott <labbott@redhat.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [kbuild-all] [PATCH v3] ARM: smp: add support for per-task stack canaries
Date: Wed, 9 Jan 2019 13:37:49 -0800	[thread overview]
Message-ID: <CAGXu5jLYG=UBrJXmrtoZVCka-w4_k_op8c7M1cQXmZs702fZ5Q@mail.gmail.com> (raw)
In-Reply-To: <235f0830-a293-5b00-4510-7d7d4c829d26@intel.com>

On Tue, Jan 8, 2019 at 10:30 PM Rong Chen <rong.a.chen@intel.com> wrote:
> I tested the commit on another machine and the warnings are exist.
> I found " -Wno-vla" was lost after the commit, so I think it's a real problem.
>
> -Werror=designated-init -fplugin-arg-arm_ssp_per_task_plugin-tso=1 -fplugin-arg-arm_ssp_per_task_plugin-offset=24 -fsanitize=shift -fsanitize=integer-divide-by-zero -fsanitize=unreachable -fsanitize=vla-bound -fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=object-size -fsanitize=bool -fsanitize=enum -fsanitize=alignment -Wno-maybe-uninitialized -fsanitize-coverage=trace-pc -DMODULE -DKBUILD_BASENAME='"test_ubsan"' -DKBUILD_MODNAME='"test_ubsan"' -c -o lib/.tmp_test_ubsan.o lib/test_ubsan.c
>
> -Werror=designated-init -Wno-vla -fsanitize=shift -fsanitize=integer-divide-by-zero -fsanitize=unreachable -fsanitize=vla-bound -fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=object-size -fsanitize=bool -fsanitize=enum -fsanitize=alignment -Wno-maybe-uninitialized -fsanitize-coverage=trace-pc -DMODULE -DKBUILD_BASENAME='"test_ubsan"' -DKBUILD_MODNAME='"test_ubsan"' -c -o lib/.tmp_test_ubsan.o lib/test_ubsan.c

Hm, so the -Wno-vla is getting clobbered.

in lib/Makefile, I see "+=", so I wouldn't expect a clobber:
CFLAGS_test_kasan.o += $(call cc-disable-warning, vla)
...
CFLAGS_test_ubsan.o += $(call cc-disable-warning, vla)

and scripts/Makefile.gcc-plugins is using += against KBUILD_CFLAGS:
KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)

I'm not sure where the per-target CFLAGS are built, but it seems like
something has gone wrong there?

-- 
Kees Cook

  reply	other threads:[~2019-01-09 21:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-06  8:32 [PATCH v3] ARM: smp: add support for per-task stack canaries Ard Biesheuvel
2018-12-09 10:28 ` kbuild test robot
2018-12-09 10:37   ` Russell King - ARM Linux
2018-12-10 22:34     ` Kees Cook
2018-12-12 21:26       ` Kees Cook
2018-12-13  2:53     ` [kbuild-all] " Rong Chen
2019-01-09  6:30       ` Rong Chen
2019-01-09 21:37         ` Kees Cook [this message]
2020-03-09 16:49 ` Guenter Roeck
2020-03-11 17:21   ` Kees Cook
2020-03-11 18:31     ` Guenter Roeck
2020-03-11 18:47       ` Kees Cook
2020-03-11 20:45         ` Russell King - ARM Linux admin
2020-03-11 21:39           ` Guenter Roeck

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='CAGXu5jLYG=UBrJXmrtoZVCka-w4_k_op8c7M1cQXmZs702fZ5Q@mail.gmail.com' \
    --to=keescook@chromium.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=arnd@arndb.de \
    --cc=kbuild-all@01.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=labbott@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lkp@intel.com \
    --cc=re.emese@gmail.com \
    --cc=rong.a.chen@intel.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).