From: "H. Peter Anvin" <hpa@zytor.com>
To: Kees Cook <keescook@chromium.org>, Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
x86@kernel.org, Michael Davidson <md@google.com>,
Cong Ding <dinggnu@gmail.com>
Subject: Re: [PATCH] x86, relocs: add percpu fixup for GNU ld 2.23
Date: Tue, 15 Oct 2013 23:51:50 -0700 [thread overview]
Message-ID: <525E3786.7030102@zytor.com> (raw)
In-Reply-To: <20131016064314.GA2739@www.outflux.net>
On 10/15/2013 11:43 PM, Kees Cook wrote:
> The GNU linker tries to put __per_cpu_load into the percpu area, resulting
> in a lack of its relocation. Force this symbol to be relocated. Seen
> starting with GNU ld 2.23 and later.
>
> Reported-by: Ingo Molnar <mingo@kernel.org>
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
> arch/x86/tools/relocs.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c
> index 1fa291f..7a85f29 100644
> --- a/arch/x86/tools/relocs.c
> +++ b/arch/x86/tools/relocs.c
> @@ -729,6 +729,7 @@ static void percpu_init(void)
> *
> * The GNU linker incorrectly associates:
> * __init_begin
> + * __per_cpu_load
> *
> * The "gold" linker incorrectly associates:
> * init_per_cpu__irq_stack_union
> @@ -738,6 +739,7 @@ static int is_percpu_sym(ElfW(Sym) *sym, const char *symname)
> {
> return (sym->st_shndx == per_cpu_shndx) &&
> strcmp(symname, "__init_begin") &&
> + strcmp(symname, "__per_cpu_load") &&
> strncmp(symname, "init_per_cpu_", 13);
> }
>
>
Why isn't this list using a regex like other symbol classes?
-hpa
next prev parent reply other threads:[~2013-10-16 6:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-16 6:43 [PATCH] x86, relocs: add percpu fixup for GNU ld 2.23 Kees Cook
2013-10-16 6:51 ` H. Peter Anvin [this message]
2013-10-16 14:55 ` Kees Cook
2013-10-16 15:22 ` H. Peter Anvin
2013-10-18 13:20 ` [tip:x86/kaslr] x86/relocs: Add " tip-bot for Kees Cook
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=525E3786.7030102@zytor.com \
--to=hpa@zytor.com \
--cc=dinggnu@gmail.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=md@google.com \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--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.