Re: [patch 7/8] fdmap v2 - implement sys_socket2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux