[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BLUPR13MB0289005209052E44716FC4A6DFBD0@BLUPR13MB0289.namprd13.prod.outlook.com>
Date: Tue, 18 Dec 2018 09:25:44 +0000
From: Yueyi Li <liyueyi@...e.com>
To: "Markus F.X.J. Oberhumer" <markus@...rhumer.com>,
Kees Cook <keescook@...omium.org>,
richard -rw- weinberger <richard.weinberger@...il.com>
CC: "dsterba@...e.cz" <dsterba@...e.cz>,
Greg KH <gregkh@...uxfoundation.org>, Willy Tarreau <w@....eu>,
Don Bailey <donb@...uritymouse.com>,
Jiri Kosina <jikos@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] lzo: fix ip overrun during compress.
Hi Markus & Kees,
On 2018/12/17 0:56, Markus F.X.J. Oberhumer wrote:
> Yueyi,
>
> if ASLR does indeed exclude the last page (like it should), how do
> you get the invalid (0xfffffffffffff000, 4096) mapping then?
Regarding following code, seems ASLR is align to ARM64_MEMSTART_ALIGN,I
don`t think it will exclude the top 4K address space.
```
if (IS_ENABLED(CONFIG_RANDOMIZE_BASE)) {
extern u16 memstart_offset_seed;
u64 range = linear_region_size -
(bootloader_memory_limit - memblock_start_of_DRAM());
/*
* If the size of the linear region exceeds, by a sufficient
* margin, the size of the region that the available physical
* memory spans, randomize the linear region as well.
*/
if (memstart_offset_seed > 0 && range >= ARM64_MEMSTART_ALIGN) {
range = range / ARM64_MEMSTART_ALIGN + 1;
memstart_addr -= ARM64_MEMSTART_ALIGN *
((range * memstart_offset_seed) >> 16);
}
}
```
Thanks,
Yueyi
Powered by blists - more mailing lists