Re: [patch 3/6] posix-cpu-timers: Restrict timer_create() permissions
From: Frederic Weisbecker
Date: Fri Sep 20 2019 - 20:45:26 EST
On Thu, Sep 05, 2019 at 02:03:42PM +0200, Thomas Gleixner wrote:
> Right now there is no restriction at all to attach a Posix CPU timer to any
> process in the system. Per thread CPU timers are limited to be created by
> threads in the same thread group.
>
> Timers can be used to observe activity of tasks and also impose overhead on
> the process to which they are attached because that process needs to do the
> fine grained CPU time accounting.
>
> Limit the ability to attach timers to a process by checking whether the
> task which is creating the timer has permissions to attach ptrace on the
> target process.
>
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Makes sense. I hope no serious user currently rely on that lack of
restriction. Let's just apply and wait for complains if any.
Reviewed-by: Frederic Weisbecker <frederic@xxxxxxxxxx>