Index: kernel/arch/amd64/src/asm.S
===================================================================
--- kernel/arch/amd64/src/asm.S	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/arch/amd64/src/asm.S	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -362,5 +362,13 @@
 	 */
 	call syscall_handler
-	
+
+	/*
+	 * Test if the saved return address is canonical and not-kernel.
+	 * We do this by looking at the 16 most significant bits
+	 * of the saved return address (two bytes at offset 6).
+	 */
+	testw $0xffff, ISTATE_OFFSET_RIP+6(%rsp)
+	jnz bad_rip 
+
 	cli
 	
@@ -388,4 +396,14 @@
 	sysretq
 
+bad_rip:
+	movq %rsp, %rdi
+	movabs $bad_rip_msg, %rsi
+	xorb %al, %al
+	callq fault_from_uspace
+	/* not reached */
+	
+bad_rip_msg:
+	.asciz "Invalid instruction pointer."
+
 /** Print Unicode character to EGA display.
  *
Index: kernel/arch/amd64/src/boot/multiboot.S
===================================================================
--- kernel/arch/amd64/src/boot/multiboot.S	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/arch/amd64/src/boot/multiboot.S	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -76,4 +76,5 @@
 
 multiboot_image_start:
+	cli
 	cld
 	
@@ -81,6 +82,10 @@
 	movl $START_STACK, %esp
 	
-	/* Initialize Global Descriptor Table register */
+	/*
+	 * Initialize Global Descriptor Table and
+	 * Interrupt Descriptor Table registers
+	 */
 	lgdtl bootstrap_gdtr
+	lidtl bootstrap_idtr
 	
 	/* Kernel data + stack */
@@ -645,4 +650,9 @@
 .section K_DATA_START, "aw", @progbits
 
+.global bootstrap_idtr
+bootstrap_idtr:
+	.word 0
+	.long 0
+
 .global bootstrap_gdtr
 bootstrap_gdtr:
Index: kernel/arch/amd64/src/boot/multiboot2.S
===================================================================
--- kernel/arch/amd64/src/boot/multiboot2.S	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/arch/amd64/src/boot/multiboot2.S	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -116,4 +116,5 @@
 
 multiboot2_image_start:
+	cli
 	cld
 	
@@ -121,6 +122,10 @@
 	movl $START_STACK, %esp
 	
-	/* Initialize Global Descriptor Table register */
+	/*
+	 * Initialize Global Descriptor Table and
+	 * Interrupt Descriptor Table registers
+	 */
 	lgdtl bootstrap_gdtr
+	lidtl bootstrap_idtr
 	
 	/* Kernel data + stack */
Index: kernel/arch/amd64/src/boot/vesa_ret.inc
===================================================================
--- kernel/arch/amd64/src/boot/vesa_ret.inc	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/arch/amd64/src/boot/vesa_ret.inc	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -1,4 +1,5 @@
 .code32
 vesa_init_protected:
+	cli
 	cld
 	
Index: kernel/arch/ia32/src/boot/multiboot.S
===================================================================
--- kernel/arch/ia32/src/boot/multiboot.S	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/arch/ia32/src/boot/multiboot.S	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -73,4 +73,5 @@
 
 multiboot_image_start:
+	cli
 	cld
 	
@@ -78,6 +79,10 @@
 	movl $START_STACK, %esp
 	
-	/* Initialize Global Descriptor Table register */
+	/*
+	 * Initialize Global Descriptor Table and
+	 * Interrupt Descriptor Table registers
+	 */
 	lgdtl bootstrap_gdtr
+	lidtl bootstrap_idtr
 	
 	/* Kernel data + stack */
@@ -701,4 +706,9 @@
 page_directory:
 	.space 4096, 0
+
+.global bootstrap_idtr
+bootstrap_idtr:
+	.word 0
+	.long 0
 
 .global bootstrap_gdtr
Index: kernel/arch/ia32/src/boot/multiboot2.S
===================================================================
--- kernel/arch/ia32/src/boot/multiboot2.S	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/arch/ia32/src/boot/multiboot2.S	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -114,4 +114,5 @@
 
 multiboot2_image_start:
+	cli
 	cld
 	
@@ -119,6 +120,10 @@
 	movl $START_STACK, %esp
 	
-	/* Initialize Global Descriptor Table register */
+	/*
+	 * Initialize Global Descriptor Table and
+	 * Interrupt Descriptor Table registers
+	 */
 	lgdtl bootstrap_gdtr
+	lidtl bootstrap_idtr
 	
 	/* Kernel data + stack */
Index: kernel/arch/ia32/src/boot/vesa_prot.inc
===================================================================
--- kernel/arch/ia32/src/boot/vesa_prot.inc	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/arch/ia32/src/boot/vesa_prot.inc	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -88,4 +88,11 @@
 		/* Returned back to protected mode */
 		
+		/*
+		 * Initialize Global Descriptor Table and
+		 * Interrupt Descriptor Table registers
+		 */
+		lgdtl bootstrap_gdtr
+		lidtl bootstrap_idtr
+		
 		movzx %ax, %ecx
 		mov %ecx, KA2PA(bfb_scanline)
Index: kernel/arch/ia32/src/boot/vesa_real.inc
===================================================================
--- kernel/arch/ia32/src/boot/vesa_real.inc	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/arch/ia32/src/boot/vesa_real.inc	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -30,5 +30,10 @@
 .code32
 vesa_init:
+	lidtl vesa_idtr
 	jmp $GDT_SELECTOR(VESA_INIT_DES), $vesa_init_real - vesa_init
+
+vesa_idtr:
+	.word 0x3ff
+	.long 0
 
 .code16
Index: kernel/arch/ia32/src/boot/vesa_ret.inc
===================================================================
--- kernel/arch/ia32/src/boot/vesa_ret.inc	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/arch/ia32/src/boot/vesa_ret.inc	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -1,4 +1,5 @@
 .code32
 vesa_init_protected:
+	cli
 	cld
 	
Index: kernel/arch/ia64/Makefile.inc
===================================================================
--- kernel/arch/ia64/Makefile.inc	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/arch/ia64/Makefile.inc	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -30,5 +30,15 @@
 BFD_ARCH = ia64-elf64
 
-CMN1 = -mconstant-gp -fno-unwind-tables -mfixed-range=f32-f127
+#
+# FIXME:
+#
+# The -fno-selective-scheduling and -fno-selective-scheduling2 options
+# should be removed as soon as a bug in GCC concerning unchecked
+# speculative loads is fixed.
+#
+# See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53975 for reference.
+#
+
+CMN1 = -mconstant-gp -fno-unwind-tables -mfixed-range=f32-f127 -fno-selective-scheduling -fno-selective-scheduling2
 GCC_CFLAGS += $(CMN1)
 ICC_CFLAGS += $(CMN1)
Index: kernel/arch/mips32/Makefile.inc
===================================================================
--- kernel/arch/mips32/Makefile.inc	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/arch/mips32/Makefile.inc	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -29,5 +29,5 @@
 BFD_ARCH = mips
 BFD = binary
-GCC_CFLAGS += -mno-abicalls -G 0 -fno-zero-initialized-in-bss -mips3 -mabi=32
+GCC_CFLAGS += -msoft-float -mno-abicalls -G 0 -fno-zero-initialized-in-bss -mips3 -mabi=32
 
 BITS = 32
@@ -48,5 +48,4 @@
 	BFD_NAME = elf32-tradlittlemips
 	ENDIANESS = LE
-	GCC_CFLAGS += -mhard-float
 endif
 
Index: kernel/arch/mips64/Makefile.inc
===================================================================
--- kernel/arch/mips64/Makefile.inc	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/arch/mips64/Makefile.inc	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -29,5 +29,5 @@
 BFD_ARCH = mips:4000
 BFD = binary
-GCC_CFLAGS += -mno-abicalls -G 0 -fno-zero-initialized-in-bss -mips3 -mabi=64
+GCC_CFLAGS += -msoft-float -mno-abicalls -G 0 -fno-zero-initialized-in-bss -mips3 -mabi=64
 AFLAGS = -64
 
@@ -40,5 +40,4 @@
 	BFD_NAME = elf64-tradlittlemips
 	ENDIANESS = LE
-	GCC_CFLAGS += -mhard-float
 endif
 
Index: kernel/generic/include/interrupt.h
===================================================================
--- kernel/generic/include/interrupt.h	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/generic/include/interrupt.h	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -38,4 +38,5 @@
 #include <arch/interrupt.h>
 #include <print.h>
+#include <stdarg.h>
 #include <typedefs.h>
 #include <proc/task.h>
@@ -58,4 +59,6 @@
 extern exc_table_t exc_table[];
 
+extern void fault_from_uspace(istate_t *, const char *, ...)
+    PRINTF_ATTRIBUTE(2, 3);
 extern void fault_if_from_uspace(istate_t *, const char *, ...)
     PRINTF_ATTRIBUTE(2, 3);
Index: kernel/generic/include/ipc/ipc.h
===================================================================
--- kernel/generic/include/ipc/ipc.h	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/generic/include/ipc/ipc.h	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -77,7 +77,4 @@
 	waitq_t wq;
 	
-	/** Linkage for the list of task's synchronous answerboxes. */
-	link_t sync_box_link;
-	
 	/** Phones connected to this answerbox. */
 	list_t connected_phones;
@@ -116,10 +113,4 @@
 	struct task *sender;
 	
-	/*
-	 * The caller box is different from sender->answerbox
-	 * for synchronous calls.
-	 */
-	answerbox_t *callerbox;
-	
 	/** Private data to internal IPC. */
 	sysarg_t priv;
@@ -147,5 +138,4 @@
 
 extern int ipc_call(phone_t *, call_t *);
-extern int ipc_call_sync(phone_t *, call_t *);
 extern call_t *ipc_wait_for_call(answerbox_t *, uint32_t, unsigned int);
 extern int ipc_forward(call_t *, phone_t *, answerbox_t *, unsigned int);
Index: kernel/generic/include/ipc/irq.h
===================================================================
--- kernel/generic/include/ipc/irq.h	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/generic/include/ipc/irq.h	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -37,8 +37,8 @@
 
 /** Maximum number of IPC IRQ programmed I/O ranges. */
-#define IRQ_MAX_RANGE_COUNT	8
+#define IRQ_MAX_RANGE_COUNT  8
 
 /** Maximum length of IPC IRQ program. */
-#define IRQ_MAX_PROG_SIZE  20
+#define IRQ_MAX_PROG_SIZE  256
 
 #include <ipc/ipc.h>
Index: kernel/generic/include/ipc/sysipc.h
===================================================================
--- kernel/generic/include/ipc/sysipc.h	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/generic/include/ipc/sysipc.h	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -40,7 +40,4 @@
 #include <typedefs.h>
 
-extern sysarg_t sys_ipc_call_sync_fast(sysarg_t, sysarg_t, sysarg_t,
-    sysarg_t, sysarg_t, ipc_data_t *);
-extern sysarg_t sys_ipc_call_sync_slow(sysarg_t, ipc_data_t *, ipc_data_t *);
 extern sysarg_t sys_ipc_call_async_fast(sysarg_t, sysarg_t, sysarg_t,
     sysarg_t, sysarg_t, sysarg_t);
Index: kernel/generic/include/print.h
===================================================================
--- kernel/generic/include/print.h	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/generic/include/print.h	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -38,15 +38,5 @@
 #include <typedefs.h>
 #include <stdarg.h>
-
-#ifndef NVERIFY_PRINTF
-
-#define PRINTF_ATTRIBUTE(start, end) \
-	__attribute__((format(gnu_printf, start, end)))
-
-#else /* NVERIFY_PRINTF */
-
-#define PRINTF_ATTRIBUTE(start, end)
-
-#endif /* NVERIFY_PRINTF */
+#include <printf/verify.h>
 
 #define EOF  (-1)
Index: kernel/generic/include/printf/verify.h
===================================================================
--- kernel/generic/include/printf/verify.h	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
+++ kernel/generic/include/printf/verify.h	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2012 Martin Decky
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup generic
+ * @{
+ */
+/** @file
+ */
+
+#ifndef KERN_PRINTF_VERIFY_H_
+#define KERN_PRINTF_VERIFY_H_
+
+#ifndef NVERIFY_PRINTF
+
+#define PRINTF_ATTRIBUTE(start, end) \
+	__attribute__((format(gnu_printf, start, end)))
+
+#else /* NVERIFY_PRINTF */
+
+#define PRINTF_ATTRIBUTE(start, end)
+
+#endif /* NVERIFY_PRINTF */
+
+#endif
+
+/** @}
+ */
Index: kernel/generic/include/proc/task.h
===================================================================
--- kernel/generic/include/proc/task.h	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/generic/include/proc/task.h	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -94,5 +94,4 @@
 	phone_t phones[IPC_MAX_PHONES];
 	stats_ipc_t ipc_info;   /**< IPC statistics */
-	list_t sync_boxes;      /**< List of synchronous answerboxes. */
 	event_t events[EVENT_TASK_END - EVENT_END];
 	
Index: kernel/generic/src/console/kconsole.c
===================================================================
--- kernel/generic/src/console/kconsole.c	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/generic/src/console/kconsole.c	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -202,11 +202,14 @@
  *
  */
-NO_TRACE static int cmdtab_compl(char *input, size_t size, indev_t * indev)
+NO_TRACE static int cmdtab_compl(char *input, size_t size, indev_t *indev)
 {
 	const char *name = input;
 	
 	size_t found = 0;
-	/* Maximum Match Length : Length of longest matching common substring in
-	   case more than one match is found */
+	
+	/*
+	 * Maximum Match Length: Length of longest matching common
+	 * substring in case more than one match is found.
+	 */
 	size_t max_match_len = size;
 	size_t max_match_len_tmp = size;
@@ -229,8 +232,12 @@
 	}
 	
-	/* If possible completions are more than MAX_TAB_HINTS, ask user whether to display them or not. */
+	/*
+	 * If the number of possible completions is more than MAX_TAB_HINTS,
+	 * ask the user whether to display them or not.
+	 */
 	if (found > MAX_TAB_HINTS) {
 		printf("\n");
-		continue_showing_hints = console_prompt_display_all_hints(indev, found);
+		continue_showing_hints =
+		    console_prompt_display_all_hints(indev, found);
 	}
 	
@@ -240,21 +247,28 @@
 		while (cmdtab_search_one(name, &pos)) {
 			cmd_info_t *hlp = list_get_instance(pos, cmd_info_t, link);
-
+			
 			if (continue_showing_hints) {
 				printf("%s (%s)\n", hlp->name, hlp->description);
 				--hints_to_show;
 				++total_hints_shown;
-
-				if (hints_to_show == 0 && total_hints_shown != found) { /* Time to ask user to continue */
-					continue_showing_hints = console_prompt_more_hints(indev, &hints_to_show);
+				
+				if ((hints_to_show == 0) && (total_hints_shown != found)) {
+					/* Ask user to continue */
+					continue_showing_hints =
+					    console_prompt_more_hints(indev, &hints_to_show);
 				}
 			}
-
+			
 			pos = pos->next;
-			for(max_match_len_tmp = 0; output[max_match_len_tmp] == hlp->name[input_len + max_match_len_tmp]
-					&& max_match_len_tmp < max_match_len; ++max_match_len_tmp);
+			
+			for (max_match_len_tmp = 0;
+			    (output[max_match_len_tmp] ==
+			    hlp->name[input_len + max_match_len_tmp]) &&
+			    (max_match_len_tmp < max_match_len); ++max_match_len_tmp);
+			
 			max_match_len = max_match_len_tmp;
 		}
-		/* keep only the characters common in all completions */
+		
+		/* Keep only the characters common in all completions */
 		output[max_match_len] = 0;
 	}
@@ -310,6 +324,8 @@
 				continue;
 			
-			/* Find the beginning of the word
-			   and copy it to tmp */
+			/*
+			 * Find the beginning of the word
+			 * and copy it to tmp
+			 */
 			size_t beg;
 			for (beg = position - 1; (beg > 0) && (!isspace(current[beg]));
@@ -333,6 +349,8 @@
 				continue;
 
-			/* We have hints, may be many. In case of more than one hint,
-			   tmp will contain the common prefix. */
+			/*
+			 * We have hints, possibly many. In case of more than one hint,
+			 * tmp will contain the common prefix.
+			 */
 			size_t off = 0;
 			size_t i = 0;
@@ -340,4 +358,5 @@
 				if (!wstr_linsert(current, ch, position + i, MAX_CMDLINE))
 					break;
+				
 				i++;
 			}
Index: kernel/generic/src/console/prompt.c
===================================================================
--- kernel/generic/src/console/prompt.c	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/generic/src/console/prompt.c	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -43,5 +43,7 @@
  * @param indev Where to read characters from.
  * @param hints Number of hints that would be displayed.
+ *
  * @return Whether to print all hints.
+ *
  */
 bool console_prompt_display_all_hints(indev_t *indev, size_t hints)
@@ -49,17 +51,17 @@
 	ASSERT(indev);
 	ASSERT(hints > 0);
-
-	printf("Display all %zu possibilities? (y or n)", hints);
-
+	
+	printf("Display all %zu possibilities? (y or n) ", hints);
+	
 	while (true) {
 		wchar_t answer = indev_pop_character(indev);
-
-		if (answer == 'y' || answer == 'Y') {
-			printf(" y");
+		
+		if ((answer == 'y') || (answer == 'Y')) {
+			printf("y");
 			return true;
 		}
-
-		if (answer == 'n' || answer == 'N') {
-			printf(" n");
+		
+		if ((answer == 'n') || (answer == 'N')) {
+			printf("n");
 			return false;
 		}
@@ -71,7 +73,9 @@
  * When the function returns false, @p display_hints is set to zero.
  *
- * @param[in] indev Where to read characters from.
+ * @param[in]  indev         Where to read characters from.
  * @param[out] display_hints How many hints to display.
+ *
  * @return Whether to display more hints.
+ *
  */
 bool console_prompt_more_hints(indev_t *indev, size_t *display_hints)
@@ -79,25 +83,25 @@
 	ASSERT(indev);
 	ASSERT(display_hints != NULL);
-
+	
 	printf("--More--");
 	while (true) {
 		wchar_t continue_showing_hints = indev_pop_character(indev);
 		/* Display a full page again? */
-		if (continue_showing_hints == 'y'
-		    || continue_showing_hints == 'Y'
-		    || continue_showing_hints == ' ') {
+		if ((continue_showing_hints == 'y') ||
+		    (continue_showing_hints == 'Y') ||
+		    (continue_showing_hints == ' ')) {
 			*display_hints = MAX_TAB_HINTS - 1;
 			break;
 		}
-
+		
 		/* Stop displaying hints? */
-		if (continue_showing_hints == 'n'
-		    || continue_showing_hints == 'N'
-		    || continue_showing_hints == 'q'
-		    || continue_showing_hints == 'Q') {
+		if ((continue_showing_hints == 'n') ||
+		    (continue_showing_hints == 'N') ||
+		    (continue_showing_hints == 'q') ||
+		    (continue_showing_hints == 'Q')) {
 			*display_hints = 0;
 			break;
 		}
-
+		
 		/* Show one more hint? */
 		if (continue_showing_hints == '\n') {
@@ -106,8 +110,8 @@
 		}
 	}
-
+	
 	/* Delete the --More-- option */
 	printf("\r         \r");
-
+	
 	return *display_hints > 0;
 }
Index: kernel/generic/src/debug/symtab.c
===================================================================
--- kernel/generic/src/debug/symtab.c	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/generic/src/debug/symtab.c	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -210,5 +210,5 @@
  *
  */
-int symtab_compl(char *input, size_t size, indev_t * indev)
+int symtab_compl(char *input, size_t size, indev_t *indev)
 {
 #ifdef CONFIG_SYMTAB
@@ -227,6 +227,9 @@
 	const char *hint;
 	char output[MAX_SYMBOL_NAME];
-	/* Maximum Match Length : Length of longest matching common substring in
-	   case more than one match is found */
+	
+	/*
+	 * Maximum Match Length: Length of longest matching common substring in
+	 * case more than one match is found.
+	 */
 	size_t max_match_len = size;
 	size_t max_match_len_tmp = size;
@@ -238,9 +241,8 @@
 	
 	output[0] = 0;
-
-	while ((hint = symtab_search_one(name, &pos))) {
-		++pos;
-	}
-
+	
+	while ((hint = symtab_search_one(name, &pos)))
+		pos++;
+	
 	pos = 0;
 	
@@ -253,8 +255,12 @@
 	}
 	
-	/* If possible completions are more than MAX_TAB_HINTS, ask user whether to display them or not. */
+	/*
+	 * If the number of possible completions is more than MAX_TAB_HINTS,
+	 * ask the user whether to display them or not.
+	 */
 	if (found > MAX_TAB_HINTS) {
 		printf("\n");
-		continue_showing_hints = console_prompt_display_all_hints(indev, found);
+		continue_showing_hints =
+		    console_prompt_display_all_hints(indev, found);
 	}
 	
@@ -265,20 +271,27 @@
 			sym_name = symbol_table[pos].symbol_name;
 			pos++;
-
-			if (continue_showing_hints) { /* We are still showing hints */
+			
+			if (continue_showing_hints) {
+				/* We are still showing hints */
 				printf("%s\n", sym_name);
 				--hints_to_show;
 				++total_hints_shown;
-
-				if (hints_to_show == 0 && total_hints_shown != found) { /* Time to ask user to continue */
-					continue_showing_hints = console_prompt_more_hints(indev, &hints_to_show);
+				
+				if ((hints_to_show == 0) && (total_hints_shown != found)) {
+					/* Ask the user to continue */
+					continue_showing_hints =
+					    console_prompt_more_hints(indev, &hints_to_show);
 				}
 			}
-
-			for(max_match_len_tmp = 0; output[max_match_len_tmp] == sym_name[input_len + max_match_len_tmp]
-					&& max_match_len_tmp < max_match_len; ++max_match_len_tmp);
+			
+			for (max_match_len_tmp = 0;
+			    (output[max_match_len_tmp] ==
+			    sym_name[input_len + max_match_len_tmp]) &&
+			    (max_match_len_tmp < max_match_len); ++max_match_len_tmp);
+			
 			max_match_len = max_match_len_tmp;
 		}
-		/* keep only the characters common in all completions */
+		
+		/* Keep only the characters common in all completions */
 		output[max_match_len] = 0;
 	}
Index: kernel/generic/src/interrupt/interrupt.c
===================================================================
--- kernel/generic/src/interrupt/interrupt.c	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/generic/src/interrupt/interrupt.c	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -50,4 +50,5 @@
 #include <panic.h>
 #include <print.h>
+#include <stdarg.h>
 #include <symtab.h>
 #include <proc/thread.h>
@@ -165,12 +166,6 @@
 }
 
-/** Terminate thread and task if exception came from userspace.
- *
- */
-NO_TRACE void fault_if_from_uspace(istate_t *istate, const char *fmt, ...)
-{
-	if (!istate_from_uspace(istate))
-		return;
-	
+static NO_TRACE void fault_from_uspace_core(istate_t *istate, const char *fmt, va_list args)
+{
 	printf("Task %s (%" PRIu64 ") killed due to an exception at "
 	    "program counter %p.\n", TASK->name, TASK->taskid,
@@ -181,12 +176,34 @@
 	
 	printf("Kill message: ");
+	vprintf(fmt, args);
+	printf("\n");
+	
+	task_kill_self(true);
+}
+
+/** Terminate thread and task after the exception came from userspace.
+ *
+ */
+NO_TRACE void fault_from_uspace(istate_t *istate, const char *fmt, ...)
+{
+	va_list args;
+
+	va_start(args, fmt);
+	fault_from_uspace_core(istate, fmt, args);
+	va_end(args);
+}
+
+/** Terminate thread and task if exception came from userspace.
+ *
+ */
+NO_TRACE void fault_if_from_uspace(istate_t *istate, const char *fmt, ...)
+{
+	if (!istate_from_uspace(istate))
+		return;
 	
 	va_list args;
 	va_start(args, fmt);
-	vprintf(fmt, args);
+	fault_from_uspace_core(istate, fmt, args);
 	va_end(args);
-	printf("\n");
-	
-	task_kill_self(true);
 }
 
Index: kernel/generic/src/ipc/ipc.c
===================================================================
--- kernel/generic/src/ipc/ipc.c	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/generic/src/ipc/ipc.c	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -71,5 +71,4 @@
 {
 	memsetb(call, sizeof(*call), 0);
-	call->callerbox = &TASK->answerbox;
 	call->sender = TASK;
 	call->buffer = NULL;
@@ -120,5 +119,4 @@
 	irq_spinlock_initialize(&box->irq_lock, "ipc.box.irqlock");
 	waitq_initialize(&box->wq);
-	link_initialize(&box->sync_box_link);
 	list_initialize(&box->connected_phones);
 	list_initialize(&box->calls);
@@ -163,47 +161,4 @@
 }
 
-/** Helper function to facilitate synchronous calls.
- *
- * @param phone   Destination kernel phone structure.
- * @param request Call structure with request.
- *
- * @return EOK on success or EINTR if the sleep was interrupted.
- *
- */
-int ipc_call_sync(phone_t *phone, call_t *request)
-{
-	answerbox_t *sync_box = slab_alloc(ipc_answerbox_slab, 0);
-	ipc_answerbox_init(sync_box, TASK);
-	
-	/*
-	 * Put the answerbox on the TASK's list of synchronous answerboxes so
-	 * that it can be cleaned up if the call is interrupted.
-	 */
-	irq_spinlock_lock(&TASK->lock, true);
-	list_append(&sync_box->sync_box_link, &TASK->sync_boxes);
-	irq_spinlock_unlock(&TASK->lock, true);
-	
-	/* We will receive data in a special box. */
-	request->callerbox = sync_box;
-	
-	ipc_call(phone, request);
-	if (!ipc_wait_for_call(sync_box, SYNCH_NO_TIMEOUT,
-	    SYNCH_FLAGS_INTERRUPTIBLE)) {
-		/* The answerbox and the call will be freed by ipc_cleanup(). */
-		return EINTR;
-	}
-	
-	/*
-	 * The answer arrived without interruption so we can remove the
-	 * answerbox from the TASK's list of synchronous answerboxes.
-	 */
-	irq_spinlock_lock(&TASK->lock, true);
-	list_remove(&sync_box->sync_box_link);
-	irq_spinlock_unlock(&TASK->lock, true);
-	
-	slab_free(ipc_answerbox_slab, sync_box);
-	return EOK;
-}
-
 /** Answer a message which was not dispatched and is not listed in any queue.
  *
@@ -214,5 +169,5 @@
 static void _ipc_answer_free_call(call_t *call, bool selflocked)
 {
-	answerbox_t *callerbox = call->callerbox;
+	answerbox_t *callerbox = &call->sender->answerbox;
 	bool do_lock = ((!selflocked) || callerbox != (&TASK->answerbox));
 	
@@ -606,18 +561,4 @@
 	ipc_cleanup_call_list(&TASK->answerbox.calls);
 	irq_spinlock_unlock(&TASK->answerbox.lock, true);
-	
-	/* Wait for all answers to interrupted synchronous calls to arrive */
-	ipl_t ipl = interrupts_disable();
-	while (!list_empty(&TASK->sync_boxes)) {
-		answerbox_t *box = list_get_instance(
-		    list_first(&TASK->sync_boxes), answerbox_t, sync_box_link);
-		
-		list_remove(&box->sync_box_link);
-		call_t *call = ipc_wait_for_call(box, SYNCH_NO_TIMEOUT,
-		    SYNCH_FLAGS_NONE);
-		ipc_call_free(call);
-		slab_free(ipc_answerbox_slab, box);
-	}
-	interrupts_restore(ipl);
 	
 	/* Wait for all answers to asynchronous calls to arrive */
Index: kernel/generic/src/ipc/irq.c
===================================================================
--- kernel/generic/src/ipc/irq.c	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/generic/src/ipc/irq.c	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -39,14 +39,14 @@
  * when interrupt is detected. The application may provide a simple 'top-half'
  * handler as part of its registration, which can perform simple operations
- * (read/write port/memory, add information to notification ipc message).
+ * (read/write port/memory, add information to notification IPC message).
  *
  * The structure of a notification message is as follows:
  * - IMETHOD: interface and method as registered by
  *            the SYS_IRQ_REGISTER syscall
- * - ARG1: payload modified by a 'top-half' handler
- * - ARG2: payload modified by a 'top-half' handler
- * - ARG3: payload modified by a 'top-half' handler
- * - ARG4: payload modified by a 'top-half' handler
- * - ARG5: payload modified by a 'top-half' handler
+ * - ARG1: payload modified by a 'top-half' handler (scratch[1])
+ * - ARG2: payload modified by a 'top-half' handler (scratch[2])
+ * - ARG3: payload modified by a 'top-half' handler (scratch[3])
+ * - ARG4: payload modified by a 'top-half' handler (scratch[4])
+ * - ARG5: payload modified by a 'top-half' handler (scratch[5])
  * - in_phone_hash: interrupt counter (may be needed to assure correct order
  *                  in multithreaded drivers)
@@ -87,7 +87,5 @@
 static void ranges_unmap(irq_pio_range_t *ranges, size_t rangecount)
 {
-	size_t i;
-
-	for (i = 0; i < rangecount; i++) {
+	for (size_t i = 0; i < rangecount; i++) {
 #ifdef IO_SPACE_BOUNDARY
 		if ((void *) ranges[i].base >= IO_SPACE_BOUNDARY)
@@ -100,14 +98,11 @@
     irq_cmd_t *cmds, size_t cmdcount)
 {
-	uintptr_t *pbase;
-	size_t i, j;
-
 	/* Copy the physical base addresses aside. */
-	pbase = malloc(rangecount * sizeof(uintptr_t), 0);
-	for (i = 0; i < rangecount; i++)
+	uintptr_t *pbase = malloc(rangecount * sizeof(uintptr_t), 0);
+	for (size_t i = 0; i < rangecount; i++)
 		pbase[i] = ranges[i].base;
-
+	
 	/* Map the PIO ranges into the kernel virtual address space. */
-	for (i = 0; i < rangecount; i++) {
+	for (size_t i = 0; i < rangecount; i++) {
 #ifdef IO_SPACE_BOUNDARY
 		if ((void *) ranges[i].base < IO_SPACE_BOUNDARY)
@@ -122,25 +117,25 @@
 		}
 	}
-
+	
 	/* Rewrite the pseudocode addresses from physical to kernel virtual. */
-	for (i = 0; i < cmdcount; i++) {
+	for (size_t i = 0; i < cmdcount; i++) {
 		uintptr_t addr;
 		size_t size;
-
+		
 		/* Process only commands that use an address. */
 		switch (cmds[i].cmd) {
 		case CMD_PIO_READ_8:
-        	case CMD_PIO_WRITE_8:
-        	case CMD_PIO_WRITE_A_8:
+		case CMD_PIO_WRITE_8:
+		case CMD_PIO_WRITE_A_8:
 			size = 1;
 			break;
-        	case CMD_PIO_READ_16:
-        	case CMD_PIO_WRITE_16:
-        	case CMD_PIO_WRITE_A_16:
+		case CMD_PIO_READ_16:
+		case CMD_PIO_WRITE_16:
+		case CMD_PIO_WRITE_A_16:
 			size = 2;
 			break;
-        	case CMD_PIO_READ_32:
-        	case CMD_PIO_WRITE_32:
-        	case CMD_PIO_WRITE_A_32:
+		case CMD_PIO_READ_32:
+		case CMD_PIO_WRITE_32:
+		case CMD_PIO_WRITE_A_32:
 			size = 4;
 			break;
@@ -149,21 +144,21 @@
 			continue;
 		}
-
+		
 		addr = (uintptr_t) cmds[i].addr;
 		
+		size_t j;
 		for (j = 0; j < rangecount; j++) {
-
 			/* Find the matching range. */
 			if (!iswithin(pbase[j], ranges[j].size, addr, size))
 				continue;
-
+			
 			/* Switch the command to a kernel virtual address. */
 			addr -= pbase[j];
 			addr += ranges[j].base;
-
+			
 			cmds[i].addr = (void *) addr;
 			break;
 		}
-
+		
 		if (j == rangecount) {
 			/*
@@ -176,6 +171,46 @@
 		}
 	}
-
+	
 	free(pbase);
+	return EOK;
+}
+
+/** Statically check the top-half pseudocode
+ *
+ * Check the top-half pseudocode for invalid or unsafe
+ * constructs.
+ *
+ */
+static int code_check(irq_cmd_t *cmds, size_t cmdcount)
+{
+	for (size_t i = 0; i < cmdcount; i++) {
+		/*
+		 * Check for accepted ranges.
+		 */
+		if (cmds[i].cmd >= CMD_LAST)
+			return EINVAL;
+		
+		if (cmds[i].srcarg >= IPC_CALL_LEN)
+			return EINVAL;
+		
+		if (cmds[i].dstarg >= IPC_CALL_LEN)
+			return EINVAL;
+		
+		switch (cmds[i].cmd) {
+		case CMD_PREDICATE:
+			/*
+			 * Check for control flow overflow.
+			 * Note that jumping just beyond the last
+			 * command is a correct behaviour.
+			 */
+			if (i + cmds[i].value > cmdcount)
+				return EINVAL;
+			
+			break;
+		default:
+			break;
+		}
+	}
+	
 	return EOK;
 }
@@ -207,5 +242,5 @@
 	irq_pio_range_t *ranges = NULL;
 	irq_cmd_t *cmds = NULL;
-
+	
 	irq_code_t *code = malloc(sizeof(*code), 0);
 	int rc = copy_from_uspace(code, ucode, sizeof(*code));
@@ -222,5 +257,5 @@
 	if (rc != EOK)
 		goto error;
-
+	
 	cmds = malloc(sizeof(code->cmds[0]) * code->cmdcount, 0);
 	rc = copy_from_uspace(cmds, code->cmds,
@@ -228,20 +263,26 @@
 	if (rc != EOK)
 		goto error;
-
+	
+	rc = code_check(cmds, code->cmdcount);
+	if (rc != EOK)
+		goto error;
+	
 	rc = ranges_map_and_apply(ranges, code->rangecount, cmds,
 	    code->cmdcount);
 	if (rc != EOK)
 		goto error;
-
+	
 	code->ranges = ranges;
 	code->cmds = cmds;
-
+	
 	return code;
-
+	
 error:
 	if (cmds)
 		free(cmds);
+	
 	if (ranges)
 		free(ranges);
+	
 	free(code);
 	return NULL;
@@ -250,11 +291,12 @@
 /** Register an answerbox as a receiving end for IRQ notifications.
  *
- * @param box		Receiving answerbox.
- * @param inr		IRQ number.
- * @param devno		Device number.
- * @param imethod	Interface and method to be associated with the
- *			notification.
- * @param ucode		Uspace pointer to top-half pseudocode.
- * @return		EOK on success or a negative error code.
+ * @param box     Receiving answerbox.
+ * @param inr     IRQ number.
+ * @param devno   Device number.
+ * @param imethod Interface and method to be associated with the
+ *                notification.
+ * @param ucode   Uspace pointer to top-half pseudocode.
+ *
+ * @return EOK on success or a negative error code.
  *
  */
@@ -266,5 +308,5 @@
 		(sysarg_t) devno
 	};
-
+	
 	if ((inr < 0) || (inr > last_inr))
 		return ELIMIT;
@@ -329,8 +371,10 @@
 /** Unregister task from IRQ notification.
  *
- * @param box		Answerbox associated with the notification.
- * @param inr		IRQ number.
- * @param devno		Device number.
- * @return		EOK on success or a negative error code.
+ * @param box   Answerbox associated with the notification.
+ * @param inr   IRQ number.
+ * @param devno Device number.
+ *
+ * @return EOK on success or a negative error code.
+ *
  */
 int ipc_irq_unregister(answerbox_t *box, inr_t inr, devno_t devno)
@@ -340,5 +384,5 @@
 		(sysarg_t) devno
 	};
-
+	
 	if ((inr < 0) || (inr > last_inr))
 		return ELIMIT;
@@ -436,5 +480,5 @@
 		/* Remove from the hash table. */
 		hash_table_remove(&irq_uspace_hash_table, key, 2);
-
+		
 		/*
 		 * Release both locks so that we can free the pseudo code.
@@ -442,5 +486,5 @@
 		irq_spinlock_unlock(&box->irq_lock, false);
 		irq_spinlock_unlock(&irq_uspace_hash_table_lock, true);
-
+		
 		code_free(irq->notif_cfg.code);
 		free(irq);
@@ -492,30 +536,19 @@
 	
 	for (size_t i = 0; i < code->cmdcount; i++) {
-		uint32_t dstval;
-		
 		uintptr_t srcarg = code->cmds[i].srcarg;
 		uintptr_t dstarg = code->cmds[i].dstarg;
 		
-		if (srcarg >= IPC_CALL_LEN)
-			break;
-		
-		if (dstarg >= IPC_CALL_LEN)
-			break;
-	
 		switch (code->cmds[i].cmd) {
 		case CMD_PIO_READ_8:
-			dstval = pio_read_8((ioport8_t *) code->cmds[i].addr);
-			if (dstarg)
-				scratch[dstarg] = dstval;
+			scratch[dstarg] =
+			    pio_read_8((ioport8_t *) code->cmds[i].addr);
 			break;
 		case CMD_PIO_READ_16:
-			dstval = pio_read_16((ioport16_t *) code->cmds[i].addr);
-			if (dstarg)
-				scratch[dstarg] = dstval;
+			scratch[dstarg] =
+			    pio_read_16((ioport16_t *) code->cmds[i].addr);
 			break;
 		case CMD_PIO_READ_32:
-			dstval = pio_read_32((ioport32_t *) code->cmds[i].addr);
-			if (dstarg)
-				scratch[dstarg] = dstval;
+			scratch[dstarg] =
+			    pio_read_32((ioport32_t *) code->cmds[i].addr);
 			break;
 		case CMD_PIO_WRITE_8:
@@ -532,32 +565,26 @@
 			break;
 		case CMD_PIO_WRITE_A_8:
-			if (srcarg) {
-				pio_write_8((ioport8_t *) code->cmds[i].addr,
-				    (uint8_t) scratch[srcarg]);
-			}
+			pio_write_8((ioport8_t *) code->cmds[i].addr,
+			    (uint8_t) scratch[srcarg]);
 			break;
 		case CMD_PIO_WRITE_A_16:
-			if (srcarg) {
-				pio_write_16((ioport16_t *) code->cmds[i].addr,
-				    (uint16_t) scratch[srcarg]);
-			}
+			pio_write_16((ioport16_t *) code->cmds[i].addr,
+			    (uint16_t) scratch[srcarg]);
 			break;
 		case CMD_PIO_WRITE_A_32:
-			if (srcarg) {
-				pio_write_32((ioport32_t *) code->cmds[i].addr,
-				    (uint32_t) scratch[srcarg]);
-			}
-			break;
-		case CMD_BTEST:
-			if ((srcarg) && (dstarg)) {
-				dstval = scratch[srcarg] & code->cmds[i].value;
-				scratch[dstarg] = dstval;
-			}
+			pio_write_32((ioport32_t *) code->cmds[i].addr,
+			    (uint32_t) scratch[srcarg]);
+			break;
+		case CMD_LOAD:
+			scratch[dstarg] = code->cmds[i].value;
+			break;
+		case CMD_AND:
+			scratch[dstarg] = scratch[srcarg] &
+			    code->cmds[i].value;
 			break;
 		case CMD_PREDICATE:
-			if ((srcarg) && (!scratch[srcarg])) {
+			if (scratch[srcarg] == 0)
 				i += code->cmds[i].value;
-				continue;
-			}
+			
 			break;
 		case CMD_ACCEPT:
@@ -582,5 +609,5 @@
 {
 	ASSERT(irq);
-
+	
 	ASSERT(interrupts_disabled());
 	ASSERT(irq_spinlock_locked(&irq->lock));
Index: kernel/generic/src/ipc/sysipc.c
===================================================================
--- kernel/generic/src/ipc/sysipc.c	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/generic/src/ipc/sysipc.c	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -612,123 +612,4 @@
 		break;
 	}
-	
-	return 0;
-}
-
-/** Make a fast call over IPC, wait for reply and return to user.
- *
- * This function can handle only three arguments of payload, but is faster than
- * the generic function (i.e. sys_ipc_call_sync_slow()).
- *
- * @param phoneid Phone handle for the call.
- * @param imethod Interface and method of the call.
- * @param arg1    Service-defined payload argument.
- * @param arg2    Service-defined payload argument.
- * @param arg3    Service-defined payload argument.
- * @param data    Address of user-space structure where the reply call will
- *                be stored.
- *
- * @return 0 on success.
- * @return ENOENT if there is no such phone handle.
- *
- */
-sysarg_t sys_ipc_call_sync_fast(sysarg_t phoneid, sysarg_t imethod,
-    sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, ipc_data_t *data)
-{
-	phone_t *phone;
-	if (phone_get(phoneid, &phone) != EOK)
-		return ENOENT;
-	
-	call_t *call = ipc_call_alloc(0);
-	IPC_SET_IMETHOD(call->data, imethod);
-	IPC_SET_ARG1(call->data, arg1);
-	IPC_SET_ARG2(call->data, arg2);
-	IPC_SET_ARG3(call->data, arg3);
-	
-	/*
-	 * To achieve deterministic behavior, zero out arguments that are beyond
-	 * the limits of the fast version.
-	 */
-	IPC_SET_ARG4(call->data, 0);
-	IPC_SET_ARG5(call->data, 0);
-	
-	int res = request_preprocess(call, phone);
-	int rc;
-	
-	if (!res) {
-#ifdef CONFIG_UDEBUG
-		udebug_stoppable_begin();
-#endif
-		rc = ipc_call_sync(phone, call);
-#ifdef CONFIG_UDEBUG
-		udebug_stoppable_end();
-#endif
-		
-		if (rc != EOK) {
-			/* The call will be freed by ipc_cleanup(). */
-			return rc;
-		}
-		
-		process_answer(call);
-	} else
-		IPC_SET_RETVAL(call->data, res);
-	
-	rc = STRUCT_TO_USPACE(&data->args, &call->data.args);
-	ipc_call_free(call);
-	if (rc != 0)
-		return rc;
-	
-	return 0;
-}
-
-/** Make a synchronous IPC call allowing to transmit the entire payload.
- *
- * @param phoneid Phone handle for the call.
- * @param request User-space address of call data with the request.
- * @param reply   User-space address of call data where to store the
- *                answer.
- *
- * @return Zero on success or an error code.
- *
- */
-sysarg_t sys_ipc_call_sync_slow(sysarg_t phoneid, ipc_data_t *request,
-    ipc_data_t *reply)
-{
-	phone_t *phone;
-	if (phone_get(phoneid, &phone) != EOK)
-		return ENOENT;
-	
-	call_t *call = ipc_call_alloc(0);
-	int rc = copy_from_uspace(&call->data.args, &request->args,
-	    sizeof(call->data.args));
-	if (rc != 0) {
-		ipc_call_free(call);
-		return (sysarg_t) rc;
-	}
-	
-	int res = request_preprocess(call, phone);
-	
-	if (!res) {
-#ifdef CONFIG_UDEBUG
-		udebug_stoppable_begin();
-#endif
-		rc = ipc_call_sync(phone, call);
-#ifdef CONFIG_UDEBUG
-		udebug_stoppable_end();
-#endif
-		
-		if (rc != EOK) {
-			/* The call will be freed by ipc_cleanup(). */
-			return rc;
-		}
-		
-		process_answer(call);
-	} else
-		IPC_SET_RETVAL(call->data, res);
-	
-	rc = STRUCT_TO_USPACE(&reply->args, &call->data.args);
-	ipc_call_free(call);
-	if (rc != 0)
-		return rc;
 	
 	return 0;
Index: kernel/generic/src/lib/str.c
===================================================================
--- kernel/generic/src/lib/str.c	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/generic/src/lib/str.c	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -456,12 +456,17 @@
  *
  * Do a char-by-char comparison of two NULL-terminated strings.
- * The strings are considered equal iff they consist of the same
- * characters on the minimum of their lengths.
+ * The strings are considered equal iff their length is equal
+ * and both strings consist of the same sequence of characters.
+ *
+ * A string S1 is less than another string S2 if it has a character with
+ * lower value at the first character position where the strings differ.
+ * If the strings differ in length, the shorter one is treated as if
+ * padded by characters with a value of zero.
  *
  * @param s1 First string to compare.
  * @param s2 Second string to compare.
  *
- * @return 0 if the strings are equal, -1 if first is smaller,
- *         1 if second smaller.
+ * @return 0 if the strings are equal, -1 if the first is less than the second,
+ *         1 if the second is less than the first.
  *
  */
@@ -494,6 +499,14 @@
  *
  * Do a char-by-char comparison of two NULL-terminated strings.
- * The strings are considered equal iff they consist of the same
- * characters on the minimum of their lengths and the length limit.
+ * The strings are considered equal iff
+ * min(str_length(s1), max_len) == min(str_length(s2), max_len)
+ * and both strings consist of the same sequence of characters,
+ * up to max_len characters.
+ *
+ * A string S1 is less than another string S2 if it has a character with
+ * lower value at the first character position where the strings differ.
+ * If the strings differ in length, the shorter one is treated as if
+ * padded by characters with a value of zero. Only the first max_len
+ * characters are considered.
  *
  * @param s1      First string to compare.
@@ -501,6 +514,6 @@
  * @param max_len Maximum number of characters to consider.
  *
- * @return 0 if the strings are equal, -1 if first is smaller,
- *         1 if second smaller.
+ * @return 0 if the strings are equal, -1 if the first is less than the second,
+ *         1 if the second is less than the first.
  *
  */
Index: kernel/generic/src/proc/task.c
===================================================================
--- kernel/generic/src/proc/task.c	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/generic/src/proc/task.c	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -156,5 +156,4 @@
 	
 	list_initialize(&task->threads);
-	list_initialize(&task->sync_boxes);
 	
 	ipc_answerbox_init(&task->answerbox, task);
Index: kernel/generic/src/syscall/syscall.c
===================================================================
--- kernel/generic/src/syscall/syscall.c	(revision e0d5bc58083a7cd9a8327d934709edaa0afdc535)
+++ kernel/generic/src/syscall/syscall.c	(revision 96e01fbc11ddb623f6753a5b3bfea1ff0345260e)
@@ -151,6 +151,4 @@
 	
 	/* IPC related syscalls. */
-	(syshandler_t) sys_ipc_call_sync_fast,
-	(syshandler_t) sys_ipc_call_sync_slow,
 	(syshandler_t) sys_ipc_call_async_fast,
 	(syshandler_t) sys_ipc_call_async_slow,
