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]
Date:	Sun, 15 Mar 2015 22:04:53 -0700
From:	Yinghai Lu <yinghai@...nel.org>
To:	Baoquan He <bhe@...hat.com>
Cc:	"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
	Kees Cook <keescook@...omium.org>,
	Borislav Petkov <bp@...e.de>,
	Thomas Gleixner <tglx@...utronix.de>,
	Jiri Kosina <jkosina@...e.cz>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Matt Fleming <matt.fleming@...el.com>
Subject: Re: [PATCH v4] x86, kaslr: Access the correct kaslr_enabled variable

On Sun, Mar 15, 2015 at 8:28 PM, Baoquan He <bhe@...hat.com> wrote:
> On 03/15/15 at 12:49am, Yinghai Lu wrote:
>
> It's good to check the ret value as Boris suggested. However it could
> fail since early_memremap self fail, e.g slot not found. In this case
> making kaslr_enabled true may not be good.

It should not fail. we always follow map/access/unmap. and sometime
would have two for copying between them.

>
> As Minfei talked with you kaslr_setup_data is a global variable inside
> kernel code, it has been ident mapped. Just derefencing the physical
> address which is virtual address too and getting the real stored value
> may be safer.

No.
That ident mapping is set in arch/x86/kernel/head_64.S and it
is only for switchover. and it is gone when
arch/x86/kernel/head64.c::x86_64_start_kernel/reset_early_page_tables
is called.

That reset_early_page_tables will only keep kernel high mapping
and clear all other.

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