Re: [PATCH] psi: allow unprivileged users with CAP_SYS_RESOURCE to write psi files

2021-04-01 Thread Johannes Weiner
On Thu, Apr 01, 2021 at 08:47:33AM +0200, Peter Zijlstra wrote: > On Wed, Mar 31, 2021 at 11:31:56PM -0400, Josh Hunt wrote: > > Currently only root can write files under /proc/pressure. Relax this to > > allow tasks running as unprivileged users with CAP_SYS_RESOURCE to be > > able to write to

Re: [PATCH] psi: allow unprivileged users with CAP_SYS_RESOURCE to write psi files

2021-04-01 Thread Josh Hunt
On 4/1/21 10:47 AM, Eric W. Biederman wrote: Kees Cook writes: On Wed, Mar 31, 2021 at 11:36:28PM -0500, Eric W. Biederman wrote: Josh Hunt writes: Currently only root can write files under /proc/pressure. Relax this to allow tasks running as unprivileged users with CAP_SYS_RESOURCE to be

Re: [PATCH] psi: allow unprivileged users with CAP_SYS_RESOURCE to write psi files

2021-04-01 Thread Eric W. Biederman
Kees Cook writes: > On Wed, Mar 31, 2021 at 11:36:28PM -0500, Eric W. Biederman wrote: >> Josh Hunt writes: >> >> > Currently only root can write files under /proc/pressure. Relax this to >> > allow tasks running as unprivileged users with CAP_SYS_RESOURCE to be >> > able to write to these

Re: [PATCH] psi: allow unprivileged users with CAP_SYS_RESOURCE to write psi files

2021-04-01 Thread Kees Cook
On Wed, Mar 31, 2021 at 11:36:28PM -0500, Eric W. Biederman wrote: > Josh Hunt writes: > > > Currently only root can write files under /proc/pressure. Relax this to > > allow tasks running as unprivileged users with CAP_SYS_RESOURCE to be > > able to write to these files. > > The test for

Re: [PATCH] psi: allow unprivileged users with CAP_SYS_RESOURCE to write psi files

2021-04-01 Thread Peter Zijlstra
On Wed, Mar 31, 2021 at 11:31:56PM -0400, Josh Hunt wrote: > Currently only root can write files under /proc/pressure. Relax this to > allow tasks running as unprivileged users with CAP_SYS_RESOURCE to be > able to write to these files. > > Signed-off-by: Josh Hunt I suppose that's ok, but lets

Re: [PATCH] psi: allow unprivileged users with CAP_SYS_RESOURCE to write psi files

2021-03-31 Thread Eric W. Biederman
Josh Hunt writes: > Currently only root can write files under /proc/pressure. Relax this to > allow tasks running as unprivileged users with CAP_SYS_RESOURCE to be > able to write to these files. The test for CAP_SYS_RESOURCE really needs to be in open rather than in write. Otherwise a suid

[PATCH] psi: allow unprivileged users with CAP_SYS_RESOURCE to write psi files

2021-03-31 Thread Josh Hunt
Currently only root can write files under /proc/pressure. Relax this to allow tasks running as unprivileged users with CAP_SYS_RESOURCE to be able to write to these files. Signed-off-by: Josh Hunt --- kernel/sched/psi.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git