linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@nbd.name>
To: Ard Biesheuvel <ardb@kernel.org>, Arnd Bergmann <arnd@arndb.de>
Cc: "Bert Vermeulen" <bert@biot.com>,
	DTML <devicetree@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Linux ARM" <linux-arm-kernel@lists.infradead.org>,
	"Russell King" <linux@armlinux.org.uk>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Anshuman Khandual" <anshuman.khandual@arm.com>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski@canonical.com>,
	"John Crispin" <john@phrozen.org>,
	"YiFei Zhu" <yifeifz2@illinois.edu>,
	"Mike Rapoport" <rppt@kernel.org>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Nick Desaulniers" <ndesaulniers@google.com>,
	"Kees Cook" <keescook@chromium.org>,
	"Masahiro Yamada" <masahiroy@kernel.org>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Viresh Kumar" <viresh.kumar@linaro.org>
Subject: Re: [PATCH 4/5] ARM: Add basic support for EcoNet EN7523 SoC
Date: Fri, 3 Sep 2021 18:20:23 +0200	[thread overview]
Message-ID: <7d3e2c5b-931c-1f82-77a3-fc51268f1986@nbd.name> (raw)
In-Reply-To: <CAMj1kXFK+HoouMMBbHxEgm-zQqKa6QMS6keeZmhpXTc4FCy8fQ@mail.gmail.com>


On 2021-08-01 18:44, Ard Biesheuvel wrote:
> On Fri, 30 Jul 2021 at 16:48, Arnd Bergmann <arnd@arndb.de> wrote:
>>
>> Why is this needed?
>>
>> Note also the comment directly above it exlaining
>> # Text offset. This list is sorted numerically by address in order to
>> # provide a means to avoid/resolve conflicts in multi-arch kernels.
>>
> 
> Yes, please drop this - it is a horrible hack and it's already quite
> disappointing that we are stuck with it for the foreseeable future.
> 
> So I assume the purpose of this is to protect the first 128k of DRAM
> to be protected from being overwritten by the decompressor?
> 
> It would be best to move this reserved region elsewhere, but I can
> understand that this is no longer an option. So the alternatives are
> - omit this window from the /memory node, and rely on Geert's recent
> decompressor changes which make it discover the usable memory from the
> DT, or
> - better would be to use a /memreserve/ here (which you may already
> have?), and teach the newly added decompressor code to take those into
> account when choosing the target window for decompressing the kernel.
I looked into this issue myself and found that this approach has a
significant drawback: 2 MiB of RAM is permanently wasted for something
that only needs to be preserved during boot time.

If the first 256 or 512 KiB of RAM are reserved in the decompressor, it
means that the first 2 MiB need to be reserved, because that's the
granularity for the kernel page mapping when the MMU is turned on.

If we reserve it, we also need to need to take it out of the physical
RAM address range, so there's no way to reclaim it later.

On the other hand, with the simple textofs solution, I believe it gets
freed in a late initcall, making it usable.

So what's the right approach to deal with this?

- Felix

  reply	other threads:[~2021-09-03 16:20 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30 13:45 [PATCH 0/4] Add support for EcoNet EN7523 SoC Bert Vermeulen
2021-07-30 13:45 ` [PATCH 1/5] dt-bindings: Add vendor prefix for EcoNet Bert Vermeulen
2021-08-06 21:02   ` Rob Herring
2021-07-30 13:45 ` [PATCH 2/5] dt-bindings: arm: econet: Add binding for EN7523 SoC and EVB Bert Vermeulen
2021-08-06 21:04   ` Rob Herring
2021-07-30 13:45 ` [PATCH 3/5] ARM: dts: Add basic support for EcoNet EN7523 Bert Vermeulen
2021-07-30 14:31   ` Linus Walleij
     [not found]     ` <87y29n26po.wl-maz@kernel.org>
2021-08-01  9:07       ` Bert Vermeulen
2021-08-01  9:40         ` Arnd Bergmann
2021-07-30 14:45   ` Daniel Palmer
2021-07-30 14:46   ` Mark Rutland
2021-08-04 16:41     ` Bert Vermeulen
2021-08-06 20:59       ` Rob Herring
2021-07-30 14:59   ` Mark Rutland
2021-08-06 20:52     ` Rob Herring
2021-07-30 16:47   ` Andre Przywara
2021-07-30 13:45 ` [PATCH 4/5] ARM: Add basic support for EcoNet EN7523 SoC Bert Vermeulen
2021-07-30 14:48   ` Arnd Bergmann
2021-07-30 15:15     ` John Crispin
2021-07-30 16:55       ` Arnd Bergmann
2021-08-01 16:44     ` Ard Biesheuvel
2021-09-03 16:20       ` Felix Fietkau [this message]
2021-09-03 17:47         ` Ard Biesheuvel
2021-08-04 16:43     ` Bert Vermeulen
2021-08-09 12:46       ` Geert Uytterhoeven
2021-08-09 12:49         ` Ard Biesheuvel
2021-08-09 13:00         ` Bert Vermeulen
2021-07-30 13:45 ` [PATCH 5/5] ARM: multi_v7_defconfig: Add " Bert Vermeulen
2021-07-30 14:26 ` [PATCH 0/4] " Linus Walleij

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=7d3e2c5b-931c-1f82-77a3-fc51268f1986@nbd.name \
    --to=nbd@nbd.name \
    --cc=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=bert@biot.com \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=john@phrozen.org \
    --cc=keescook@chromium.org \
    --cc=krzysztof.kozlowski@canonical.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=masahiroy@kernel.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=rppt@kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=viresh.kumar@linaro.org \
    --cc=yifeifz2@illinois.edu \
    /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).