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-next>] [day] [month] [year] [list]
Date:	Tue, 16 Jul 2013 16:32:06 -0700
From:	Andy Lutomirski <luto@...capital.net>
To:	Parag Warudkar <parag.lkml@...il.com>
Cc:	linux-acpi@...r.kernel.org,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Josh Triplett <josh@...htriplett.org>
Subject: Re: [PATCH] BGRT: Don't ioremap if image address is in System RAM
 (was: Re: BGRT Pointer in System RAM)

On Tue, Jul 16, 2013 at 4:23 PM, Parag Warudkar <parag.lkml@...il.com> wrote:
>
> On Jul 16, 2013 6:55 PM, "Andy Lutomirski" <luto@...capital.net> wrote:
>
>> > Ok, so I played around with it a bit and the following patch works
>> > fine on my system. (I.E. image size is reasonable, cat
>> > /sys/firmware/acpi/bgrt/image > img.bmp generates a valid,
>> > non-distorted bitmap, which it did before too, btw as despite of the
>> > ioremap WARN_ON the ioremap seems to succeed if !(is_ram &&
>> > pfn_valid(pfn) && !PageReserved.)
>> >
>>
>> How reliable is this?  That is, is there any guarantee that nothing
>> will have overwritten the image in memory before this code runs?
>>
> From the little digging I did, this code runs fairly early in the boot
> process, right after ACPI acquires all tables. If I am not mistaken it runs
> as part of efi_late_init which should be before efi_free_boot_services() is
> called.
>
> Image address on my system is  00000000B2E1B018. At boot EFI prints the
> following -
>
> [    0.000000] efi: mem23: type=4, attr=0xf,
> range=[0x00000000b2c34000-0x00000000b2e5d0
>
> Type=4, again if I am not mistaken is EFI_BOOT_SERVICES_DATA. So all put
> together I think it should be reliable to read off of that address when
> efi-bgrt-init runs, which is before the boot services code and data are
> discarded.

Fair enough.  I leave it to the experts to comment on whether there
should be some explicit check of whether this is
EFI_BOOT_SERVICES_DATA.

FWIW, if my board does indeed have a DWORD-swapped address, it's in
plain old RAM (type=7).

--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ