All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Nathan Chancellor <nathan@kernel.org>,
	Joe Perches <joe@perches.com>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	Ard Biesheuvel <ardb@kernel.org>,
	Arvind Sankar <nivedita@alum.mit.edu>,
	Joerg Roedel <jroedel@suse.de>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Nick Terrell <terrelln@fb.com>,
	Martin Radev <martin.b.radev@gmail.com>,
	Vincenzo Frascino <vincenzo.frascino@arm.com>,
	Andrey Konovalov <andreyknvl@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/boot/compressed: enable -Wundef
Date: Thu, 22 Apr 2021 12:21:33 -0700	[thread overview]
Message-ID: <202104221221.44A0CCD70D@keescook> (raw)
In-Reply-To: <20210422190450.3903999-1-ndesaulniers@google.com>

On Thu, Apr 22, 2021 at 12:04:42PM -0700, Nick Desaulniers wrote:
> A discussion around -Wundef showed that there were still a few boolean
> Kconfigs where #if was used rather than #ifdef to guard different code.
> Kconfig doesn't define boolean configs, which can result in -Wundef
> warnings.
> 
> arch/x86/boot/compressed/Makefile resets the CFLAGS used for this
> directory, and doesn't re-enable -Wundef as the top level Makefile does.
> If re-added, with RANDOMIZE_BASE and X86_NEED_RELOCS disabled, the
> following warnings are visible.
> 
> arch/x86/boot/compressed/misc.h:82:5: warning: 'CONFIG_RANDOMIZE_BASE'
> is not defined, evaluates to 0 [-Wundef]
>     ^
> arch/x86/boot/compressed/misc.c:175:5: warning: 'CONFIG_X86_NEED_RELOCS'
> is not defined, evaluates to 0 [-Wundef]
>     ^
> 
> Simply fix these and re-enable this warning for this directory.
> 
> Suggested-by: Nathan Chancellor <nathan@kernel.org>
> Suggested-by: Joe Perches <joe@perches.com>
> Link: https://github.com/ClangBuiltLinux/linux/issues/570
> Link: https://lore.kernel.org/lkml/67f6cd269684c9aa8463ff4812c3b4605e6739c3.camel@perches.com/
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>

Thanks!

Acked-by: Kees Cook <keescook@chromium.org>

-- 
Kees Cook

  reply	other threads:[~2021-04-22 19:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-22 19:04 [PATCH] x86/boot/compressed: enable -Wundef Nick Desaulniers
2021-04-22 19:21 ` Kees Cook [this message]
2021-04-23  0:32 ` Nathan Chancellor
2021-04-23  7:53   ` Borislav Petkov
2021-05-12 20:01 ` [tip: x86/urgent] x86/boot/compressed: Enable -Wundef tip-bot2 for Nick Desaulniers

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=202104221221.44A0CCD70D@keescook \
    --to=keescook@chromium.org \
    --cc=andreyknvl@gmail.com \
    --cc=ardb@kernel.org \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=joe@perches.com \
    --cc=jroedel@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.b.radev@gmail.com \
    --cc=masahiroy@kernel.org \
    --cc=mingo@redhat.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=nivedita@alum.mit.edu \
    --cc=terrelln@fb.com \
    --cc=tglx@linutronix.de \
    --cc=vincenzo.frascino@arm.com \
    --cc=x86@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.