linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Randy Dunlap <rdunlap@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>, X86 ML <x86@kernel.org>
Subject: Re: x86_32: CONFIG_PHYSICAL_START problem
Date: Wed, 16 Dec 2020 16:57:37 +0100	[thread overview]
Message-ID: <87ft45spzi.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <82a78e8c-b4e6-3eb7-01e3-286bcbb869e3@infradead.org>

On Sat, Dec 12 2020 at 22:29, Randy Dunlap wrote:
> Little to my knowledge, this came up with
> CONFIG_PHYSICAL_START=0x81000000
...
> I tracked it down to this large value of CONFIG_PHYSICAL_START
> and changed it back to its default value, then the kernel
> built with no problems.
>
> So far I haven't been able to track the chain of values/changes
> that involve PHYSICAL_START, __PAGE_OFFSET, LOAD_OFFSET, etc.

It's convoluted :)

> Anyway, I would like to see PHYSICAL_START limited to some
> acceptable range of values in arch/x86/Kconfig,

Its the combination of CONFIG_PHYSICAL_START and CONFIG_PAGE_OFFSET so
having checks in Kconfig is going to be a challenge.

> or at a minimum, a little bit better error message coming
> from arch/x86/kernel/vmlinux.lds.S:
>
> . = ASSERT((_end - LOAD_OFFSET <= KERNEL_IMAGE_SIZE),
> 	   "kernel image bigger than KERNEL_IMAGE_SIZE");
>
> so maybe:
>
> . = ASSERT((_end - LOAD_OFFSET <= KERNEL_IMAGE_SIZE),
> 	   "kernel image bigger than KERNEL_IMAGE_SIZE or load address is too large");
> (or start address)

Some reasonable error message is definitely due, but we probably can
catch that at the compile stage already once we computed the combined
values. Then we can sanity check those for resonable ranges.

Thanks,

        tglx

      reply	other threads:[~2020-12-16 15:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-13  6:29 x86_32: CONFIG_PHYSICAL_START problem Randy Dunlap
2020-12-16 15:57 ` Thomas Gleixner [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=87ft45spzi.fsf@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.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;
as well as URLs for NNTP newsgroup(s).