Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1680495
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 0/1] expand_downwards: don't require the gap if !vm_prev |
| Date | 2017-07-03 19:00 +0200 |
| Message-ID | <tZcRz-47B-1@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <tY7AC-8dL-27@gated-at.bofh.it> <tY7TY-8jY-11@gated-at.bofh.it> <tY8dj-8qS-13@gated-at.bofh.it> <tZbLQ-3s5-17@gated-at.bofh.it> <tZcye-40A-33@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon 03-07-17 09:30:35, Linus Torvalds wrote: > On Mon, Jul 3, 2017 at 8:49 AM, Michal Hocko <mhocko@kernel.org> wrote: > > > > If you think this is worth pursuing in upstream, just let me know and I > > can polish it, add a patch for the man page and other things. > > Hmm. This doesn't look bad, except the bprm games there really look annoying. > > Also, I'm wondering whether this should be per-thread - conceptually > "expand_stack()" really is a thread thing. All callers are using > "current", although it's not always obvious. > > So I'm wondering if a slightly larger patch that simply made the > "limit" be an _argument_ to expand_stack() would clean up both of > these issues. The execve() use would simply pass in the stack limit, > and the fault users would pass in "current->expand_stack_limit". > > Again, I'm not sure how many people really use multiple GROW_DOWN > stacks for threading, but it's conceptually the right thing to do, so > I think conceptually this should be per-thread. And the fact that it > might clean up the execve() thing makes me think it's the right thing > to do. > > What do you think? I am not sure about the per-thread vs. per mm part. If for nothing else, MAP_GROWSDOWN can be something else than the main thread stack which can be modified by all threads and then the semantic would be quite surprising if different threads had a different idea about the expansion. No? But an additional argument to expand_stack would surely clean things up a bit and will get rid of the ugly bprm part as well. I will think about it some more and then post the patch to linux-api to have a larger audience. Thanks! -- Michal Hocko SUSE Labs
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/1] expand_downwards: don't require the gap if !vm_prev Oleg Nesterov <oleg@redhat.com> - 2017-06-28 20:00 +0200
Re: [PATCH 0/1] expand_downwards: don't require the gap if !vm_prev Linus Torvalds <torvalds@linux-foundation.org> - 2017-06-29 01:30 +0200
Re: [PATCH 0/1] expand_downwards: don't require the gap if !vm_prev Oleg Nesterov <oleg@redhat.com> - 2017-06-29 17:20 +0200
Re: [PATCH 0/1] expand_downwards: don't require the gap if !vm_prev Linus Torvalds <torvalds@linux-foundation.org> - 2017-06-29 20:30 +0200
Re: [PATCH 0/1] expand_downwards: don't require the gap if !vm_prev Oleg Nesterov <oleg@redhat.com> - 2017-06-29 21:00 +0200
Re: [PATCH 0/1] expand_downwards: don't require the gap if !vm_prev Linus Torvalds <torvalds@linux-foundation.org> - 2017-06-29 21:10 +0200
Re: [PATCH 0/1] expand_downwards: don't require the gap if !vm_prev Michal Hocko <mhocko@kernel.org> - 2017-06-30 15:30 +0200
Re: [PATCH 0/1] expand_downwards: don't require the gap if !vm_prev Linus Torvalds <torvalds@linux-foundation.org> - 2017-06-30 19:10 +0200
Re: [PATCH 0/1] expand_downwards: don't require the gap if !vm_prev Michal Hocko <mhocko@kernel.org> - 2017-06-30 19:30 +0200
Re: [PATCH 0/1] expand_downwards: don't require the gap if !vm_prev Linus Torvalds <torvalds@linux-foundation.org> - 2017-06-30 19:50 +0200
Re: [PATCH 0/1] expand_downwards: don't require the gap if !vm_prev Michal Hocko <mhocko@kernel.org> - 2017-07-03 17:50 +0200
Re: [PATCH 0/1] expand_downwards: don't require the gap if !vm_prev Linus Torvalds <torvalds@linux-foundation.org> - 2017-07-03 18:40 +0200
Re: [PATCH 0/1] expand_downwards: don't require the gap if !vm_prev Michal Hocko <mhocko@kernel.org> - 2017-07-03 19:00 +0200
csiph-web