Re: [PATCH 12/13] hrtimer: create a "timer_slack" field in the task struct

From: KOSAKI Motohiro
Date: Tue Sep 30 2008 - 01:16:25 EST


Hi Arjan,

Sorry for _really_ late responce.
I recently found this patch in linux-next.

In general, I like this patch.
However,

> + case PR_SET_TIMERSLACK:
> + if (arg2 <= 0)
> + current->timer_slack_ns =
> + current->default_timer_slack_ns;
> + else
> + current->timer_slack_ns = arg2;
> + break;
> default:
> error = -EINVAL;
> break;

I wonder to why PR_SET_TIMERSLACK decreasing doesn't need root privilege.

example,
nice() systemcall is
- nice increasing (pirority decreasing) doesn't need root privilege.
- nice decreasing (priority incriasing) need root privilege.

So, I think time slack setting need similar one.
Otherwise, non-privilege user can increase power consumpsion easily by PR_SET_TIMERSLACK.

What do you think?


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/