Re: exec server and /dev/fd/N

From:

Emilio Pozuelo Monfort

Subject:

Re: exec server and /dev/fd/N

Date:

Thu, 27 May 2010 18:22:26 +0200

Hi,
On 25/05/10 21:10, Carl Fredrik Hammar wrote:
> Some of the changes that need to be made have already been discussed on
> IRC: you should use string_t instead of data_t, empty string instead of
> NULL for RPCs, and update copyright years,
All fixed.
> The first three patches are pretty useless on their own, they all affect
> the same program, and most changes are pretty mechanical, so I think
> you might as well merge them.
I've merged them in 0001.
> You also haven't changed some calls to exec_exec and _hurd_exec() in
> Hurd and glib to _hurd_exec_file_name(), which would be appropriate if
> we're deprecating _hurd_exec().
Fixed now.
> It would also be good if you always include a ChangeLog so I can catch
> early errors there too, which hopefully leads to less round-trips.
Writing ChangeLogs still takes me a long time, so I prefer to do it when
the patches are close to finished so I don't need to rewrite them all
the time, at least for big patches. If that's a big issue let me know
and I'll write them all the time.
I've tested the following upgrade scenarios:
* Upgrading only glibc (libc.so + libhurduser.so). System works fine.
Reboot. System works fine.
* Upgrading glibc (libc.so + libhurduser.so) first and then hurd (exec,
ext2fs.static, lib{disks,triv,net}fs.so). System works fine. Reboot.
System works fine.
* Upgrading only hurd (exec, ext2fs.static, lib{disks,triv,net}fs.so).
System works fine. Reboot. System doesn't boot. The problem is that
the exec server dies because it needs the file_exec_file_name symbol,
which is in libhurduser.so, lib*fs.so would have exec_exec_file_name
unresolvable too... So it's not possible to upgrade just Hurd (which
is fine IMHO, you need a new glibc to build the new Hurd anyway) unless
we get into weird tricks OR we move the client side RPCs from
libhurduser.so to a library built from Hurd.
Regarding version.h, I've bumped HURD_INTERFACE_VERSION in 0001 for
exec_exec_file_name, but should it be bumped in 0002 too?
Cheers,
Emilio
Emilio Pozuelo Monfort (3):
Add a new exec_exec_file_name RPC
Add a file_exec_file_name RPC
Use the new _hurd_exec_file_name function
TODO | 2 +-
doc/hurd.texi | 22 +++++-----
exec/exec.c | 44 +++++++++++++++++++--
exec/hashexec.c | 41 ++++++++++++++------
exec/priv.h | 3 +-
hurd/exec.defs | 18 ++++++++-
hurd/fs.defs | 27 +++++++++++--
hurd/hurd_types.h | 8 ++--
hurd/version.h | 2 +-
init/init.c | 76 +++++++++++++++++++++++++-----------
libdiskfs/boot-start.c | 2 +-
libdiskfs/file-exec.c | 70 ++++++++++++++++++++++++++++------
libfshelp/start-translator-long.c | 23 +++++++----
libnetfs/file-exec.c | 63 ++++++++++++++++++++++++++----
libtrivfs/file-exec.c | 27 +++++++++++++-
trans/fakeroot.c | 57 +++++++++++++++++++++++++---
utils/fakeauth.c | 6 +-
utils/login.c | 22 +++++++---
utils/rpctrace.c | 4 +-
utils/shd.c | 6 +-
20 files changed, 408 insertions(+), 115 deletions(-)