From: Kees Cook <keescook@chromium.org>
To: Nick Desaulniers <ndesaulniers@google.com>,
Masahiro Yamada <masahiroy@kernel.org>
Cc: Kees Cook <keescook@chromium.org>,
clang-built-linux@googlegroups.com,
Candle Sun <candlesea@gmail.com>,
linux-kbuild@vger.kernel.org, Fangrui Song <maskray@google.com>,
linux-kernel@vger.kernel.org,
Michal Marek <michal.lkml@markovi.net>,
Sami Tolvanen <samitolvanen@google.com>,
Nathan Chancellor <nathan@kernel.org>
Subject: Re: [PATCH] Makefile: LTO: have linker check -Wframe-larger-than
Date: Mon, 24 May 2021 15:29:18 -0700 [thread overview]
Message-ID: <162189535579.438777.12852956339898107122.b4-ty@chromium.org> (raw)
In-Reply-To: <20210312010942.1546679-1-ndesaulniers@google.com>
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
prev parent reply other threads:[~2021-05-24 22:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-12 1:09 [PATCH] Makefile: LTO: have linker check -Wframe-larger-than Nick Desaulniers
2021-03-12 17:55 ` Nick Desaulniers
2021-03-12 21:38 ` Nick Desaulniers
2021-03-15 10:57 ` David Laight
2021-05-24 22:29 ` Kees Cook [this message]
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=162189535579.438777.12852956339898107122.b4-ty@chromium.org \
--to=keescook@chromium.org \
--cc=candlesea@gmail.com \
--cc=clang-built-linux@googlegroups.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=maskray@google.com \
--cc=michal.lkml@markovi.net \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=samitolvanen@google.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).