* mach-defpager/default_pager.c: Drop register qualifiers.
* mach-defpager/kalloc.c: Likewise.
* mach-defpager/queue.h: Likewise.
* mach-defpager/wiring.c: Likewise.
---
mach-defpager/default_pager.c | 182 -
mach-defpager/kalloc.c| 10 +--
mach-d
Found using the Clang Static Analyzer.
* libshouldbeinlibc/timefmt.c (fmt_named_interval): Fix dead
initialization by declaring ts in the loop.
---
libshouldbeinlibc/timefmt.c |3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libshouldbeinlibc/timefmt.c b/libshouldbeinlib
Found using the Clang Static Analyzer.
* pattern.c (patternlist_add): Fix memory leak.
---
pattern.c |3 +++
1 file changed, 3 insertions(+)
diff --git a/pattern.c b/pattern.c
index 409ed23..fd38cf5 100644
--- a/pattern.c
+++ b/pattern.c
@@ -52,7 +52,10 @@ patternlist_add (struct patternlist
* init/init.c (S_startup_essential_task): Fix port leak.
---
init/init.c |6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/init/init.c b/init/init.c
index de5dd6b..b7b40bd 100644
--- a/init/init.c
+++ b/init/init.c
@@ -1202,6 +1202,10 @@ S_startup_essential_task (mach_po
* proc/main.c (main): Update comment. The proc server is no longer PID 0.
* proc/proc.h: Likewise.
---
proc/main.c |2 +-
proc/proc.h |2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/proc/main.c b/proc/main.c
index 73abbc0..6b18737 100644
--- a/proc/main.c
+++ b/proc/m
Deallocate the device port after creating the mapping. The mapping is
independent of the device port.
* libshouldbeinlibc/maptime.c (maptime_map): Deallocate device port.
---
libshouldbeinlibc/maptime.c |4
1 file changed, 4 insertions(+)
diff --git a/libshouldbeinlibc/maptime.c b/libsh
* libports/reallocate-port.c (ports_reallocate_port): Improve error
handling.
---
libports/reallocate-port.c |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libports/reallocate-port.c b/libports/reallocate-port.c
index b2977dd..d2adaeb 100644
--- a/libports/reallocate-po
* libports/reallocate-from-external.c (ports_reallocate_from_external):
Improve error handling.
---
libports/reallocate-from-external.c |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libports/reallocate-from-external.c
b/libports/reallocate-from-external.c
index cd1214
* libports/transfer-right.c (ports_transfer_right): Improve error handling.
---
libports/transfer-right.c |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libports/transfer-right.c b/libports/transfer-right.c
index e313f71..72488a9 100644
--- a/libports/transfer-right.c
+++
* libdiskfs/disk-pager.c (diskfs_start_disk_pager): Improve error reporting.
---
libdiskfs/disk-pager.c |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libdiskfs/disk-pager.c b/libdiskfs/disk-pager.c
index 8fe8f80..9a0d9d8 100644
--- a/libdiskfs/disk-pager.c
+++ b/libdiskf
Store the privileged host port in _hurd_host_priv like it is done in
the root filesystem. This fixes the thread priority adjustment in the
proc server. Prior to this fix, a warning message "unable to adjust
libports thread priority" sometimes appeared early in the boot
process.
* proc/host.c (S_pr
By using error instead of perror, the warning can be proprely
attributed to the process.
* libports/manage-multithread.c (adjust_priority): Use error instead
of perror to print the warning.
---
libports/manage-multithread.c |6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --
Properly deallocate all ports and terminate the started translator if
an error occurs.
* libfshelp/start-translator-long.c (fshelp_start_translator_long):
Improve error handling.
---
libfshelp/start-translator-long.c |7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/l
* proc/host.c (S_proc_getprivports): Adapt accordingly.
* proc/main.c (main): Store the device master port in _hurd_device_master.
* proc/proc.h (master_device_port): Remove unused variable.
---
proc/host.c |2 +-
proc/main.c |4 ++--
proc/proc.h |2 --
3 files changed, 3 insertions(+)
Properly deallocate all ports and terminate the started translator if
an error occurs.
* libfshelp/start-translator-long.c (fshelp_start_translator_long):
Improve error handling.
---
libfshelp/start-translator-long.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --gi
* include/mach/message.h (mach_msg_header_t): Add
msgh_protected_payload as a union with msgh_local_port.
---
include/mach/message.h |5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/mach/message.h b/include/mach/message.h
index f78e978..7464a57 100644
--- a/incl
* include/mach/mach_port.defs: Add mach_port_set_protected_payload.
* ipc/mach_port.c: Implement mach_port_set_protected_payload.
---
include/mach/mach_port.defs |9 +
ipc/mach_port.c | 37 +
2 files changed, 46 insertions(+)
diff --gi
* ipc/ipc_port.c (ipc_port_init): Initialize protected_payload.
(ipc_port_print): Print protected_payload.
(ipc_port_set_protected_payload): New function.
* ipc/ipc_port.h (struct ipc_port): Add field protected_payload.
(ipc_port_set_protected_payload): Add function declaration.
---
ipc/ipc_port.c
* include/mach/mach_port.defs: Skip the routines mach_port_set_rpcinfo
and mach_port_create_act if MIGRATING_THREADS is not defined.
---
include/mach/mach_port.defs |5 +
1 file changed, 5 insertions(+)
diff --git a/include/mach/mach_port.defs b/include/mach/mach_port.defs
index e1f45e3
* include/mach/message.h: Define MACH_MSG_TYPE_PROTECTED_PAYLOAD.
(MACH_MSG_TYPE_LAST): Adjust accordingly.
---
include/mach/message.h |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/mach/message.h b/include/mach/message.h
index 7464a57..0a7297e 100644
--- a/inclu
Clear the protected payload when a receive port is moved from one ipc
space to another. This is done to retain the old behavior of
mach_msg, so that a port name is sent in the msgh_local_port field.
If the new owner of that receive right wishes to use the protected
payload mechanism, it has to be
I do not know why this is happening, but w/o this, some kernel
pointers leak into the ip_protected_payload field. So it looks like
sizeof(struct ipc_tree_entry) is wrong here, not sure why
though. Maybe the global header is imported? But the compiler flags
should prevent this...
---
ipc/ipc_init.c
* ipc/ipc_kmsg.c (ipc_kmsg_copyout_header): If a protected payload is
set for the destination port, provide it in msgh_protected_payload.
---
ipc/ipc_kmsg.c | 58 +++-
1 file changed, 45 insertions(+), 13 deletions(-)
diff --git a/ipc/ipc_km
* Makefile (CLEANFILES): Add generated source files lexxer.c and parser.c.
---
Makefile.am |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 33bc768..3e6dfcf 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,7 +5,7 @@ bin_SCRIPTS = mig
EXTRA_D
---
lexxer.l |1 +
parser.h |1 +
parser.y | 17 +
type.c | 10 +-
type.h |2 ++
5 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/lexxer.l b/lexxer.l
index 5f2f61e..7ff5677 100644
--- a/lexxer.l
+++ b/lexxer.l
@@ -138,6 +138,7 @@ static voi
* header.c (WriteDefines): Avoid warning about unused parameter.
---
header.c |1 +
1 file changed, 1 insertion(+)
diff --git a/header.c b/header.c
index 150412a..1bc570f 100644
--- a/header.c
+++ b/header.c
@@ -41,6 +41,7 @@ WriteIncludes(FILE *file)
static void
WriteDefines(FILE *file)
{
Drop the auto keyword from the generated source code. auto is the
default storage type for variables anyway and it is customary to omit
it.
* utils.c (WriteCheckDecl): Drop auto from generated source.
(WriteStaticLongDecl): Likewise.
(WriteStaticShortDecl): Likewise.
---
utils.c |6 +++---
1
This avoids a warning about input being unused.
* lexxer.l: Define YY_NO_INPUT.
---
lexxer.l |3 +++
1 file changed, 3 insertions(+)
diff --git a/lexxer.l b/lexxer.l
index 6686b55..5f2f61e 100644
--- a/lexxer.l
+++ b/lexxer.l
@@ -50,6 +50,9 @@ FileName ({QString}|{AString})
#include "l
An inTransPayload function maps payloads to objects, like an inTrans
function maps from port names to objects. Generate code in the server
routine to optimize lookups to the receiver of the message.
Additionally, if no intran function is provided, but an intranpayload
function is, it is expected
Use translation functions instead of doing the lookup manually.
* trans/Makefile (password-MIGSFLAGS): Add mutators.
* trans/password.c (S_password_check_user): Update accordingly.
(S_password_check_group): Likewise.
---
trans/Makefile |6 +-
trans/password.c | 30 ++--
--git a/libports/lookup-payload.c b/libports/lookup-payload.c
new file mode 100644
index 000..92f54b6
--- /dev/null
+++ b/libports/lookup-payload.c
@@ -0,0 +1,44 @@
+/*
+ Copyright (C) 2013 Free Software Foundation, Inc.
+
+ Written by Justus Winter <4win...@informatik.uni-hamburg
dex 000..0d5bd4d
--- /dev/null
+++ b/proc/mig-decls.h
@@ -0,0 +1,42 @@
+/* Translation functions for mig.
+
+ Copyright (C) 2013 Free Software Foundation, Inc.
+
+ Written by Justus Winter <4win...@informatik.uni-hamburg.de>
+
+ This file is part of the GNU Hurd.
+
+ The GNU Hurd
* console/priv.h (begin_using_protid_payload): New function.
* console/mutations.h: Add mutator.
---
console/mutations.h |1 +
console/priv.h |6 ++
2 files changed, 7 insertions(+)
diff --git a/console/mutations.h b/console/mutations.h
index 5f26672..26f9dc2 100644
--- a/console
* libnetfs/priv.h (begin_using_protid_payload): New function.
* libnetfs/mutations.h: Add mutator.
---
libnetfs/mutations.h |2 ++
libnetfs/priv.h |6 ++
2 files changed, 8 insertions(+)
diff --git a/libnetfs/mutations.h b/libnetfs/mutations.h
index e6700f5..f3e7209 100644
--- a/
* libcons/mutations.h: Add mutator.
* libcons/priv.h (begin_using_notify_payload): New function.
---
libcons/mutations.h |1 +
libcons/priv.h |6 ++
2 files changed, 7 insertions(+)
diff --git a/libcons/mutations.h b/libcons/mutations.h
index c895447..4751340 100644
--- a/libcons
* libdiskfs/diskfs.h (diskfs_begin_using_protid_payload): New function.
* libdiskfs/fsmutations.h: Add mutator.
---
libdiskfs/diskfs.h |9 +
libdiskfs/fsmutations.h |2 ++
2 files changed, 11 insertions(+)
diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h
index 22262aa..6b
* libtrivfs/fsmutations.h: Add mutators.
* libtrivfs/migsupport.c (trivfs_begin_using_protid_payload): New function.
(trivfs_begin_using_control_payload): Likewise.
* libtrivfs/trivfs.h (trivfs_begin_using_protid_payload): New declaration.
(trivfs_begin_using_control_payload): Likewise.
---
libtri
* proc/Makefile (MIGSFLAGS): Add mutator.
* proc/hash.c (reqport_find_payload): New function.
* proc/proc.h (reqport_find_payload): New declaration.
---
proc/Makefile |1 +
proc/hash.c | 10 ++
proc/proc.h |1 +
3 files changed, 12 insertions(+)
diff --git a/proc/Makefile b/
* exec/execmutations.h: Add FILE_INTRAN_PAYLOAD mutation.
---
exec/execmutations.h |1 +
1 file changed, 1 insertion(+)
diff --git a/exec/execmutations.h b/exec/execmutations.h
index 96b4772..52a36c6 100644
--- a/exec/execmutations.h
+++ b/exec/execmutations.h
@@ -1,6 +1,7 @@
/* CPP definiti
* auth/authmutations.h: Add mutator.
* auth/auth_mig.h (auth_payload_to_handle): New declaration.
* auth/auth.c (auth_payload_to_handle): New function.
* utils/fakeauth.c (auth_payload_to_handle): Likewise.
---
auth/auth.c |6 ++
auth/auth_mig.h |1 +
auth/authmutations.h
* pflocal/mig-mutate.h: Add mutators.
* pflocal/mig-decls.c (begin_using_sock_user_payload): New function.
(begin_using_addr_payload): Likewise.
---
pflocal/mig-decls.h | 12
pflocal/mig-mutate.h |3 +++
2 files changed, 15 insertions(+)
diff --git a/pflocal/mig-decls.h b/pflo
fsysServer.o is only used by the symlink translator which does not use
libports. Therefor, it is not necessary to use the default payload to
port translation function.
* trans/Makefile (fsys-MIGSFLAGS): Disable the default payload to port
translation function.
---
trans/Makefile |4
1
---
libports/Makefile |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libports/Makefile b/libports/Makefile
index 934b151..7055901 100644
--- a/libports/Makefile
+++ b/libports/Makefile
@@ -42,7 +42,7 @@ installhdrs = ports.h
HURDLIBS= ihash
LDLIBS += -lpthread
-OBJS = $
init does not use libports. Therefor, it is not necessary to use the
default payload to port translation function.
* init/Makefile (MIGSFLAGS): Disable the default payload to port
translation function.
---
init/Makefile |4
1 file changed, 4 insertions(+)
diff --git a/init/Makefile b/
This function maps payloads back to port names. This can be used as
intranspayload functions in situations where the server function
expects a port name.
* libports/ports.h: Add function ports_payload_get_name.
---
libports/ports.h | 12
1 file changed, 12 insertions(+)
diff --git
* trans/Makefile (password-MIGSFLAGS): Add mutator.
---
trans/Makefile |1 +
1 file changed, 1 insertion(+)
diff --git a/trans/Makefile b/trans/Makefile
index c0386d0..fa2 100644
--- a/trans/Makefile
+++ b/trans/Makefile
@@ -34,6 +34,7 @@ LDLIBS += -lpthread
password-LDLIBS = $(LIBCRYPT)
For each hurd type defined in hurd_types.h, add a intranpayload
function. If an X_INTRAN mutation is defined for a type, a
corresponding X_INTRAN_PAYLOAD has to be defined. If no X_INTRAN
mutation is defined, use ports_payload_get_name as intranpayload
function, turning the payload back into an p
* pfinet/mutations.h: Add mutators.
* pfinet/misc.c (begin_using_socket_payload): New function.
(begin_using_sockaddr_payload): Likewise.
* pfinet/pfinet.h (begin_using_socket_payload): New declaration.
(begin_using_sockaddr_payload): Likewise.
---
pfinet/misc.c | 12
pfinet/mu
It is unclear if this is really necessary.
---
libports/complete-deallocate.c |1 +
libports/destroy-right.c |3 +++
2 files changed, 4 insertions(+)
diff --git a/libports/complete-deallocate.c b/libports/complete-deallocate.c
index 8ce095b..6de97e3 100644
--- a/libports/complete-de
* proc/mig-decls.h (begin_using_exc_payload): New function.
* proc/proc_exc.defs (exception_t): Add payload-aware in-translator
function.
---
proc/mig-decls.h |6 ++
proc/proc_exc.defs |1 +
2 files changed, 7 insertions(+)
diff --git a/proc/mig-decls.h b/proc/mig-decls.h
index 0d
* libports/create-internal.c (_ports_create_port_internal): Set the
protected payload to the objects address.
* libports/import-port.c (ports_import_port): Likewise.
* libports/reallocate-from-external.c (ports_reallocate_from_external):
Likewise.
* libports/reallocate-port.c (ports_reallocate_
If we cannot get this to work with protected payloads, we can always
add a switch to libports to disable the optimization.
---
utils/rpctrace.c | 20 +++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/utils/rpctrace.c b/utils/rpctrace.c
index ef7ab53..035a3fd 1006
Hi :)
I've been reworking the receiver object lookup in
Hurd/mig/gnumach. I'll briefly sketch the current state of affairs.
Suppose a file is truncated. To do that, a file_set_size message is
sent to some port. The relevant ipc routine is:
routine file_set_size (
trunc_file: file_t;
Quoting Justus Winter (2013-11-29 01:02:40)
> Drop the auto keyword from the generated source code. auto is the
> default storage type for variables anyway and it is customary to omit
> it.
Hm, this is already in, please ignore this. It slipped in while doing
git send-email.
Justus
Handle multiple request types as recommended by the Mach Server
Writer's Guide section 4, subsection "Handling Multiple Request
Types". This avoids initializing the reply message in every X_server
function. The reply message has already been properly initialized in
libports, so there is no need t
Hi :)
the way our demuxer functions chain the X_server functions is
initializing the reply message over and over again. This can be
avoided by following the recommendations of the Mach Server Writer's
Guide. A patch for libdiskfs is sent as a follow-up.
To improve the situation further, I propose
Handle multiple request types as recommended by the Mach Server
Writer's Guide section 4, subsection "Handling Multiple Request
Types". This avoids initializing the reply message in every X_server
function. The reply message has already been properly initialized in
libports, so there is no need t
Handle multiple request types as recommended by the Mach Server
Writer's Guide section 4, subsection "Handling Multiple Request
Types". This avoids initializing the reply message in every X_server
function. The reply message has already been properly initialized in
libports, so there is no need t
Handle multiple request types as recommended by the Mach Server
Writer's Guide section 4, subsection "Handling Multiple Request
Types". This avoids initializing the reply message in every X_server
function. The reply message has already been properly initialized in
libports, so there is no need t
Handle multiple request types as recommended by the Mach Server
Writer's Guide section 4, subsection "Handling Multiple Request
Types". This avoids initializing the reply message in every X_server
function. The reply message has already been properly initialized in
libports, so there is no need t
Handle multiple request types as recommended by the Mach Server
Writer's Guide section 4, subsection "Handling Multiple Request
Types". This avoids initializing the reply message in every X_server
function. The reply message has already been properly initialized in
libports, so there is no need t
Handle multiple request types as recommended by the Mach Server
Writer's Guide section 4, subsection "Handling Multiple Request
Types". This avoids initializing the reply message in every X_server
function. The reply message has already been properly initialized in
libports, so there is no need t
Handle multiple request types as recommended by the Mach Server
Writer's Guide section 4, subsection "Handling Multiple Request
Types". This avoids initializing the reply message in every X_server
function. The reply message has already been properly initialized in
libports, so there is no need t
Quoting Marin Ramesa (2013-12-02 09:14:35)
> Samuel Thibault wrote:
> > It doesn't seem so clear that it's actually always properly initialized.
> > We also need a comment explaining why it always is.
>
> * device/net_io.c (hash_entp): Initialize and add a comment saying why this
> was done.
>
>
This avoids a warning about input being unused.
* lexxer.l: Define YY_NO_INPUT.
---
lexxer.l |3 +++
1 file changed, 3 insertions(+)
diff --git a/lexxer.l b/lexxer.l
index 6686b55..5f2f61e 100644
--- a/lexxer.l
+++ b/lexxer.l
@@ -50,6 +50,9 @@ FileName ({QString}|{AString})
#include "l
* header.c (WriteDefines): Avoid warning about unused parameter.
---
header.c |1 +
1 file changed, 1 insertion(+)
diff --git a/header.c b/header.c
index 150412a..1bc570f 100644
--- a/header.c
+++ b/header.c
@@ -41,6 +41,7 @@ WriteIncludes(FILE *file)
static void
WriteDefines(FILE *file)
{
* header.c (WriteServerHeader): Emit a x_server_routine that can be
inlined.
* server.c (WriteEpilog): Export the x_routines array so it can be
used from the inlined x_server_routine.
---
header.c |8
server.c |2 +-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git
* server.c (WriteSubsystemServerRoutine): New function.
(WriteEpilog): Adjust accordingly.
* write.h (WriteSubsystemServerRoutine): New declaration.
---
server.c | 35 +--
write.h |1 +
2 files changed, 22 insertions(+), 14 deletions(-)
diff --git a/server.c
* Makefile (CLEANFILES): Add generated source files lexxer.c and parser.c.
---
Makefile.am |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 33bc768..3e6dfcf 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,7 +5,7 @@ bin_SCRIPTS = mig
EXTRA_D
Quoting Marin Ramesa (2013-12-02 11:55:14)
> On 02.12.2013 10:37:08, Justus Winter wrote:
> > The other day you were fixing this kind of code, now you're
> > introducing it. Maybe there's a better way to silence this warning,
> > maybe some attribute.
>
&g
Quoting Samuel Thibault (2013-12-02 13:09:44)
> Well, it means that whenever a protocol gets augmented, one has to
> recompile all demuxer functions calling these inlines. In the example
> of trivfs_demuxer, the application itself does not need a rebuild, only
> libtrivfs needs, but in other cases
Hi :)
This is a patch series taking advantage of the proposed MIG change to
inline the x_server_routine functions into the demuxer functions. It
actually seems to improve our performance :)
The time needed to compile half (I don't build the udeb variant) a
Hurd package using fakeroot-tcp on my ma
GNU MIG recently gained support for emitting x_server_routine
declarations in the generated server header file. Using this
declaration, the x_server_routine functions can be inlined into the
demuxer function.
* libnetfs/demuxer.c: Include the mig-generated server headers.
---
libnetfs/demuxer.c
GNU MIG recently gained support for emitting x_server_routine
declarations in the generated server header file. Using this
declaration, the x_server_routine functions can be inlined into the
demuxer function.
* libdiskfs/demuxer.c: Include the mig-generated server headers.
---
libdiskfs/demuxer.
GNU MIG recently gained support for emitting x_server_routine
declarations in the generated server header file. Using this
declaration, the x_server_routine functions can be inlined into the
demuxer function.
* exec/main.c: Include the mig-generated server headers.
---
exec/main.c |6 +++---
GNU MIG recently gained support for emitting x_server_routine
declarations in the generated server header file. Using this
declaration, the x_server_routine functions can be inlined into the
demuxer function.
* libtrivfs/demuxer.c: Include the mig-generated server headers.
---
libtrivfs/demuxer.
GNU MIG recently gained support for emitting x_server_routine
declarations in the generated server header file. Using this
declaration, the x_server_routine functions can be inlined into the
demuxer function.
* pfinet/main.c: Include the mig-generated server headers.
---
pfinet/main.c | 11 +++
GNU MIG recently gained support for emitting x_server_routine
declarations in the generated server header file. Using this
declaration, the x_server_routine functions can be inlined into the
demuxer function.
* proc/main.c: Include the mig-generated server headers.
---
proc/main.c | 10 +--
GNU MIG recently gained support for emitting x_server_routine
declarations in the generated server header file. Using this
declaration, the x_server_routine functions can be inlined into the
demuxer function.
* pflocal/demuxer.c: Include the mig-generated server headers.
* pflocal/sserver.c: Like
Handle multiple request types as recommended by the Mach Server
Writer's Guide section 4, subsection "Handling Multiple Request
Types". This avoids initializing the reply message in every X_server
function. The reply message has already been properly initialized in
libports, so there is no need t
Any messages we do not intercept are forwarded to the underlying file.
* trans/fakeroot.c (netfs_demuxer): Remove unused declaration of
function netfs_ifsock_server.
---
trans/fakeroot.c |1 -
1 file changed, 1 deletion(-)
diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index 1766cc2..f3d
Previously, fakeroot failed to create files in certain circumstances,
e. g. assuming /tmp is a tmpfs and /tmp/some_file does not exist:
% cd /tmp && fakeroot-hurd /bin/sh -c ':>/tmp/some_file'
/bin/sh: 1: cannot create /tmp/some_file: Is a directory
Fix this by sanitizing the flags value not to c
Handle multiple request types as recommended by the Mach Server
Writer's Guide section 4, subsection "Handling Multiple Request
Types". This avoids initializing the reply message in every X_server
function. The reply message has already been properly initialized in
libports, so there is no need t
Handle multiple request types as recommended by the Mach Server
Writer's Guide section 4, subsection "Handling Multiple Request
Types". This avoids initializing the reply message in every X_server
function. The reply message has already been properly initialized in
libports, so there is no need t
When looking up files, fakeroot intercepts reauthentication requests
and executes io_reauthenticate and auth_user_authenticate
transparently for the client. This, however, makes the client
incorrectly assume that the lookup is finished (assuming
/media/scratch is a translator):
% cd /media/scratch
Previously fakeroot did not explicitly proxy io_identity requests, so
the default implementation from libnetfs handled them. But as the fsys
identity port returned was always netfs_fsys_identity, this broke the
getcwd logic (assuming /media/scratch is a translator):
% cd /media/scratch/foo && fake
Hi :)
with this in, fakeroot-hurd builds the gnumach package just fine.
[PATCH 01/13] libfshelp: use a hash table in get-identity.c
This considerably improves performance of filesystem translators
handing out lots of identity ports. fakeroot triggers just that.
[PATCH 02/13] libihash: remove d
* libihash/ihash.c (hurd_ihash_add): Remove dead code.
---
libihash/ihash.c |3 ---
1 file changed, 3 deletions(-)
diff --git a/libihash/ihash.c b/libihash/ihash.c
index be1c580..d670fee 100644
--- a/libihash/ihash.c
+++ b/libihash/ihash.c
@@ -372,9 +372,6 @@ hurd_ihash_add (hurd_ihash_t ht,
Currently fshelp_get_identity uses ports_class_iterate to de-duplicate
the identity ports. Use a hash table instead.
* libfshelp/get-identity.c (struct idspec): Remove field fileno.
(struct idspec): Add field id_hashloc.
(id_clean): New function.
(id_initialize): Use id_clean as cleanup function f
Previously any FS_RETRY_NORMAL requests were handed back to the
client. Redo the lookup ourself instead. This saves us the burden to
create a fake node for the intermediate step, hand it back to the
client and handle another request from the client.
With this change there is no need to fiddle wi
Previously a pointer to the node was stored in the hash table. This
writes the locp pointer into the node object overwriting the next
pointer there. Store the pointer to the netnode instead.
* trans/fakeroot.c (struct netnode): Add field np.
(new_node): Initialize field np.
(new_node): Store nn in
* trans/fakeroot.c (netfs_attempt_mkfile): Keep dir locked until the
new node is created.
---
trans/fakeroot.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index bee018e..b97b499 100644
--- a/trans/fakeroot.c
+++ b/trans/fakeroot.c
@@
* trans/fakeroot.c (netfs_S_dir_lookup): Fix locking.
---
trans/fakeroot.c | 45 -
1 file changed, 28 insertions(+), 17 deletions(-)
diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index eff5225..d5cb0e6 100644
--- a/trans/fakeroot.c
+++ b/trans/fake
Previously, fakeroot tried to do too much in netfs_node_norefs. This
function is meant to deallocate nodes. Fakeroot however also tries to
remove the node from the hash table and to prolong the lifetime of the
node object by re-referencing it.
Removing the object from the hash table is highly pr
* trans/fakeroot.c (netfs_S_dir_lookup): Handle invalid responses to
dir_lookup requests.
---
trans/fakeroot.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index 6e3b5d4..bee018e 100644
--- a/trans/fakeroot.c
+++ b/trans/fa
Previously the node was not correctly torn down if adding the newly
created netnode to the hash table failed. Fix this by rearranging the
code, doing the hash table modification first because it is easier to
undo.
* trans/fakeroot.c (new_node): Fix the error handling.
---
trans/fakeroot.c | 37
When a node has faked attributes, we cannot drop our node.
Reinitialize the lock box as if the node was dropped. This fixes the
following bug:
% fakeroot-hurd /bin/sh -c 'touch /tmp/$$.lock
chown 0 /tmp/$$.lock
l(){ flock /tmp/$$.lock true;
* trans/fakeroot.c (new_node): Acquire the nodes lock before releasing
the idport_ihash_lock. Return nodes locked.
(netfs_S_dir_lookup): Drop lock.
(netfs_attempt_mkfile): Likewise.
(main): Likewise.
---
trans/fakeroot.c | 16 +---
1 file changed, 13 insertions(+), 3 deletions(-)
The function new_node creates virtual nodes using netfs_make_node.
Nodes created with netfs_make_node already have a reference count of
one. Currently another reference is added in new_node. This prevents
the destruction of the node causing bugs like this:
% fakeroot-hurd sh -c 'l(){ flock /tmp/
* console-client/trans.c (netfs_attempt_mkfile): Remove spurious
pthread_spin_unlock.
(netfs_node_norefs): Likewise.
---
console-client/trans.c |2 --
1 file changed, 2 deletions(-)
diff --git a/console-client/trans.c b/console-client/trans.c
index 8219f97..00c5407 100644
--- a/console-clie
401 - 500 of 1489 matches
Mail list logo