From 23ca8f5f942f831ec5be3667fd0a29873fae2912 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Thu, 15 Aug 2013 18:41:50 +0200 Subject: exec: remove support for transparently unbzip2ing executables Remove support for transparently unbzip2ing executables from the exec server. The code in question makes the exec server unnecessarily complex and since the exec server is an essential process, crashing it makes /hurd/init crash the whole system. Since the bzip2 code is not thread-safe, all access to it is serialized, so there is a trivial way for one user to delay another users bzip2ed executables for some unspecified time. This can be accomplished by padding any program with easily compressed data, zipping it and executing it. Using such a program as an passive translator and then triggering its execution by the filesystem translator also stalls any requests to that filesystem (observed using the libdiskfs-based ext2fs). Since compressed executables cannot be mapped into the memory, they have to be uncompressed into allocated memory first. This is slower and any user with access to the exec server can make it allocate arbitrary amounts of memory. If the Hurd had proper memory accounting, this would probably be a way around it. So the compression support in exec seemingly creates various issues for little value, at least with the abundance of nonvolatile memory available today. * exec/Makefile: Remove bzip2 related files. * exec/exec.c: Remove anything #ifdef BZIP2ed. * exec/do-bunzip2.c: Move to libstore. --- exec/Makefile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'exec/Makefile') diff --git a/exec/Makefile b/exec/Makefile index eb883612..11d28752 100644 --- a/exec/Makefile +++ b/exec/Makefile @@ -21,14 +21,12 @@ dir := exec makemode := server SRCS = exec.c main.c hashexec.c hostarch.c -# $(gzip-sources) $(bzip2-sources) +# $(gzip-sources) OBJS = main.o hostarch.o exec.o hashexec.o \ execServer.o exec_startupServer.o -# $(gzip-objects) $(bzip2-objects) +# $(gzip-objects) gzip-sources = unzip.c util.c inflate.c gzip-objects = $(gzip-sources:%.c=%.o) -bzip2-sources = do-bunzip2.c -bzip2-objects = $(bzip2-sources:%.c=%.o) target = exec #targets = exec exec.static @@ -40,6 +38,6 @@ exec-MIGSFLAGS = -imacros $(srcdir)/execmutations.h include ../Makeconf -CPPFLAGS += # -DGZIP -DBZIP2 -DBFD +CPPFLAGS += # -DGZIP -DBFD exec.static exec: $(OBJS) $(library_deps) -- cgit v1.2.3