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]
Message-ID: <4de3e0c2-7b59-c325-8d88-58220d721f71@intel.com>
Date:   Mon, 16 Sep 2019 07:25:48 -0700
From:   Dave Hansen <dave.hansen@...el.com>
To:     "Kirill A. Shutemov" <kirill@...temov.name>,
        Steve Wahl <steve.wahl@....com>,
        Dave Hansen <dave.hansen@...ux.intel.com>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        Juergen Gross <jgross@...e.com>,
        Brijesh Singh <brijesh.singh@....com>,
        Jordan Borgner <mail@...dan-borgner.de>,
        Feng Tang <feng.tang@...el.com>, linux-kernel@...r.kernel.org,
        Baoquan He <bhe@...hat.com>, russ.anderson@....com,
        dimitri.sivanich@....com, mike.travis@....com
Subject: Re: [PATCH] x86/boot/64: Make level2_kernel_pgt pages invalid outside
 kernel area.

On 9/16/19 2:00 AM, Kirill A. Shutemov wrote:
>>> I think we also need to make it clear that this is workaround for a broken
>>> hardware: speculative execution must not trigger a halt.
>> I think the word broken is a bit loaded here.  According to the UEFI
>> spec (version 2.8, page 167), "Regions that are backed by the physical
>> hardware, but are not supposed to be accessed by the OS, must be
>> returned as EfiReservedMemoryType."  Our interpretation is that
>> includes speculative accesses.
> +Dave.
> 
> I don't think it is. Speculative access is done by hardware, not OS.
> 
> BTW, isn't it a BIOS issue?
> 
> I believe it should have a way to hide a range of physical address space
> from OS or force a caching mode on to exclude it from speculative
> execution. Like setup MTRRs or something.

Ugh.  I bet that was a fun one to chase down.  Have the hardware
engineers learned a lesson or are they hiding behind the EFI spec in an
act of pure cowardice? ;)

The patch is small and fixes a real problem.  The changelog is OK,
although I'd prefer some differentiation between "occupied by the
kernel" and the kernel *image*.  The code is also gloriously free of any
comments about what it's doing or why.

But, I'm left with lots of questions:

Why do PMD-level changes fix this?  Is it because we 2MB pad the kernel
image?  Why can't we still get within 2MB of the memory address in
question?  Is it in the lower 1MB, by chance?  If this is all about
avoiding EFI reserved ranges, why doesn't the patch *LOOK* At EFI
reserved ranges?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ