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]
Date:	Tue, 3 Mar 2015 00:45:00 -0800
From:	Yinghai Lu <yinghai@...nel.org>
To:	Baoquan He <bhe@...hat.com>
Cc:	"H. Peter Anvin" <hpa@...or.com>,
	Kees Cook <keescook@...omium.org>,
	Vivek Goyal <vgoyal@...hat.com>,
	Andy Lutomirski <luto@...capital.net>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 7/9] get the random phy addr according to slot_area info

On Mon, Mar 2, 2015 at 6:58 AM, Baoquan He <bhe@...hat.com> wrote:
> Now random value can be used to get related slot info stored in
> slot_area, mainly use slot_area.num to position which slot is target.
> With this slot its starting address is returned as the physical
> address where kernel will put.
>
> @@ -362,7 +364,7 @@ repeat:
>         goto repeat;
>  }
>
> -static unsigned long find_random_addr(unsigned long minimum,
> +static unsigned long find_random_phy_addr(unsigned long minimum,
>                                       unsigned long size)

You forgot to change calling name.

got:

arch/x86/boot/compressed/aslr.o: In function `choose_kernel_location':
aslr.c:(.text+0x163): undefined reference to `find_random_addr'
make[2]: *** [arch/x86/boot/compressed/vmlinux] Error 1
make[1]: *** [arch/x86/boot/compressed/vmlinux] Error 2

Please make the patch set bisect-able.

after fixing that, on the system with 4G ram: i got:

early console in decompress_kernel
KASLR using RDTSC...
decompress_kernel:
  input: [0x13f5ed3b4-0x13ff6a64b], output: 0x153000000, heap:
[0x13ff76000-0x13ff7dfff]

Decompressing Linux... xz...

XZ-compressed data is corrupt


without the patch, I have:

early console in decompress_kernel
KASLR could not find suitable E820 region...
decompress_kernel:
  input: [0x13f5ee3b4-0x13ff6b64b], output: 0x13cc00000, heap:
[0x13ff76000-0x13ff7dfff]

Decompressing Linux... xz... Parsing ELF... done.
...
[    0.016848] e820: BIOS-provided physical RAM map (sanitized by setup):
[    0.018854] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[    0.020982] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
[    0.023166] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[    0.025783] BIOS-e820: [mem 0x0000000000100000-0x00000000bffdffff] usable
[    0.027901] BIOS-e820: [mem 0x00000000bffe0000-0x00000000bfffffff] reserved
[    0.030079] BIOS-e820: [mem 0x00000000feffc000-0x00000000feffffff] reserved
[    0.032252] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
[    0.034437] BIOS-e820: [mem 0x0000000100000000-0x000000013fffffff] usable

so you code now select range that is out of boundary to non ram area.

Thanks

Yinghai
--
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