lkml.org 
[lkml]   [2007]   [Jun]   [7]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 7 Jun 2007 15:40:14 -0700 (PDT)
FromDavide Libenzi <>
SubjectRe: [patch 7/8] fdmap v2 - implement sys_socket2
On Thu, 7 Jun 2007, Ulrich Drepper wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Davide Libenzi wrote:
> > What we can sanily do, is re-random the base if no fds are in there (of 
> > course CLOFORK and CLOEXEC do not count).
> 
> With the last comment you mean "count after CLOFORK and CLOEXEC", right?
>  So the re-basing would be done in two places: after fork and after execve?

Yes. Files with the CLOFORK and CLOEXEC flag do not count for fork and 
exec copies.
I was also planning on doing it in __put_unused_fd(), every time 
fmap->count goes to zero. But get_random_int() is not as cheap as I 
thought. If we use a cheaper (although less secure) function to mix pid & 
jiffies, we could do it even in there.


- Davide


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

\
 
 \ /
  Last update: 2007-06-07 22:43    [from the cache]
©2003-2008