From: Mark Rutland <mark.rutland@arm.com>
To: "Mohan Rao .vanimina" <mailtoc.mohanrao@gmail.com>
Cc: Robin Murphy <robin.murphy@arm.com>,
linux-arm-kernel@lists.infradead.org,
Sami Tolvanen <samitolvanen@google.com>,
Kees Cook <keescook@chromium.org>,
Nathan Chancellor <nathan@kernel.org>,
Will Deacon <will@kernel.org>
Subject: Re: linker script /arch/arm64/kernel/vmlinux.lds build error
Date: Tue, 20 Sep 2022 13:20:27 +0100 [thread overview]
Message-ID: <YymwCxtUNclGDxyZ@FVFF77S0Q05N> (raw)
In-Reply-To: <CAL_GTzj3k-QG8_XCaXb2ntFydue=SabWAr53onSmOqtkL=r8Ag@mail.gmail.com>
On Thu, Sep 15, 2022 at 09:10:45PM +0530, Mohan Rao .vanimina wrote:
> Thanks for the info. Sorry for this delay in the response.
> As suggested I have modified the PAGE SIZE granularity from
> ARM64_4K_PAGES to ARM64_64K_PAGES in the applicable config file but
> still the build is failing with the same linker error.
> Kindly note that the build compilation is successful for the case of
> when configuring PAGE size to ARM64_16K_PAGES. Though there is some
> issue that the device is crashing at bootup itself, compilation was
> getting through without any issues for ARM64_16K_PAGES.
> I wonder why the ARM64_64K_PAGES scenario is failing, there must be
> some sanity checks at the build integration(kernel build tests) that
> would have been caught this linker build issue if indeed it's really a
> bug or failed due to some in-complete change.
Since you're using LTO, your config is clearly divergent from defconfig; if you
could share your config it would help a lot.
I suspect what's happening here is exactly what the linker error describes:
you're building a config without a PMD level (e.g. 64K pages with 42-bit VAs),
but there's some code that blindly assumes the PMD level exists and depends on
the non-existent PMD_SIZE definition.
I suspect you've enabled CFI_CLANG, and the TEXT_CFI_JT section in the linker
script, which would explain the problem.
I don't understand why that's aligned to anything more than an instruction
boundary to begin with. I don't see why it would need to be aligned to 2MB with
4K pages, nor with 512MB with 64K pages.
Sami, Kees, Nathan, any idea on where this alignment came from?
Will had mentioned this in passing before as bloating the kernel Image size,
but I hadn't realsied this also caused a build failure until now.
Thanks,
Mark.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-09-20 12:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-06 18:13 linker script /arch/arm64/kernel/vmlinux.lds build error Mohan Rao .vanimina
2022-09-07 10:30 ` Robin Murphy
2022-09-15 15:40 ` Mohan Rao .vanimina
2022-09-20 12:20 ` Mark Rutland [this message]
2022-09-20 15:06 ` Sami Tolvanen
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=YymwCxtUNclGDxyZ@FVFF77S0Q05N \
--to=mark.rutland@arm.com \
--cc=keescook@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mailtoc.mohanrao@gmail.com \
--cc=nathan@kernel.org \
--cc=robin.murphy@arm.com \
--cc=samitolvanen@google.com \
--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