Davide Libenzi a écrit :
On Thu, 7 Jun 2007, Eric Dumazet wrote:I am afraid randomization wont really work if /sbin/init or /bin/bash for example uses one (or more) unseq fd : The 'random base' will be propagated at fork()/exec() time ?As I said to Uli, we can't move the base while fds are in there. We can re-randomize it when it's empty. This can also be done (it's a trivial and fast operation - just set fmap->base to a new value) even every time the fd count on the map touches zero.
Hum, I think it would be better to free fmap if it's empty, instead of change fmap->base. (Only in fork() after removal of O_CLOFORK file handles, and in exec() after removal of O_CLOEXEC file handles)
- 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:
- [patch 7/8] fdmap v2 - implement sys_socket2
- From: Davide Libenzi <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Alan Cox <[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: Alan Cox <[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: Alan Cox <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Kyle Moffett <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Eric Dumazet <[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: Eric Dumazet <[email protected]>
- Re: [patch 7/8] fdmap v2 - implement sys_socket2
- From: Davide Libenzi <[email protected]>
- [patch 7/8] fdmap v2 - implement sys_socket2
- Prev by Date: [PATCH, v2] Audit: Add TTY input auditing
- Next by Date: Re: [RFC][PATCH] /proc/pid/maps doesn't match "ipcs -m" shmid
- 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):