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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200601105437.GS1195@Air-de-Roger>
Date:   Mon, 1 Jun 2020 12:54:37 +0200
From:   Roger Pau Monné <roger.pau@...rix.com>
To:     Daniel Kiper <daniel.kiper@...cle.com>
CC:     <grub-devel@....org>, <linux-kernel@...r.kernel.org>,
        <trenchboot-devel@...glegroups.com>, <x86@...nel.org>,
        <xen-devel@...ts.xenproject.org>, <michal.zygowski@...eb.com>,
        <eric.snowberg@...cle.com>, <mtottenh@...mai.com>,
        <ard.biesheuvel@...aro.org>, <dpsmith@...rtussolutions.com>,
        <andrew.cooper3@...rix.com>, <konrad.wilk@...cle.com>,
        <phcoder@...il.com>, <javierm@...hat.com>, <mjg59@...gle.com>,
        <alexander.burmashev@...cle.com>, <krystian.hebel@...eb.com>,
        <kanth.ghatraju@...cle.com>, <lukasz.hawrylko@...ux.intel.com>,
        <ross.philipson@...cle.com>, <hpa@...or.com>, <leif@...iainc.com>,
        <pjones@...hat.com>, <alec.brown@...cle.com>,
        <piotr.krol@...eb.com>
Subject: Re: [BOOTLOADER SPECIFICATION RFC] The bootloader log format for
 TrenchBoot and others

On Fri, May 29, 2020 at 01:27:35PM +0200, Daniel Kiper wrote:
> Hey,
> 
> Below you can find my rough idea of the bootloader log format which is
> generic thing but initially will be used for TrenchBoot work. I discussed
> this proposal with Ross and Daniel S. So, the idea went through initial
> sanitization. Now I would like to take feedback from other folks too.
> So, please take a look and complain...
> 
> In general we want to pass the messages produced by the bootloader to the OS
> kernel and finally to the userspace for further processing and analysis. Below
> is the description of the structures which will be used for this thing.
> 
>   struct bootloader_log_msgs
>   {
>     grub_uint32_t level;
>     grub_uint32_t facility;

Nit: if this is aimed at cross-OS and cross-bootloader compatibility
uint32_t should be used here instead of a grub specific alias.

>     char type[];
>     char msg[];

I think you want char * here instead? Or are the above arrays expected
to have a fixed size in the final spec?

>   }
> 
>   struct bootloader_log
>   {
>     grub_uint32_t version;
>     grub_uint32_t producer;
>     grub_uint32_t size;
>     grub_uint32_t next_off;
>     bootloader_log_msgs msgs[];

As I understand it this is not a pointer to an array of
bootloader_log_msgs but rather in-place?

>   }
> 
> The members of struct bootloader_log:
>   - version: the bootloader log format version number, 1 for now,
>   - producer: the producer/bootloader type; we can steal some values from
>     linux/Documentation/x86/boot.rst:type_of_loader,
>   - size: total size of the log buffer including the bootloader_log struct,
>   - next_off: offset in bytes, from start of the bootloader_log struct,
>     of the next byte after the last log message in the msgs[];
>     i.e. the offset of the next available log message slot,

So this will be a memory area that's shared between the OS and the
bootloader and needs to be updated at runtime?

If this is something that's created by the bootloader during loading
and passed to the OS for consumption (but it's not further updated), I
don't see much point in the next_off field. The size field could be
updated to reflect the actual size of the produced messages?

Roger.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ