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: <20150228192009.GA2727@codeblueprint.co.uk>
Date:	Sat, 28 Feb 2015 19:20:09 +0000
From:	Matt Fleming <matt@...eblueprint.co.uk>
To:	Borislav Petkov <bp@...e.de>
Cc:	"H. Peter Anvin" <hpa@...or.com>,
	Kees Cook <keescook@...omium.org>,
	Jiri Kosina <jkosina@...e.cz>, Ingo Molnar <mingo@...nel.org>,
	Huang Ying <ying.huang@...el.com>,
	LKML <linux-kernel@...r.kernel.org>, LKP ML <lkp@...org>,
	x86-ml <x86@...nel.org>, Dave Young <dyoung@...hat.com>,
	Andy Lutomirski <luto@...capital.net>
Subject: Re: [LKP] [x86/mm/ASLR] f47233c2d34: WARNING: CPU: 0 PID: 1 at
 arch/x86/mm/ioremap.c:63 __ioremap_check_ram+0x445/0x4a0()

On Sat, 28 Feb, at 11:50:49AM, Borislav Petkov wrote:
> 
> Yeah, too many hmms means this still needed staring at to find out what
> exactly the problem is. And the problem is that allocating that struct
> setup_data statically in arch/x86/boot/compressed/aslr.c works only by
> chance, when the kernel decompressing doesn't overwrite that memory.
 
Doing a static allocation is fine, and the memory is even reserved from
being overwritten via memblock_x86_reserve_range_setup_data(), but it
looks like that reservation gets dropped before
get_setup_data_total_num() runs, which is what is causing ioremap() to
complain - it really is usable RAM we're trying to ioremap().

Dropping the reservation looks to happen in memblock_x86_fill(), because
you'll note that we explicitly reserve the boot services regions
immediately after memblock_x86_fill() in setup_arch().

What isn't clear right now is why the ioremap() warning isn't triggering
for a bunch of other callsites that get this wrong, i.e.
pcibios_add_device().

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