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:   Thu, 23 Dec 2021 22:04:24 +0800
From:   Chen Yu <yu.c.chen@...el.com>
To:     "Rafael J. Wysocki" <rafael@...nel.org>
Cc:     ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Ard Biesheuvel <ardb@...nel.org>, Len Brown <lenb@...nel.org>,
        Ashok Raj <ashok.raj@...el.com>,
        Andy Shevchenko <andriy.shevchenko@...el.com>,
        Mike Rapoport <rppt@...nel.org>,
        Hongyu Ning <hongyu.ning@...el.com>,
        Aubrey Li <aubrey.li@...el.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v13 2/4] drivers/acpi: Introduce Platform Firmware
 Runtime Update device driver

On Wed, Dec 22, 2021 at 06:23:56PM +0100, Rafael J. Wysocki wrote:
> On Wed, Dec 22, 2021 at 5:32 AM Chen Yu <yu.c.chen@...el.com> wrote:
> >
> > Introduce the pfr_update driver which can be used for Platform Firmware
> > Runtime code injection and driver update [1]. The user is expected to
> > provide the EFI capsule, and pass it to the driver by writing the capsule
> > to a device special file. The capsule is transferred by the driver to the
> > platform firmware with the help of an ACPI _DSM method under the special
> > ACPI Platform Firmware Runtime Update device (INTC1080), and the actual
> > firmware update is carried out by the low-level Management Mode code in
> > the platform firmware.
> >
> > This patch allows certain pieces of the platform firmware to be
> > updated on the fly while the system is running (runtime) without the
> > need to restart it, which is key in the cases when the system needs to
> > be available 100% of the time and it cannot afford the downtime related
> > to restarting it, or when the work carried out by the system is
> > particularly important, so it cannot be interrupted, and it is not
> > practical to wait until it is complete.
> >
> > Link: https://uefi.org/sites/default/files/resources/Intel_MM_OS_Interface_Spec_Rev100.pdf # [1]
> > Cc: Andy Shevchenko <andriy.shevchenko@...el.com>
> > Cc: Ard Biesheuvel <ardb@...nel.org>
> > Cc: Ashok Raj <ashok.raj@...el.com>
> > Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> > Cc: Len Brown <lenb@...nel.org>
> > Cc: Mike Rapoport <rppt@...nel.org>
> > Cc: "Rafael J. Wysocki" <rafael@...nel.org>
> > Tested-by: Hongyu Ning <hongyu.ning@...el.com>
> > Signed-off-by: Chen Yu <yu.c.chen@...el.com>
> > ---
> 
> [cut history]
>
[...] 
> > +static bool applicable_image(const void *data, struct pfru_update_cap_info *cap,
> > +                            struct pfru_device *pfru_dev)
> > +{
> > +       struct pfru_payload_hdr *payload_hdr;
> > +       const efi_capsule_header_t *cap_hdr = data;
> > +       const struct efi_manage_capsule_header *m_hdr;
> > +       const struct efi_manage_capsule_image_header *m_img_hdr;
> > +       const struct efi_image_auth *auth;
> > +       int type, size;
> > +
> > +       /*
> > +        * If the code in the capsule is older than the current
> > +        * firmware code, the update will be rejected by the firmware,
> > +        * so check the version of it upfront without engaging the
> > +        * Management Mode update mechanism which may be costly.
> > +        */
> 
> Since we are worrying so much about engaging the Management Mode in
> vain, it is somewhat inconsistent to only check the firmware version
> information and avoid doing some general sanity checks on the capsule
> image (for example, whether or not the image size value in the header
> is consistent with the image size etc.).
> 
> I'm not asking for another version of this patch, but something like a
> follow-up change adding more sanity checks on top of this series.
>
Ok, I'll sync with specification team and then enhance the sanity check in
a follow-up change.

thanks,
Chenyu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ