Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 9 Jan 2019 13:37:49 -0800
From: Kees Cook <keescook@...omium.org>
To: Rong Chen <rong.a.chen@...el.com>
Cc: Russell King - ARM Linux <linux@...linux.org.uk>, kbuild test robot <lkp@...el.com>, Arnd Bergmann <arnd@...db.de>, 
	Kernel Hardening <kernel-hardening@...ts.openwall.com>, 
	Ard Biesheuvel <ard.biesheuvel@...aro.org>, LKML <linux-kernel@...r.kernel.org>, 
	Emese Revfy <re.emese@...il.com>, kbuild-all@...org, Laura Abbott <labbott@...hat.com>, 
	linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [kbuild-all] [PATCH v3] ARM: smp: add support for per-task stack canaries

On Tue, Jan 8, 2019 at 10:30 PM Rong Chen <rong.a.chen@...el.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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.