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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 3 Jun 2022 12:08:35 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     WANG Xuerui <kernel@...0n.name>
Cc:     Xi Ruoyao <xry111@...111.site>, Ard Biesheuvel <ardb@...nel.org>,
        Huacai Chen <chenhuacai@...ngson.cn>,
        linux-arch <linux-arch@...r.kernel.org>,
        "open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Xuefeng Li <lixuefeng@...ngson.cn>,
        Yanteng Si <siyanteng@...ngson.cn>,
        Huacai Chen <chenhuacai@...il.com>,
        Guo Ren <guoren@...nel.org>,
        Jiaxun Yang <jiaxun.yang@...goat.com>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        linux-efi <linux-efi@...r.kernel.org>,
        WANG Xuerui <git@...0n.name>, Yun Liu <liuyun@...ngson.cn>,
        Jonathan Corbet <corbet@....net>,
        Arnd Bergmann <arnd@...db.de>,
        Andy Lutomirski <luto@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Peter Zijlstra <peterz@...radead.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        David Airlie <airlied@...ux.ie>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: Steps forward for the LoongArch UEFI bringup patch? (was: Re:
 [PATCH V14 11/24] LoongArch: Add boot and setup routines)

On Fri, Jun 3, 2022 at 11:48 AM WANG Xuerui <kernel@...0n.name> wrote:
> On 6/3/22 17:32, Xi Ruoyao wrote:
> > On Thu, 2022-06-02 at 22:09 +0800, WANG Xuerui wrote:
> >
> > old firmware -> bootloongarch.efi -> customized u-boot -> bootloongarch64.efi (grub) -> efi stub (kernel)
> >                  --------- compatibility layer --------    ^^^^^^^^ normal UEFI compatible stuff ^^^^^^^^^
> >
> > new firmware -> bootloongarch64.efi (grub) -> efi stub (kernel)
> >
> > The old firmware route would be similar to the booting procedure of
> > Asahi Linux.  I think this can be implemented because it's already
> > implemented on M1 even while Apple is almost completely uncooperative.

It should be a little easier here, as the firmware can already boot a version
of grub from disk. I would hope that there could simply be two different
file names for the grub executable, with the existing firmware booting
an old image, and new firmware looking for a different file name first,
which would contain a regular EFI executable (grub, kernel or anything
else). If either of the two versions of grub gets loaded by the firmware,
that should then be able to boot a modern kernel through efistub.

> This is a bit off-topic (we're basically hurrying up to get the port
> into v5.19-rc1 and discussing ways to achieve that), but yeah
> definitely. I've had the same idea right after knowing the LoongArch
> firmware would also have "new-world" variant, then I contacted some
> firmware engineers working on LoongArch boards, I think they agreed on
> the approach overall.
>
> However, making the kernel itself capable of booting on both BPI and
> new-world UEFI firmware flavors may have its merits after all; one
> scenario I could come up with is that user reboots and upgrades their
> firmware, *before* updating their old-world kernel, and bang! system
> soft-bricked. All such cases involve old-world distros that already
> deviate a little bit from vanilla upstream code, so such BPI support
> needn't be mainlined for avoiding this scenario.

The problem here is that this is very hard to ever get rid of. If
having the compatibility layer in grub works, I think that is better
for the long run.

        Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ