From: "Ard Biesheuvel" <ardb@kernel.org>
To: "Catalin Marinas" <catalin.marinas@arm.com>,
"Ard Biesheuvel" <ardb+git@google.com>
Cc: linux-arm-kernel@lists.infradead.org,
"Will Deacon" <will@kernel.org>,
llvm@lists.linux.dev, "Arnd Bergmann" <arnd@arndb.de>,
"kernel test robot" <lkp@intel.com>
Subject: Re: [PATCH] arm64: Fix transient negative image size observed by the linker
Date: Tue, 01 Dec 2026 14:50:15 +0100 [thread overview]
Message-ID: <638a6732-47e1-4efd-868d-53e13eaec4ec@app.fastmail.com> (raw)
In-Reply-To: <7ef4ec68-6fee-477c-a270-a3a0eae7bf50@app.fastmail.com>
On Tue, 1 Dec 2026, at 14:29, Ard Biesheuvel wrote:
> On Tue, 1 Dec 2026, at 14:17, Catalin Marinas wrote:
>> Hi Ard,
>>
>> On Mon, Nov 30, 2026 at 06:51:22PM +0100, Ard Biesheuvel wrote:
>>> From: Ard Biesheuvel <ardb@kernel.org>
>>>
>>> LLD occasionally errors out with a mysterious 'assignment to symbol foo
>>> does not converge', usually with a 16k page size kernel config.
>>>
>>> This turns out to be caused by the evaluation of the SPAN_NR_ENTRIES()
>>> macro using a preliminary value for _end that is below KIMAGE_VADDR,
>>> resulting in the difference to become negative. Subsequent passes
>>> usually recover from this, but not always, hence the config-dependent
>>> error.
>>>
>>> So ensure that SPAN_NR_ENTRIES() returns 1 for spans where the end
>>> address is smaller than or equal to the start address. This never
>>> occurs on the linker passes that matter, but prevents the iterative
>>> algorithm that LLD implements from diverging.
>>>
>>> This reverts commit dc0a08394804 ("arm64: Work around convergence
>>> issue with LLD linker"), which is superseded by this change.
>>>
>>> Reported-by: kernel test robot <lkp@intel.com>
>>> Closes: https://lore.kernel.org/oe-kbuild-all/20261129124345.eiR8unSx-lkp@intel.com/
>>
>> Is this happening with your efi-zboot-elf branch only or mainline as
>> well? If the latter, we'd need a Fixes tag and cc stable. I'm not sure
>> what Arnd tested on.
>>
>> Your branch moves the INIT_IDMAP_DIR_SIZE and INIT_DIR_SIZE reservations
>> inside the sections and they depend on _end. IIUC, they become part of
>> the section size and moving '.' backwards is an error. I found another
>> report on your branch, not sure it's related but it looks like it's
>> caused by wrapped values:
>>
>> https://lore.kernel.org/all/20261120005637.8iy6yHZU-lkp@intel.com/
>>
>
> That just happens to be the branch where it was found this time, but
> it is not related to any of those changes.
>
> Arnd's testing should be entirely unrelated to any of this.
>
I double checked: the randconfig from the linked report fails in a
similar way with v7.4-rc1 (but on a different symbol)
ld.lld-22: error: address (0xfffffff882fb4000) of section '.init.data' does not converge
ld.lld-22: error: assignment to symbol __init_end does not converge
next prev parent reply other threads:[~2026-12-01 13:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 17:51 [PATCH] arm64: Fix transient negative image size observed by the linker Ard Biesheuvel
2026-12-01 8:52 ` Arnd Bergmann
2026-12-01 13:17 ` Catalin Marinas
2026-12-01 13:29 ` Ard Biesheuvel
2026-12-01 13:50 ` Ard Biesheuvel [this message]
2026-12-01 14:14 ` Catalin Marinas
2026-12-01 14:26 ` Ard Biesheuvel
2026-12-01 14:13 ` Catalin Marinas
2026-12-01 14:19 ` Catalin Marinas
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=638a6732-47e1-4efd-868d-53e13eaec4ec@app.fastmail.com \
--to=ardb@kernel.org \
--cc=ardb+git@google.com \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=will@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