From: Sami Tolvanen <samitolvanen@google.com>
To: Mark Rutland <mark.rutland@arm.com>
Cc: "Mohan Rao .vanimina" <mailtoc.mohanrao@gmail.com>,
Robin Murphy <robin.murphy@arm.com>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
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 08:06:12 -0700 [thread overview]
Message-ID: <CABCJKufrRCb84fafhsR8_fftBLv0_pvufL_ZZieUSTJfhdT+fw@mail.gmail.com> (raw)
In-Reply-To: <YymwCxtUNclGDxyZ@FVFF77S0Q05N>
On Tue, Sep 20, 2022 at 5:20 AM Mark Rutland <mark.rutland@arm.com> wrote:
>
> 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.
This was a leftover from an old x86 series, which was included here by
mistake. Will also asked me about this a couple of weeks ago, I think,
and said he'd send a patch to remove it.
Sami
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2022-09-20 15:08 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
2022-09-20 15:06 ` Sami Tolvanen [this message]
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=CABCJKufrRCb84fafhsR8_fftBLv0_pvufL_ZZieUSTJfhdT+fw@mail.gmail.com \
--to=samitolvanen@google.com \
--cc=keescook@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mailtoc.mohanrao@gmail.com \
--cc=mark.rutland@arm.com \
--cc=nathan@kernel.org \
--cc=robin.murphy@arm.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;
as well as URLs for NNTP newsgroup(s).