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: <20170728095525.y4tuv6aavzfs4ekb@gmail.com>
Date:   Fri, 28 Jul 2017 11:55:25 +0200
From:   Ingo Molnar <mingo@...nel.org>
To:     Matt Fleming <matt@...eblueprint.co.uk>
Cc:     Baoquan He <bhe@...hat.com>, linux-kernel@...r.kernel.org,
        x86@...nel.org, keescook@...omium.org, tglx@...utronix.de,
        hpa@...or.com, izumi.taku@...fujitsu.com, fanc.fnst@...fujitsu.com,
        thgarnie@...gle.com, n-horiguchi@...jp.nec.com
Subject: Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be
 randomized in mirror regions


* Matt Fleming <matt@...eblueprint.co.uk> wrote:

> On Fri, 21 Jul, at 09:19:56PM, Baoquan He wrote:
> >
> > There are places where the efi map is getting and used like this. E.g
> > in efi_high_alloc() of drivers/firmware/efi/libstub/efi-stub-helper.c.
> > EFI developers worry the size of efi_memory_desc_t could not be the same
> > as e->efi_memdesc_size?
> > 
> > Hi Matt,
> > 
> > Could you help have a look at this?
> 
> You're exactly right. The code guards against the size of the
> efi_memory_desc_t struct changing. The UEFI spec says to traverse the
> memory map this way.

This is not obvious and looks pretty ugly as well, and open coded in several 
places.

At minimum we should have an efi_memdesc_ptr(efi, i) wrapper inline (or so) that 
gives us the entry pointer, plus a comment that points out that ->memdesc_size 
might not be equal to sizeof(efi_memory_memdesc_t).

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ