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

From: Pavel Machek
Date: Sun Sep 14 2008 - 11:58:15 EST

> > Yes, it is a great advantage, but it feels like a hack. Maybe it is
> > better done with LD_PRELOAD or something?
> >
> > I'd certianly want the applications to specify slack themselves in
> > like 10 years.
> LD_PRELOAD is not a solution. LD_PRELOAD always has been and always
> will be a hack. You use it to work around problems or to test
> something. Nothing else.
> LD_PRELOAD and other variables are ignored in security-relevant
> contexts and environments are cleared in many situations. Sure, you

...but that's okay, right? You would not want passwd to inherit huge
slack specified by attacker...?

> The prctl() way plus a default non-zero value is the best way for
> legacy apps. And you'll hopefully get your wish that apps will take
> fate into their own hand by specifying the slack themselves. Arjan's
> proposal also introduces new poll/select-like interface which take the
> additional slack value (at least that's what we discussed before).
> I'm strongly opposed to using LD_PRELOAD. And I think requiring the
> libc implementation of select/ poll, ... etc to wrap around the new
> interfaces which take the slack and determine the slack at userlevel
> (by reading some file) is too expensive. It's one little value per
> process (group) to be kept by the kernel. That's not much.

Well, it is not too much, but... is the cost for userspace really
significant? You'd clearly want it stored in environment, not
(cesky, pictures)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at