lkml.org 
[lkml]   [2009]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
Subjectper user memory limit and LSM module
From
Hi everyone,
I'd like to limit the memory usage per user, using LSM based module.
The vm_enough_memory LSM hook is convenient enough , but to make use
of it , I would need sum of all the memory usage by the current user.
The easiest way I could think of was traversing through all the
processes with for_each_process() , checking for the uid and summing
up , but this would get too slow when working with more processes.
The task_alloc_security/task_free_security LSM hooks are no longer
available and maintaining a list of processes per user through the
cred_prepare/commit/free will not be accurate and with too much
overhead.
Any suggestions on how can I quickly get or maintain a list of all the
running tasks per user(or just the memory usage), without patching the
kernel would be greatly appreciated.
Best Regards,
Iliya


\
 
 \ /
  Last update: 2009-05-29 14:55    [W:0.032 / U:22.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site