Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1398286
| From | Andy Lutomirski <luto@amacapital.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Getting rid of dynamic TASK_SIZE (on x86, at least) |
| Date | 2016-05-10 18:10 +0200 |
| Message-ID | <rxios-5TU-57@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Hi all-
I'm trying to get rid of x86's dynamic TASK_SIZE and just redefine it
to TASK_SIZE_MAX. So far, these are the TASK_SIZE users that actually
seem to care about the task in question:
get_unmapped_area. This is used by mmap, mremap, exec, uprobe XOL,
and maybe some other things.
- mmap, mremap, etc: IMO this should check in_compat_syscall, not
TIF_ADDR32. If a 64-bit task does an explicit 32-bit mmap (using int
$0x80, for example), it should get a 32-bit address back.
- xol_add_vma: This one is weird: uprobes really is doing something
behind the task's back, and the addresses need to be consistent with
the address width. I'm not quite sure what to do here.
- exec. This wants to set up mappings that are appropriate for the new task.
My inclination would be add a new 'limit' parameter to all the
get_unmapped_area variants and possible to vm_brk and friends and to
thus push the decision into the callers. For the syscalls, we could
add:
static inline unsigned long this_syscall_addr_limit(void) { return TASK_SIZE; }
and override it on x86.
I'm not super excited to write that patch, though...
--Andy
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Getting rid of dynamic TASK_SIZE (on x86, at least) Andy Lutomirski <luto@amacapital.net> - 2016-05-10 18:10 +0200
Re: Getting rid of dynamic TASK_SIZE (on x86, at least) Cyrill Gorcunov <gorcunov@gmail.com> - 2016-05-10 18:40 +0200
Re: Getting rid of dynamic TASK_SIZE (on x86, at least) Andy Lutomirski <luto@amacapital.net> - 2016-05-10 18:50 +0200
Re: Getting rid of dynamic TASK_SIZE (on x86, at least) Cyrill Gorcunov <gorcunov@gmail.com> - 2016-05-10 19:10 +0200
Re: Getting rid of dynamic TASK_SIZE (on x86, at least) Andy Lutomirski <luto@amacapital.net> - 2016-05-10 19:30 +0200
Re: Getting rid of dynamic TASK_SIZE (on x86, at least) Cyrill Gorcunov <gorcunov@gmail.com> - 2016-05-10 19:50 +0200
Re: Getting rid of dynamic TASK_SIZE (on x86, at least) Andy Lutomirski <luto@amacapital.net> - 2016-05-10 23:20 +0200
Re: Getting rid of dynamic TASK_SIZE (on x86, at least) Cyrill Gorcunov <gorcunov@gmail.com> - 2016-05-11 08:10 +0200
Re: Getting rid of dynamic TASK_SIZE (on x86, at least) Oleg Nesterov <oleg@redhat.com> - 2016-05-10 20:30 +0200
Re: Getting rid of dynamic TASK_SIZE (on x86, at least) Andy Lutomirski <luto@amacapital.net> - 2016-05-10 22:40 +0200
Re: Getting rid of dynamic TASK_SIZE (on x86, at least) Oleg Nesterov <oleg@redhat.com> - 2016-05-11 20:10 +0200
csiph-web