Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1560995 > unrolled thread
| Started by | Andy Lutomirski <luto@amacapital.net> |
|---|---|
| First post | 2017-01-17 21:40 +0100 |
| Last post | 2017-01-17 21:40 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCHv2 4/5] x86/mm: for MAP_32BIT check in_compat_syscall() instead TIF_ADDR32 Andy Lutomirski <luto@amacapital.net> - 2017-01-17 21:40 +0100
| From | Andy Lutomirski <luto@amacapital.net> |
|---|---|
| Date | 2017-01-17 21:40 +0100 |
| Subject | Re: [PATCHv2 4/5] x86/mm: for MAP_32BIT check in_compat_syscall() instead TIF_ADDR32 |
| Message-ID | <t0IHU-3fQ-7@gated-at.bofh.it> |
On Mon, Jan 16, 2017 at 4:33 AM, Dmitry Safonov <dsafonov@virtuozzo.com> wrote:
> At this momet, logic in arch_get_unmapped_area{,_topdown} for mmaps with
> MAP_32BIT flag checks TIF_ADDR32 which means:
> o if 32-bit ELF changes mode to 64-bit on x86_64 and then tries to
> mmap() with MAP_32BIT it'll result in addr over 4Gb (as default is
> top-down allocation)
> o if 64-bit ELF changes mode to 32-bit and tries mmap() with MAP_32BIT,
> it'll allocate only memory in 1GB space: [0x40000000, 0x80000000).
>
> Fix it by handeling MAP_32BIT in 64-bit syscalls only.
> As a little bonus it'll make thread flag a little less used.
Seems like an improvement. Also, jeez, the mmap code is complicated.
Back to top | Article view | linux.kernel
csiph-web