lkml.org 
[lkml]   [2008]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 12/13] hrtimer: create a "timer_slack" field in the task struct

> > 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
filesystem...
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


\
 
 \ /
  Last update: 2008-09-14 18:01    [W:1.112 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site