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] [day] [month] [year] [list]
Date:	Sat, 10 Oct 2015 21:36:17 +0100
From:	Matt Fleming <matt@...eblueprint.co.uk>
To:	Taku Izumi <izumi.taku@...fujitsu.com>
Cc:	linux-kernel@...r.kernel.org, linux-efi@...r.kernel.org,
	x86@...nel.org, matt.fleming@...el.com, tglx@...utronix.de,
	mingo@...hat.com, hpa@...or.com, tony.luck@...el.com,
	qiuxishi@...wei.com, kamezawa.hiroyu@...fujitsu.com,
	ard.biesheuvel@...aro.org
Subject: Re: [PATCH 2/2] x86, efi: Add "efi_fake_mem" boot option

On Wed, 30 Sep, at 11:01:56PM, Taku Izumi wrote:
> This patch introduces new boot option named "efi_fake_mem".
> By specifying this parameter, you can add arbitrary attribute
> to specific memory range.
> This is useful for debugging of Address Range Mirroring feature.
> 
> For example, if "efi_fake_mem=2G@4G:0x10000,2G@...0a0000000:0x10000"
> is specified, the original (firmware provided) EFI memmap will be
> updated so that the specified memory regions have
> EFI_MEMORY_MORE_RELIABLE attribute (0x10000):
> 
>  <original>
>    efi: mem36: [Conventional Memory|  |  |  |  |  |   |WB|WT|WC|UC] range=[0x0000000100000000-0x00000020a0000000) (129536MB)
> 
>  <updated>
>    efi: mem36: [Conventional Memory|  |MR|  |  |  |   |WB|WT|WC|UC] range=[0x0000000100000000-0x0000000180000000) (2048MB)
>    efi: mem37: [Conventional Memory|  |  |  |  |  |   |WB|WT|WC|UC] range=[0x0000000180000000-0x00000010a0000000) (61952MB)
>    efi: mem38: [Conventional Memory|  |MR|  |  |  |   |WB|WT|WC|UC] range=[0x00000010a0000000-0x0000001120000000) (2048MB)
>    efi: mem39: [Conventional Memory|  |  |  |  |  |   |WB|WT|WC|UC] range=[0x0000001120000000-0x00000020a0000000) (63488MB)
> 
> And you will find that the following message is output:
> 
>    efi: Memory: 4096M/131455M mirrored memory
> 
> Signed-off-by: Taku Izumi <izumi.taku@...fujitsu.com>
> ---
>  Documentation/kernel-parameters.txt |  15 +++
>  arch/x86/kernel/setup.c             |   4 +-
>  drivers/firmware/efi/Kconfig        |  22 ++++
>  drivers/firmware/efi/Makefile       |   1 +
>  drivers/firmware/efi/fake_mem.c     | 238 ++++++++++++++++++++++++++++++++++++
>  include/linux/efi.h                 |   6 +
>  6 files changed, 285 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/firmware/efi/fake_mem.c
 
Looks good to me! I've queued this up with one minor change...

> +config EFI_MAX_FAKE_MEM
> +	int "maximum allowable number of ranges in efi_fake_mem boot option"
> +	depends on EFI && X86 && EFI_FAKE_MEMMAP

We can simplify this depends line since EFI_FAKE_MEMMAP itself is
dependent on EFI and X86, and we should use that level of indirection
to our advantage to save updating this line if/when arm64 support is
added.

-- 
Matt Fleming, Intel Open Source Technology Center
--
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