On Sat, 9 Jun 2007, Al Viro wrote: > That's simply not true. On the current kernel nothing stops you from e.g. > picking a random number and using F_DUPFD. Voila - there's your randomized > descriptor. Portable to earlier kernels. > > Moreover, nonsense^H^H^Hq_fd() can be implemented in userland just fine > if we allow F_DUPFD to arbitrary number - just pass it a random one *or* > base chosen like davedel is doing (constant + 20bit random chosen at start > time). That does not work. Or better, it works but it forces *huge* fdtables to be created. To do that, you need "start" to be over NR_FILE, and this creates an fdtable bigger than NR_FILE ((pointer-size + a-few-bits) * NR_FILE) propagated down to every app you fork. - 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/
- Follow-Ups:
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Davide Libenzi <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- References:
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Ulrich Drepper <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Linus Torvalds <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Davide Libenzi <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Linus Torvalds <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Al Viro <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Ulrich Drepper <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Al Viro <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Ulrich Drepper <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Al Viro <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Ulrich Drepper <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Al Viro <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- Prev by Date: Re: [patch 7/8] fdmap v2 - implement sys_socket2
- Next by Date: Re: [AppArmor 39/45] AppArmor: Profile loading and manipulation, pathname matching
- Previous by thread: Re: [patch 7/8] fdmap v2 - implement sys_socket2
- Next by thread: Re: [patch 7/8] fdmap v2 - implement sys_socket2
- Index(es):