From: "tip-bot2 for Ingo Molnar" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Ard Biesheuvel <ardb@kernel.org>, Ingo Molnar <mingo@kernel.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/urgent] Revert "x86/boot: Reject absolute references in .head.text"
Date: Mon, 27 Jan 2025 10:25:38 -0000 [thread overview]
Message-ID: <173797353863.31546.14997634746331823035.tip-bot2@tip-bot2> (raw)
In-Reply-To: <CAHk-=wj7k9nvJn6cpa3-5Ciwn2RGyE605BMkjWE4MqnvC9E92A@mail.gmail.com>
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: fb1102a09a3b6710ac1e033690f0283696dc94dc
Gitweb: https://git.kernel.org/tip/fb1102a09a3b6710ac1e033690f0283696dc94dc
Author: Ingo Molnar <mingo@kernel.org>
AuthorDate: Mon, 27 Jan 2025 11:08:14 +01:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Mon, 27 Jan 2025 11:08:14 +01:00
Revert "x86/boot: Reject absolute references in .head.text"
This reverts commit faf0ed487415f76fe4acf7980ce360901f5e1698.
As Linus reported, the hard build failure is entirely unhelpful
in tracking down the bug:
Absolute reference to symbol '.rodata' not permitted in .head.text
... and to add insult to injury, the offending vmlinux gets deleted,
making it hard to figure out what's going on ...
So revert this until a (much) more developer-friendly version
is merged.
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/CAHk-=wj7k9nvJn6cpa3-5Ciwn2RGyE605BMkjWE4MqnvC9E92A@mail.gmail.com
---
arch/x86/tools/relocs.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c
index e937be9..27441e5 100644
--- a/arch/x86/tools/relocs.c
+++ b/arch/x86/tools/relocs.c
@@ -841,10 +841,10 @@ static int is_percpu_sym(ElfW(Sym) *sym, const char *symname)
static int do_reloc64(struct section *sec, Elf_Rel *rel, ElfW(Sym) *sym,
const char *symname)
{
- int headtext = !strcmp(sec_name(sec->shdr.sh_info), ".head.text");
unsigned r_type = ELF64_R_TYPE(rel->r_info);
ElfW(Addr) offset = rel->r_offset;
int shn_abs = (sym->st_shndx == SHN_ABS) && !is_reloc(S_REL, symname);
+
if (sym->st_shndx == SHN_UNDEF)
return 0;
@@ -900,12 +900,6 @@ static int do_reloc64(struct section *sec, Elf_Rel *rel, ElfW(Sym) *sym,
break;
}
- if (headtext) {
- die("Absolute reference to symbol '%s' not permitted in .head.text\n",
- symname);
- break;
- }
-
/*
* Relocation offsets for 64 bit kernels are output
* as 32 bits and sign extended back to 64 bits when
next prev parent reply other threads:[~2025-01-27 10:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-21 7:28 [GIT PULL] x86/cleanups for v6.14 Ingo Molnar
2025-01-21 7:34 ` Ingo Molnar
2025-01-21 11:31 ` Borislav Petkov
2025-01-21 19:40 ` pr-tracker-bot
2025-01-21 21:29 ` [GIT PULL] x86/boot enhancements " Ingo Molnar
2025-01-24 14:06 ` pr-tracker-bot
2025-01-27 3:18 ` Linus Torvalds
2025-01-27 10:20 ` [PATCH] Revert "x86/boot: Reject absolute references in .head.text Ingo Molnar
2025-01-27 15:54 ` [GIT PULL] x86 fix Ingo Molnar
2025-01-27 17:10 ` Linus Torvalds
2025-01-28 22:19 ` Ingo Molnar
2025-01-28 22:22 ` Ingo Molnar
2025-01-28 22:39 ` pr-tracker-bot
2025-01-27 10:25 ` tip-bot2 for Ingo Molnar [this message]
2025-01-27 11:12 ` [GIT PULL] x86/boot enhancements for v6.14 Ard Biesheuvel
2025-01-27 15:51 ` Ingo Molnar
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=173797353863.31546.14997634746331823035.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=ardb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=torvalds@linux-foundation.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®