Date: Sat, 13 Oct 2018 02:09:09 +0200 From: Jann Horn <jannh@...gle.com> To: rick.p.edgecombe@...el.com Cc: linux-fsdevel@...r.kernel.org, kernel list <linux-kernel@...r.kernel.org>, Daniel Borkmann <daniel@...earbox.net>, Kees Cook <keescook@...omium.org>, jeyu@...nel.org, Arjan van de Ven <arjan@...ux.intel.com>, linux-mips@...ux-mips.org, Thomas Gleixner <tglx@...utronix.de>, linux-s390 <linux-s390@...r.kernel.org>, "the arch/x86 maintainers" <x86@...nel.org>, kristen@...ux.intel.com, deneen.t.dock@...el.com, Catalin Marinas <catalin.marinas@....com>, Ingo Molnar <mingo@...hat.com>, Will Deacon <will.deacon@....com>, Kernel Hardening <kernel-hardening@...ts.openwall.com>, Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...el.com>, linux-arm-kernel@...ts.infradead.org, "David S. Miller" <davem@...emloft.net>, linux-arch <linux-arch@...r.kernel.org>, Arnd Bergmann <arnd@...db.de>, sparclinux@...r.kernel.org Subject: Re: [PATCH v2 1/7] modules: Create rlimit for module space On Sat, Oct 13, 2018 at 2:04 AM Edgecombe, Rick P <rick.p.edgecombe@...el.com> wrote: > On Fri, 2018-10-12 at 19:22 +0200, Jann Horn wrote: > > On Fri, Oct 12, 2018 at 7:04 PM Edgecombe, Rick P > > <rick.p.edgecombe@...el.com> wrote: > > > On Fri, 2018-10-12 at 02:35 +0200, Jann Horn wrote: > > > > Why all the rbtree stuff instead of stashing a pointer in struct > > > > vmap_area, or something like that? > > > > > > Since the tracking was not for all vmalloc usage, the intention was to not > > > bloat > > > the structure for other usages likes stacks. I thought usually there > > > wouldn't be > > > nearly as much module space allocations as there would be kernel stacks, but > > > I > > > didn't do any actual measurements on the tradeoffs. > > > > I imagine that one extra pointer in there - pointing to your struct > > mod_alloc_user - would probably not be terrible. 8 bytes more per > > kernel stack shouldn't be so bad? > > I looked into this and it starts to look a little messy. The nommu.c version of > vmalloc doesn't use or expose access to vmap_area or vm_struct. So it starts to > look like a bunch of IFDEFs to remove the rlimit in the nommu case or making a > stand in that maintains pretend vm struct's in nommu.c. I had actually > previously tried to at least pull the allocations size from vmalloc structs, but it broke on nommu. > > Thought I would check back and see. How important do you think this is? I don't think it's important - I just thought that it would be nice to avoid the extra complexity if it is easily avoidable.
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.