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>] [day] [month] [year] [list]
Message-ID: <20181225095107.GA100072@gmail.com>
Date:   Tue, 25 Dec 2018 10:51:07 +0100
From:   Ingo Molnar <mingo@...nel.org>
To:     "Prakhya, Sai Praneeth" <sai.praneeth.prakhya@...el.com>
Cc:     Ard Biesheuvel <ard.biesheuvel@...aro.org>,
        linux-efi <linux-efi@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        the arch/x86 maintainers <x86@...nel.org>,
        Borislav Petkov <bp@...en8.de>,
        Andy Lutomirski <luto@...nel.org>,
        "Hansen, Dave" <dave.hansen@...el.com>,
        Bhupesh Sharma <bhsharma@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] x86/efi: Don't unmap EFI boot services code/data regions
 for EFI_OLD_MEMMAP and EFI_MIXED_MODE


* Prakhya, Sai Praneeth <sai.praneeth.prakhya@...el.com> wrote:

> > > > +     /*
> > > > +      * To Do: Remove this check after adding functionality to unmap EFI
> > boot
> > > > +      * services code/data regions from direct mapping area because
> > > > +      * "efi=old_map" maps EFI regions in swapper_pg_dir.
> > > > +      */
> > > > +     if (efi_enabled(EFI_OLD_MEMMAP))
> > > > +             return;
> > > > +
> > > > +     /*
> > > > +      * EFI mixed mode has all RAM mapped to access arguments while
> > making
> > > > +      * EFI runtime calls, hence don't unmap EFI boot services code/data
> > > > +      * regions.
> > > > +      */
> > > > +     if (!efi_is_native() && IS_ENABLED(CONFIG_EFI_MIXED))
> > 
> > AFAIK efi_is_native() can only return false is CONFIG_EFI_MIXED is set, so this
> > expression can be simplified.
> 
> Makes sense.
> efi_is_native() returns true for 32-bit machines running 32-bit firmware.

Forgot to mention that I performed this simplification in the commit I 
applied:

+       /*
+        * To Do: Remove this check after adding functionality to unmap EFI boot
+        * services code/data regions from direct mapping area because
+        * "efi=old_map" maps EFI regions in swapper_pg_dir.
+        */
+       if (efi_enabled(EFI_OLD_MEMMAP))
+               return;
+
+       /*
+        * EFI mixed mode has all RAM mapped to access arguments while making
+        * EFI runtime calls, hence don't unmap EFI boot services code/data
+        * regions.
+        */
+       if (!efi_is_native())
+               return;

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ