• [SECURITY PATCH 108/117] util/mkimage: Refactor section setup to us

    From John Paul Adrian Glaubitz@21:1/5 to Daniel Kiper on Thu Mar 18 09:40:01 2021
    Hi!

    On 3/2/21 7:01 PM, Daniel Kiper wrote:
    From: Peter Jones <pjones@redhat.com>

    Add a init_pe_section() helper function to setup PE sections. This makes
    the code simpler and easier to read.

    Signed-off-by: Peter Jones <pjones@redhat.com>
    Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
    Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>

    This change broke GRUB on ia64 for me. It now fails to perform any basic commands:

    Loading.: grub
    Starting: grub
    Welcome to GRUB!
    error: unknown filesystem.
    Entering rescue mode...
    grub rescue> insmod ext2
    error: unknown filesystem.
    grub rescue> help
    Unknown command `help'.
    grub rescue> ?
    Unknown command `?'.
    grub rescue> linux
    Unknown command `linux'.
    grub rescue>

    Adrian

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer - glaubitz@debian.org
    `. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Paul Adrian Glaubitz@21:1/5 to John Paul Adrian Glaubitz on Sat Mar 20 16:10:01 2021
    On 3/20/21 4:05 PM, John Paul Adrian Glaubitz wrote:
    However, the modules are still located at the same address in memory which is why
    the module loader can no longer find them.

    And the new address where the loader is looking for the modules is located at 0x39000
    but the modules are still located at 0x384E0. Thus, mkimage should be patched to move
    the modules to 39000 so that the loader can find them.

    Adrian

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer - glaubitz@debian.org
    `. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Paul Adrian Glaubitz@21:1/5 to John Paul Adrian Glaubitz on Tue Mar 23 20:20:01 2021
    Hello!

    On 3/18/21 9:38 AM, John Paul Adrian Glaubitz wrote:
    On 3/2/21 7:01 PM, Daniel Kiper wrote:
    From: Peter Jones <pjones@redhat.com>

    Add a init_pe_section() helper function to setup PE sections. This makes
    the code simpler and easier to read.

    Signed-off-by: Peter Jones <pjones@redhat.com>
    Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
    Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>

    This change broke GRUB on ia64 for me. It now fails to perform any basic commands:

    Any chance someone could have a look at this? As explained in the follow-up mails,
    the problem is that the pointer pointing to the modules location in the core image
    deviate from the actual modules location as the former was updated but the former
    not.

    Adrian

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer - glaubitz@debian.org
    `. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Paul Adrian Glaubitz@21:1/5 to Daniel Kiper on Tue Mar 23 21:40:01 2021
    Hi Daniel!

    On 3/23/21 8:35 PM, Daniel Kiper wrote:
    Any chance someone could have a look at this? As explained in the follow-up mails,
    the problem is that the pointer pointing to the modules location in the core image
    deviate from the actual modules location as the former was updated but the former
    not.

    I chatted about that with Javier yesterday. He told me he will take
    a look at the issue...

    Great, thanks.

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer - glaubitz@debian.org
    `. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)