All of lore.kernel.org
 help / color / mirror / Atom feed
* PSI poll() support for unprivileged users
@ 2020-04-24 15:38 Chris Down
  2020-04-24 19:43 ` Suren Baghdasaryan
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Down @ 2020-04-24 15:38 UTC (permalink / raw)
  To: Suren Baghdasaryan; +Cc: Johannes Weiner, Peter Zijlstra, linux-kernel

Hi Suren,

I noticed that one restriction of the PSI poll() interface is that currently 
only root can set up new triggers. Talking to Johannes, it seems the reason for 
this was that you end up with a realtime kernel thread for every cgroup where a 
trigger is set, and this could be used by unprivileged users to sap resources.

I'm building a userspace daemon for desktop users which notifies based on 
pressure events, and it's particularly janky to ask people to run such a 
notifier as root: the notification mechanism is usually tied to the user's 
display server auth, and the surrounding environment is generally pretty 
important to maintain. In addition to this, just in general this doesn't feel 
like the kind of feature that by its nature needs to be restricted to root -- 
it seems reasonable that there would be unprivileged users which want to use 
this, and that not using RT threads would be acceptable in that scenario.

Have you considered making the per-cgroup RT threads optional? If the 
processing isn't done in the FIFO kthread for unprivileged users, I think it 
should be safe to allow them to write to pressure files (perhaps with some 
additional limits or restrictions on things like the interval, as needed).

Thanks!

Chris

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

end of thread, other threads:[~2020-04-28 18:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-24 15:38 PSI poll() support for unprivileged users Chris Down
2020-04-24 19:43 ` Suren Baghdasaryan
2020-04-24 22:46   ` Suren Baghdasaryan
2020-04-28 11:34     ` Chris Down
2020-04-28 18:28       ` Suren Baghdasaryan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.