Thread (19 messages) 19 messages, 5 authors, 2018-10-23

[PATCH v2 1/7] modules: Create rlimit for module space

From: jannh@google.com (Jann Horn)
Date: 2018-10-13 07:44:27
Also in: linux-arch, linux-fsdevel, linux-mips, linux-s390, lkml, sparclinux

On Sat, Oct 13, 2018 at 2:04 AM Edgecombe, Rick P
[off-list ref] wrote:
On Fri, 2018-10-12 at 19:22 +0200, Jann Horn wrote:
quoted
On Fri, Oct 12, 2018 at 7:04 PM Edgecombe, Rick P
[off-list ref] wrote:
quoted
On Fri, 2018-10-12 at 02:35 +0200, Jann Horn wrote:
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help