[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <162189535579.438777.12852956339898107122.b4-ty@chromium.org>
Date: Mon, 24 May 2021 15:29:18 -0700
From: Kees Cook <keescook@...omium.org>
To: Nick Desaulniers <ndesaulniers@...gle.com>,
Masahiro Yamada <masahiroy@...nel.org>
Cc: Kees Cook <keescook@...omium.org>,
clang-built-linux@...glegroups.com,
Candle Sun <candlesea@...il.com>, linux-kbuild@...r.kernel.org,
Fangrui Song <maskray@...gle.com>,
linux-kernel@...r.kernel.org,
Michal Marek <michal.lkml@...kovi.net>,
Sami Tolvanen <samitolvanen@...gle.com>,
Nathan Chancellor <nathan@...nel.org>
Subject: Re: [PATCH] Makefile: LTO: have linker check -Wframe-larger-than
On Thu, 11 Mar 2021 17:09:41 -0800, Nick Desaulniers wrote:
> -Wframe-larger-than= requires stack frame information, which the
> frontend cannot provide. This diagnostic is emitted late during
> compilation once stack frame size is available.
>
> When building with LTO, the frontend simply lowers C to LLVM IR and does
> not have stack frame information, so it cannot emit this diagnostic.
> When the linker drives LTO, it restarts optimizations and lowers LLVM IR
> to object code. At that point, it has stack frame information but
> doesn't know to check for a specific max stack frame size.
>
> [...]
Applied to for-linus/clang/features, thanks! This should be in -next
tomorrow and I'll send it on for -rc4 at the end of the week.
[1/1] Makefile: LTO: have linker check -Wframe-larger-than
https://git.kernel.org/kees/c/24845dcb170e
--
Kees Cook
Powered by blists - more mailing lists