On Fri, Feb 5, 2016 at 2:35 PM, John Stultz <john.stultz@xxxxxxxxxx> wrote:
On Fri, Feb 5, 2016 at 12:50 PM, Andrew Morton
<akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
On Fri, 5 Feb 2016 12:44:04 -0800 Kees Cook <keescook@xxxxxxxxxxxx> wrote:
Could this be exposed as a writable /proc entry instead? Like the oom_* stuff?
/proc/<pid>/timer_slack_ns, guarded by ptrace_may_access(), documented
under Documentation/? Yup, that would work. It's there for all
architectures from day one and there is precedent. It's not as nice,
but /proc nasties will always be with us.
Ok. I'll start working on that.
Arjan/Thomas: One curious thing I noticed here while writing some
documentation. The timer_slack_ns value in the task struct is a
unsigned long.
So this means PR_SET_TIMERSLACK limits the maximum slack on 32 bit
machines to ~4 seconds. Where on 64bit machines it can be quite a bit
longer (unreasonably long, really :).