mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* per user memory limit and LSM module
@ 2009-05-29 12:51 Iliya
  2009-05-29 12:57 ` Alan Cox
  0 siblings, 1 reply; 3+ messages in thread
From: Iliya @ 2009-05-29 12:51 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-05-29 13:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-29 12:51 per user memory limit and LSM module Iliya
2009-05-29 12:57 ` Alan Cox
     [not found]   ` <b0b0b0000905290611r45b1d528o98ee26ec0f534639@mail.gmail.com>
2009-05-29 13:15     ` Fwd: " Iliya

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®