[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8486eb8b-e233-4e2f-e976-da7b4cefc673@infradead.org>
Date: Mon, 25 Jun 2018 16:25:03 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: Thomas Garnier <thgarnie@...gle.com>,
kernel-hardening@...ts.openwall.com
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
Borislav Petkov <bp@...en8.de>,
"Luis R. Rodriguez" <mcgrof@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Arnd Bergmann <arnd@...db.de>,
Christopher Li <sparse@...isli.org>,
Steven Rostedt <rostedt@...dmis.org>,
Jason Baron <jbaron@...mai.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Kate Stewart <kstewart@...uxfoundation.org>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Philippe Ombredanne <pombredanne@...b.com>,
Lukas Wunner <lukas@...ner.de>,
Kees Cook <keescook@...omium.org>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Petr Mladek <pmladek@...e.com>, linux-kernel@...r.kernel.org,
linux-arch@...r.kernel.org, linux-sparse@...r.kernel.org
Subject: Re: [PATCH v5 15/27] compiler: Option to default to hidden symbols
On 06/25/18 15:39, Thomas Garnier wrote:
> Provide an option to default visibility to hidden except for key
> symbols. This option is disabled by default and will be used by x86_64
> PIE support to remove errors between compilation units.
>
> The default visibility is also enabled for external symbols that are
> compared as they maybe equals (start/end of sections). In this case,
> older versions of GCC will remove the comparison if the symbols are
> hidden. This issue exists at least on gcc 4.9 and before.
>
> Signed-off-by: Thomas Garnier <thgarnie@...gle.com>
> ---
> diff --git a/init/Kconfig b/init/Kconfig
> index 24b60536e26b..d4f90cc38ede 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -1718,6 +1718,13 @@ config PROFILING
> config TRACEPOINTS
> bool
>
> +#
> +# Default to hidden visibility for all symbols.
> +# Useful for Position Independent Code to reduce global references.
> +#
> +config DEFAULT_HIDDEN
> + bool
> +
I certainly would appreciate a better/more descriptive kconfig symbol name
here.
> source "arch/Kconfig"
>
> endmenu # General setup
thanks,
--
~Randy
Powered by blists - more mailing lists