lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu,  3 Dec 2020 13:19:13 +0100
From:   Geert Uytterhoeven <geert+renesas@...der.be>
To:     Russell King <linux@...linux.org.uk>,
        Nicolas Pitre <nico@...xnic.net>,
        Ard Biesheuvel <ardb@...nel.org>,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        Dmitry Osipenko <digetx@...il.com>,
        Linus Walleij <linus.walleij@...aro.org>
Cc:     Arnd Bergmann <arnd@...db.de>, Eric Miao <eric.miao@...dia.com>,
        Uwe Kleine-K├Ânig 
        <u.kleine-koenig@...gutronix.de>,
        Lukasz Stelmach <l.stelmach@...sung.com>,
        Stephen Boyd <sboyd@...nel.org>,
        Chris Brandt <chris.brandt@...esas.com>,
        linux-arm-kernel@...ts.infradead.org,
        linux-renesas-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
        Geert Uytterhoeven <geert+renesas@...der.be>
Subject: [PATCH v10 0/3] ARM: uncompress: Validate start of physical memory against passed DTB

	Hi all,

Currently, the start address of physical memory is obtained by masking
the program counter with a fixed mask of 0xf8000000.  This mask value
was chosen as a balance between the requirements of different platforms.
However, this does require that the start address of physical memory is
a multiple of 128 MiB, precluding booting Linux on platforms where this
requirement is not fulfilled.

Fix this limitation by validating the masked address against the memory
information in the passed DTB, to support booting Linux on
r7s9210/rza2mevb using the 64 MiB of SDRAM on the RZA2MEVB sub board,
which is located at 0x0C000000 (CS3 space), i.e. not at a multiple of
128 MiB.

Compared to v9[*], the major change is a step back, and only supporting
this on modern systems that pass the DTB explicitly, with improved
validation to avoid regressions.

This has been regression-tested on a variety of boards using a passed or
appended DTB.

Thanks for your comments!

[*] "[PATCH v9] ARM: boot: Validate start of physical memory against DTB"
    (https://lore.kernel.org/r/20200902153606.13652-1-geert+renesas@glider.be)

Geert Uytterhoeven (3):
  ARM: uncompress: Add be32tocpu macro
  ARM: uncompress: Add OF_DT_MAGIC macro
  ARM: uncompress: Validate start of physical memory against passed DTB

 arch/arm/Kconfig                              |   7 +-
 arch/arm/boot/compressed/Makefile             |   5 +-
 .../arm/boot/compressed/fdt_check_mem_start.c | 131 ++++++++++++++++++
 arch/arm/boot/compressed/head.S               |  70 +++++++---
 4 files changed, 187 insertions(+), 26 deletions(-)
 create mode 100644 arch/arm/boot/compressed/fdt_check_mem_start.c

-- 
2.25.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

Powered by blists - more mailing lists