On Wed, Jun 22, 2016 at 12:44 PM, Cyrill Gorcunov <gorcunov@xxxxxxxxx> wrote: > On Wed, Jun 22, 2016 at 12:20:13PM -0700, Andy Lutomirski wrote: >> >> >> >> As an example, a 32-bit x86 program really could have something mapped >> >> above the 32-bit boundary. It just wouldn't be useful, but the kernel >> >> should still understand that it's *user* memory. >> >> >> >> So you'd have PR_SET_MMAP_LIMIT and PR_GET_MMAP_LIMIT or similar instead. >> > >> > +1. Also it might be (not sure though, just guessing) suitable to do such >> > thing via memory cgroup controller, instead of carrying this limit per >> > each process (or task structure/vma or mm). >> >> I think we'll want this per mm. After all, a high-VA-limit-aware bash >> should be able run high-VA-unaware programs without fiddling with >> cgroups. > > Wait. You mean to have some flag in mm struct and consider > its value on mmap call? Exactly. --Andy -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>