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]
Message-ID: <CAE9FiQUF6E3-F-31A7M6qw4ut9wrFfcKOhZ1=0SRwAQYD3QV+A@mail.gmail.com>
Date:	Sun, 15 Mar 2015 10:02:40 -0700
From:	Yinghai Lu <yinghai@...nel.org>
To:	Minfei Huang <mhuang@...hat.com>
Cc:	"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
	Kees Cook <keescook@...omium.org>,
	Borislav Petkov <bp@...e.de>, Baoquan He <bhe@...hat.com>,
	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 5:18 AM, Minfei Huang <mhuang@...hat.com> wrote:
> On 03/15/15 at 12:49am, Yinghai Lu wrote:
> It confuses me with the virtual address in function parse_kaslr_setup.
> When we are in here(parse_kaslr_setup), we already use the virtual
> address, instead of physical address. Is it all right?

setup_data is using physical address to have linked list.

we have setup_arch==>parse_setup_data(), that is way before
init_mem_mapping() to have final kernel mapping setup yet.

For 64bit, we may use virtual address with help of early mapping with
#PF handler.
But 32bit, we don't have that.

So just use early_memmap to get virtual address to access the value.

>
> In the other words, using physical address in parse_kaslr_setup is
> always a mistake, whatever the kaslr is on or off.
>

The problem is: old code just use physical address as value.

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