From 680d3712ff0bf7798d5aa3fac0dda58934ae3532 Mon Sep 17 00:00:00 2001
From: Mark Huang <mlhuang@cs.princeton.edu>
Date: Fri, 17 Sep 2004 18:00:35 +0000
Subject: [PATCH] Merge to User Mode Linux 2.6.8.1-1um (uml-patch-2.6.8.1-1)

---
 arch/um/Makefile                              |   2 +-
 arch/um/drivers/hostaudio_user.c              | 130 +++++++++++++++
 arch/um/drivers/stdio_console.c               |  14 +-
 arch/um/include/hostaudio.h                   |  48 ++++++
 arch/um/include/sysdep-i386/checksum.h        |   2 +-
 arch/um/kernel/init_task.c                    |   1 -
 arch/um/kernel/mprot.h                        |   6 +
 arch/um/kernel/sys_call_table.c               | 150 +++++++++++++++++-
 arch/um/sys-i386/Makefile                     |   8 +-
 ...=> kernel-2.6.8-i686-uml-planetlab.config} |  19 ++-
 include/asm-um/module.h                       |  13 ++
 11 files changed, 370 insertions(+), 23 deletions(-)
 create mode 100644 arch/um/drivers/hostaudio_user.c
 create mode 100644 arch/um/include/hostaudio.h
 create mode 100644 arch/um/kernel/mprot.h
 rename configs/{kernel-2.6.7-i686-uml-planetlab.config => kernel-2.6.8-i686-uml-planetlab.config} (97%)
 create mode 100644 include/asm-um/module.h

diff --git a/arch/um/Makefile b/arch/um/Makefile
index 5dfc32025..803d12eab 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -48,7 +48,7 @@ endif
 include $(ARCH_DIR)/Makefile-$(SUBARCH)
 include $(ARCH_DIR)/Makefile-os-$(OS)
 
-EXTRAVERSION := $(EXTRAVERSION)-2um
+EXTRAVERSION := $(EXTRAVERSION)-1um
 
 ARCH_INCLUDE = -I$(ARCH_DIR)/include
 
diff --git a/arch/um/drivers/hostaudio_user.c b/arch/um/drivers/hostaudio_user.c
new file mode 100644
index 000000000..b89fefb4a
--- /dev/null
+++ b/arch/um/drivers/hostaudio_user.c
@@ -0,0 +1,130 @@
+/* 
+ * Copyright (C) 2002 Steve Schmidtke 
+ * Licensed under the GPL
+ */
+
+#include <sys/types.h>
+#include <unistd.h>
+#include <errno.h>
+#include "hostaudio.h"
+#include "user_util.h"
+#include "kern_util.h"
+#include "user.h"
+#include "os.h"
+
+/* /dev/dsp file operations */
+
+ssize_t hostaudio_read_user(struct hostaudio_state *state, char *buffer, 
+			    size_t count, loff_t *ppos)
+{
+#ifdef DEBUG
+        printk("hostaudio: read_user called, count = %d\n", count);
+#endif
+
+	return(os_read_file(state->fd, buffer, count));
+}
+
+ssize_t hostaudio_write_user(struct hostaudio_state *state, const char *buffer,
+			     size_t count, loff_t *ppos)
+{
+#ifdef DEBUG
+        printk("hostaudio: write_user called, count = %d\n", count);
+#endif
+
+	return(os_write_file(state->fd, buffer, count));
+}
+
+int hostaudio_ioctl_user(struct hostaudio_state *state, unsigned int cmd, 
+			 unsigned long arg)
+{
+#ifdef DEBUG
+        printk("hostaudio: ioctl_user called, cmd = %u\n", cmd);
+#endif
+
+	return(os_ioctl_generic(state->fd, cmd, arg));
+}
+
+int hostaudio_open_user(struct hostaudio_state *state, int r, int w, char *dsp)
+{
+#ifdef DEBUG
+        printk("hostaudio: open_user called\n");
+#endif
+
+	state->fd = os_open_file(dsp, of_set_rw(OPENFLAGS(), r, w), 0);
+
+	if(state->fd < 0) {
+		printk("hostaudio_open_user failed to open '%s', err = %d\n",
+		       dsp, -state->fd);
+		return(state->fd); 
+	}
+        
+	return(0);
+}
+
+int hostaudio_release_user(struct hostaudio_state *state)
+{
+#ifdef DEBUG
+        printk("hostaudio: release called\n");
+#endif
+	if(state->fd >= 0){
+		os_close_file(state->fd);
+		state->fd = -1;
+	}
+
+        return(0);
+}
+
+/* /dev/mixer file operations */
+
+int hostmixer_ioctl_mixdev_user(struct hostmixer_state *state, 
+				unsigned int cmd, unsigned long arg)
+{
+#ifdef DEBUG
+        printk("hostmixer: ioctl_user called cmd = %u\n",cmd);
+#endif
+
+	return(os_ioctl_generic(state->fd, cmd, arg));
+}
+
+int hostmixer_open_mixdev_user(struct hostmixer_state *state, int r, int w,
+			       char *mixer)
+{
+#ifdef DEBUG
+        printk("hostmixer: open_user called\n");
+#endif
+
+        state->fd = os_open_file(mixer, of_set_rw(OPENFLAGS(), r, w), 0);
+
+	if(state->fd < 0) {
+	        printk("hostaudio_open_mixdev_user failed to open '%s', "
+		       "err = %d\n", mixer, state->fd);
+		return(state->fd); 
+	}
+        
+	return(0);
+}
+
+int hostmixer_release_mixdev_user(struct hostmixer_state *state)
+{
+#ifdef DEBUG
+        printk("hostmixer: release_user called\n");
+#endif
+
+        if(state->fd >= 0){
+		os_close_file(state->fd);
+		state->fd = -1;
+        }
+
+        return 0;
+}
+
+/*
+ * Overrides for Emacs so that we follow Linus's tabbing style.
+ * Emacs will notice this stuff at the end of the file and automatically
+ * adjust the settings for this buffer only.  This must remain at the end
+ * of the file.
+ * ---------------------------------------------------------------------------
+ * Local variables:
+ * c-file-style: "linux"
+ * End:
+ */
diff --git a/arch/um/drivers/stdio_console.c b/arch/um/drivers/stdio_console.c
index 94b4d5575..90fb3a7e1 100644
--- a/arch/um/drivers/stdio_console.c
+++ b/arch/um/drivers/stdio_console.c
@@ -191,8 +191,8 @@ int stdio_init(void)
 
 late_initcall(stdio_init);
 
-static void stdio_console_write(struct console *console, const char *string, 
-				unsigned len)
+static void uml_console_write(struct console *console, const char *string, 
+			      unsigned len)
 {
 	struct line *line = &vts[console->index];
 
@@ -203,22 +203,22 @@ static void stdio_console_write(struct console *console, const char *string,
 		up(&line->sem);
 }
 
-static struct tty_driver *stdio_console_device(struct console *c, int *index)
+static struct tty_driver *uml_console_device(struct console *c, int *index)
 {
 	*index = c->index;
 	return console_driver;
 }
 
-static int stdio_console_setup(struct console *co, char *options)
+static int uml_console_setup(struct console *co, char *options)
 {
 	return(0);
 }
 
 static struct console stdiocons = {
 	name:		"tty",
-	write:		stdio_console_write,
-	device:		stdio_console_device,
-	setup:		stdio_console_setup,
+	write:		uml_console_write,
+	device:		uml_console_device,
+	setup:		uml_console_setup,
 	flags:		CON_PRINTBUFFER,
 	index:		-1,
 };
diff --git a/arch/um/include/hostaudio.h b/arch/um/include/hostaudio.h
new file mode 100644
index 000000000..797b3f24e
--- /dev/null
+++ b/arch/um/include/hostaudio.h
@@ -0,0 +1,48 @@
+/* 
+ * Copyright (C) 2002 Steve Schmidtke 
+ * Licensed under the GPL
+ */
+
+#ifndef HOSTAUDIO_H
+#define HOSTAUDIO_H
+
+#define HOSTAUDIO_DEV_DSP "/dev/sound/dsp"
+#define HOSTAUDIO_DEV_MIXER "/dev/sound/mixer"
+
+struct hostaudio_state {
+  int fd;
+};
+
+struct hostmixer_state {
+  int fd;
+};
+
+/* UML user-side protoypes */
+extern ssize_t hostaudio_read_user(struct hostaudio_state *state, char *buffer,
+				   size_t count, loff_t *ppos);
+extern ssize_t hostaudio_write_user(struct hostaudio_state *state, 
+				    const char *buffer, size_t count, 
+				    loff_t *ppos);
+extern int hostaudio_ioctl_user(struct hostaudio_state *state, 
+				unsigned int cmd, unsigned long arg);
+extern int hostaudio_open_user(struct hostaudio_state *state, int r, int w, 
+			       char *dsp);
+extern int hostaudio_release_user(struct hostaudio_state *state);
+extern int hostmixer_ioctl_mixdev_user(struct hostmixer_state *state, 
+				unsigned int cmd, unsigned long arg);
+extern int hostmixer_open_mixdev_user(struct hostmixer_state *state, int r, 
+				      int w, char *mixer);
+extern int hostmixer_release_mixdev_user(struct hostmixer_state *state);
+
+#endif /* HOSTAUDIO_H */
+
+/*
+ * Overrides for Emacs so that we follow Linus's tabbing style.
+ * Emacs will notice this stuff at the end of the file and automatically
+ * adjust the settings for this buffer only.  This must remain at the end
+ * of the file.
+ * ---------------------------------------------------------------------------
+ * Local variables:
+ * c-file-style: "linux"
+ * End:
+ */
diff --git a/arch/um/include/sysdep-i386/checksum.h b/arch/um/include/sysdep-i386/checksum.h
index 0694eaa80..bac91c1b8 100644
--- a/arch/um/include/sysdep-i386/checksum.h
+++ b/arch/um/include/sysdep-i386/checksum.h
@@ -5,8 +5,8 @@
 #ifndef __UM_SYSDEP_CHECKSUM_H
 #define __UM_SYSDEP_CHECKSUM_H
 
-#include "linux/string.h"
 #include "linux/in6.h"
+#include "linux/string.h"
 
 /*
  * computes the checksum of a memory block at buff, length len,
diff --git a/arch/um/kernel/init_task.c b/arch/um/kernel/init_task.c
index b9bc53221..cd7c85be0 100644
--- a/arch/um/kernel/init_task.c
+++ b/arch/um/kernel/init_task.c
@@ -8,7 +8,6 @@
 #include "linux/module.h"
 #include "linux/sched.h"
 #include "linux/init_task.h"
-#include "linux/version.h"
 #include "linux/mqueue.h"
 #include "asm/uaccess.h"
 #include "asm/pgtable.h"
diff --git a/arch/um/kernel/mprot.h b/arch/um/kernel/mprot.h
new file mode 100644
index 000000000..83dc8ccee
--- /dev/null
+++ b/arch/um/kernel/mprot.h
@@ -0,0 +1,6 @@
+#ifndef __MPROT_H__
+#define __MPROT_H__
+
+extern void no_access(unsigned long addr, unsigned int len);
+
+#endif
diff --git a/arch/um/kernel/sys_call_table.c b/arch/um/kernel/sys_call_table.c
index 83beea7cc..fa0542c82 100644
--- a/arch/um/kernel/sys_call_table.c
+++ b/arch/um/kernel/sys_call_table.c
@@ -52,6 +52,7 @@ extern syscall_handler_t old_mmap_i386;
 extern syscall_handler_t old_select;
 extern syscall_handler_t sys_modify_ldt;
 extern syscall_handler_t sys_rt_sigsuspend;
+
 extern syscall_handler_t sys_vserver;
 
 syscall_handler_t *sys_call_table[] = {
@@ -107,7 +108,154 @@ syscall_handler_t *sys_call_table[] = {
 	[ __NR_times ] (syscall_handler_t *) sys_times,
 	[ __NR_prof ] (syscall_handler_t *) sys_ni_syscall,
 	[ __NR_brk ] (syscall_handler_t *) sys_brk,
-	[ __NR_setgid ] (syscall_handler_t *) sys_setgid1
+	[ __NR_setgid ] (syscall_handler_t *) sys_setgid16,
+	[ __NR_getgid ] (syscall_handler_t *) sys_getgid16,
+	[ __NR_signal ] (syscall_handler_t *) sys_signal,
+	[ __NR_geteuid ] (syscall_handler_t *) sys_geteuid16,
+	[ __NR_getegid ] (syscall_handler_t *) sys_getegid16,
+	[ __NR_acct ] (syscall_handler_t *) sys_acct,
+	[ __NR_umount2 ] (syscall_handler_t *) sys_umount,
+	[ __NR_lock ] (syscall_handler_t *) sys_ni_syscall,
+	[ __NR_ioctl ] (syscall_handler_t *) sys_ioctl,
+	[ __NR_fcntl ] (syscall_handler_t *) sys_fcntl,
+	[ __NR_mpx ] (syscall_handler_t *) sys_ni_syscall,
+	[ __NR_setpgid ] (syscall_handler_t *) sys_setpgid,
+	[ __NR_ulimit ] (syscall_handler_t *) sys_ni_syscall,
+	[ __NR_oldolduname ] (syscall_handler_t *) sys_olduname,
+	[ __NR_umask ] (syscall_handler_t *) sys_umask,
+	[ __NR_chroot ] (syscall_handler_t *) sys_chroot,
+	[ __NR_ustat ] (syscall_handler_t *) sys_ustat,
+	[ __NR_dup2 ] (syscall_handler_t *) sys_dup2,
+	[ __NR_getppid ] (syscall_handler_t *) sys_getppid,
+	[ __NR_getpgrp ] (syscall_handler_t *) sys_getpgrp,
+	[ __NR_setsid ] = (syscall_handler_t *) sys_setsid,
+	[ __NR_sigaction ] (syscall_handler_t *) sys_sigaction,
+	[ __NR_sgetmask ] (syscall_handler_t *) sys_sgetmask,
+	[ __NR_ssetmask ] (syscall_handler_t *) sys_ssetmask,
+	[ __NR_setreuid ] (syscall_handler_t *) sys_setreuid16,
+	[ __NR_setregid ] (syscall_handler_t *) sys_setregid16,
+	[ __NR_sigsuspend ] (syscall_handler_t *) sys_sigsuspend,
+	[ __NR_sigpending ] (syscall_handler_t *) sys_sigpending,
+	[ __NR_sethostname ] (syscall_handler_t *) sys_sethostname,
+	[ __NR_setrlimit ] (syscall_handler_t *) sys_setrlimit,
+	[ __NR_getrlimit ] (syscall_handler_t *) sys_old_getrlimit,
+	[ __NR_getrusage ] (syscall_handler_t *) sys_getrusage,
+	[ __NR_gettimeofday ] (syscall_handler_t *) sys_gettimeofday,
+	[ __NR_settimeofday ] (syscall_handler_t *) sys_settimeofday,
+	[ __NR_getgroups ] (syscall_handler_t *) sys_getgroups16,
+	[ __NR_setgroups ] (syscall_handler_t *) sys_setgroups16,
+	[ __NR_symlink ] (syscall_handler_t *) sys_symlink,
+	[ __NR_oldlstat ] (syscall_handler_t *) sys_lstat,
+	[ __NR_readlink ] (syscall_handler_t *) sys_readlink,
+	[ __NR_uselib ] (syscall_handler_t *) sys_uselib,
+	[ __NR_swapon ] = (syscall_handler_t *) sys_swapon,
+	[ __NR_reboot ] (syscall_handler_t *) sys_reboot,
+	[ __NR_readdir ] = old_readdir,
+	[ __NR_munmap ] (syscall_handler_t *) sys_munmap,
+	[ __NR_truncate ] (syscall_handler_t *) sys_truncate,
+	[ __NR_ftruncate ] (syscall_handler_t *) sys_ftruncate,
+	[ __NR_fchmod ] (syscall_handler_t *) sys_fchmod,
+	[ __NR_fchown ] (syscall_handler_t *) sys_fchown16,
+	[ __NR_getpriority ] (syscall_handler_t *) sys_getpriority,
+	[ __NR_setpriority ] (syscall_handler_t *) sys_setpriority,
+	[ __NR_profil ] (syscall_handler_t *) sys_ni_syscall,
+	[ __NR_statfs ] (syscall_handler_t *) sys_statfs,
+	[ __NR_fstatfs ] (syscall_handler_t *) sys_fstatfs,
+	[ __NR_ioperm ] (syscall_handler_t *) sys_ni_syscall,
+	[ __NR_socketcall ] (syscall_handler_t *) sys_socketcall,
+	[ __NR_syslog ] (syscall_handler_t *) sys_syslog,
+	[ __NR_setitimer ] (syscall_handler_t *) sys_setitimer,
+	[ __NR_getitimer ] (syscall_handler_t *) sys_getitimer,
+	[ __NR_stat ] (syscall_handler_t *) sys_newstat,
+	[ __NR_lstat ] (syscall_handler_t *) sys_newlstat,
+	[ __NR_fstat ] (syscall_handler_t *) sys_newfstat,
+	[ __NR_olduname ] (syscall_handler_t *) sys_uname,
+	[ __NR_iopl ] (syscall_handler_t *) sys_ni_syscall,
+	[ __NR_vhangup ] (syscall_handler_t *) sys_vhangup,
+	[ __NR_idle ] (syscall_handler_t *) sys_ni_syscall,
+	[ __NR_wait4 ] = (syscall_handler_t *) sys_wait4,
+	[ __NR_swapoff ] = (syscall_handler_t *) sys_swapoff,
+	[ __NR_sysinfo ] (syscall_handler_t *) sys_sysinfo,
+	[ __NR_ipc ] (syscall_handler_t *) sys_ipc,
+	[ __NR_fsync ] (syscall_handler_t *) sys_fsync,
+	[ __NR_sigreturn ] (syscall_handler_t *) sys_sigreturn,
+	[ __NR_clone ] (syscall_handler_t *) sys_clone,
+	[ __NR_setdomainname ] (syscall_handler_t *) sys_setdomainname,
+	[ __NR_uname ] (syscall_handler_t *) sys_newuname,
+	[ __NR_adjtimex ] (syscall_handler_t *) sys_adjtimex,
+	[ __NR_mprotect ] (syscall_handler_t *) sys_mprotect,
+	[ __NR_sigprocmask ] (syscall_handler_t *) sys_sigprocmask,
+	[ __NR_create_module ] (syscall_handler_t *) sys_ni_syscall,
+	[ __NR_init_module ] (syscall_handler_t *) sys_init_module,
+	[ __NR_delete_module ] (syscall_handler_t *) sys_delete_module,
+	[ __NR_get_kernel_syms ] (syscall_handler_t *) sys_ni_syscall,
+	[ __NR_quotactl ] (syscall_handler_t *) sys_quotactl,
+	[ __NR_getpgid ] (syscall_handler_t *) sys_getpgid,
+	[ __NR_fchdir ] (syscall_handler_t *) sys_fchdir,
+	[ __NR_bdflush ] (syscall_handler_t *) sys_bdflush,
+	[ __NR_sysfs ] (syscall_handler_t *) sys_sysfs,
+	[ __NR_personality ] (syscall_handler_t *) sys_personality,
+	[ __NR_afs_syscall ] (syscall_handler_t *) sys_ni_syscall,
+	[ __NR_setfsuid ] (syscall_handler_t *) sys_setfsuid16,
+	[ __NR_setfsgid ] (syscall_handler_t *) sys_setfsgid16,
+	[ __NR__llseek ] (syscall_handler_t *) sys_llseek,
+	[ __NR_getdents ] (syscall_handler_t *) sys_getdents,
+	[ __NR__newselect ] = (syscall_handler_t *) sys_select,
+	[ __NR_flock ] (syscall_handler_t *) sys_flock,
+	[ __NR_msync ] (syscall_handler_t *) sys_msync,
+	[ __NR_readv ] (syscall_handler_t *) sys_readv,
+	[ __NR_writev ] (syscall_handler_t *) sys_writev,
+	[ __NR_getsid ] (syscall_handler_t *) sys_getsid,
+	[ __NR_fdatasync ] (syscall_handler_t *) sys_fdatasync,
+	[ __NR__sysctl ] = (syscall_handler_t *) sys_sysctl,
+	[ __NR_mlock ] (syscall_handler_t *) sys_mlock,
+	[ __NR_munlock ] (syscall_handler_t *) sys_munlock,
+	[ __NR_mlockall ] (syscall_handler_t *) sys_mlockall,
+	[ __NR_munlockall ] (syscall_handler_t *) sys_munlockall,
+	[ __NR_sched_setparam ] (syscall_handler_t *) sys_sched_setparam,
+	[ __NR_sched_getparam ] (syscall_handler_t *) sys_sched_getparam,
+	[ __NR_sched_setscheduler ] (syscall_handler_t *) sys_sched_setscheduler,
+	[ __NR_sched_getscheduler ] (syscall_handler_t *) sys_sched_getscheduler,
+	[ __NR_sched_yield ] = (syscall_handler_t *) yield,
+	[ __NR_sched_get_priority_max ] (syscall_handler_t *) sys_sched_get_priority_max,
+	[ __NR_sched_get_priority_min ] (syscall_handler_t *) sys_sched_get_priority_min,
+	[ __NR_sched_rr_get_interval ] (syscall_handler_t *) sys_sched_rr_get_interval,
+	[ __NR_nanosleep ] (syscall_handler_t *) sys_nanosleep,
+	[ __NR_mremap ] (syscall_handler_t *) sys_mremap,
+	[ __NR_setresuid ] (syscall_handler_t *) sys_setresuid16,
+	[ __NR_getresuid ] (syscall_handler_t *) sys_getresuid16,
+	[ __NR_vm86 ] (syscall_handler_t *) sys_ni_syscall,
+	[ __NR_query_module ] (syscall_handler_t *) sys_ni_syscall,
+	[ __NR_poll ] (syscall_handler_t *) sys_poll,
+	[ __NR_nfsservctl ] = (syscall_handler_t *) NFSSERVCTL,
+	[ __NR_setresgid ] (syscall_handler_t *) sys_setresgid16,
+	[ __NR_getresgid ] (syscall_handler_t *) sys_getresgid16,
+	[ __NR_prctl ] (syscall_handler_t *) sys_prctl,
+	[ __NR_rt_sigreturn ] (syscall_handler_t *) sys_rt_sigreturn,
+	[ __NR_rt_sigaction ] (syscall_handler_t *) sys_rt_sigaction,
+	[ __NR_rt_sigprocmask ] (syscall_handler_t *) sys_rt_sigprocmask,
+	[ __NR_rt_sigpending ] (syscall_handler_t *) sys_rt_sigpending,
+	[ __NR_rt_sigtimedwait ] (syscall_handler_t *) sys_rt_sigtimedwait,
+	[ __NR_rt_sigqueueinfo ] (syscall_handler_t *) sys_rt_sigqueueinfo,
+	[ __NR_rt_sigsuspend ] (syscall_handler_t *) sys_rt_sigsuspend,
+	[ __NR_pread64 ] (syscall_handler_t *) sys_pread64,
+	[ __NR_pwrite64 ] (syscall_handler_t *) sys_pwrite64,
+	[ __NR_chown ] (syscall_handler_t *) sys_chown16,
+	[ __NR_getcwd ] (syscall_handler_t *) sys_getcwd,
+	[ __NR_capget ] (syscall_handler_t *) sys_capget,
+	[ __NR_capset ] (syscall_handler_t *) sys_capset,
+	[ __NR_sigaltstack ] (syscall_handler_t *) sys_sigaltstack,
+	[ __NR_sendfile ] (syscall_handler_t *) sys_sendfile,
+	[ __NR_getpmsg ] (syscall_handler_t *) sys_ni_syscall,
+	[ __NR_putpmsg ] (syscall_handler_t *) sys_ni_syscall,
+	[ __NR_vfork ] (syscall_handler_t *) sys_vfork,
+	[ __NR_ugetrlimit ] (syscall_handler_t *) sys_getrlimit,
+	[ __NR_mmap2 ] (syscall_handler_t *) sys_mmap2,
+	[ __NR_truncate64 ] (syscall_handler_t *) sys_truncate64,
+	[ __NR_ftruncate64 ] (syscall_handler_t *) sys_ftruncate64,
+	[ __NR_stat64 ] (syscall_handler_t *) sys_stat64,
+	[ __NR_lstat64 ] (syscall_handler_t *) sys_lstat64,
+	[ __NR_fstat64 ] (syscall_handler_t *) sys_fstat64,
 	[ __NR_getdents64 ] (syscall_handler_t *) sys_getdents64,
 	[ __NR_fcntl64 ] (syscall_handler_t *) sys_fcntl64,
 	[ 223 ] (syscall_handler_t *) sys_ni_syscall,
diff --git a/arch/um/sys-i386/Makefile b/arch/um/sys-i386/Makefile
index 6e351e41a..d489f4b4e 100644
--- a/arch/um/sys-i386/Makefile
+++ b/arch/um/sys-i386/Makefile
@@ -1,5 +1,5 @@
-obj-y = bugs.o checksum.o fault.o ksyms.o ldt.o ptrace.o ptrace_user.o \
-	semaphore.o bitops.o sigcontext.o syscalls.o sysrq.o
+obj-y = bitops.o bugs.o checksum.o fault.o ksyms.o ldt.o ptrace.o \
+	ptrace_user.o semaphore.o sigcontext.o syscalls.o sysrq.o
 
 obj-$(CONFIG_HIGHMEM) += highmem.o
 obj-$(CONFIG_MODULES) += module.o
@@ -7,15 +7,15 @@ obj-$(CONFIG_MODULES) += module.o
 USER_OBJS := bugs.o ptrace_user.o sigcontext.o fault.o
 USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file))
 
-SYMLINKS = semaphore.c highmem.c module.c bitops.c
+SYMLINKS = bitops.c semaphore.c highmem.c module.c
 SYMLINKS := $(foreach f,$(SYMLINKS),$(src)/$f)
 
 clean-files := $(SYMLINKS)
 
+bitops.c-dir = lib
 semaphore.c-dir = kernel
 highmem.c-dir = mm
 module.c-dir = kernel
-bitops.c-dir = lib
 
 define make_link
 	-rm -f $1
diff --git a/configs/kernel-2.6.7-i686-uml-planetlab.config b/configs/kernel-2.6.8-i686-uml-planetlab.config
similarity index 97%
rename from configs/kernel-2.6.7-i686-uml-planetlab.config
rename to configs/kernel-2.6.8-i686-uml-planetlab.config
index 0069c2cdf..bd7f1339b 100644
--- a/configs/kernel-2.6.7-i686-uml-planetlab.config
+++ b/configs/kernel-2.6.8-i686-uml-planetlab.config
@@ -35,7 +35,6 @@ CONFIG_UML_REAL_TIME_CLOCK=y
 #
 CONFIG_EXPERIMENTAL=y
 CONFIG_CLEAN_COMPILE=y
-CONFIG_STANDALONE=y
 CONFIG_BROKEN_ON_SMP=y
 
 #
@@ -83,6 +82,7 @@ CONFIG_KMOD=y
 #
 # Generic Driver Options
 #
+CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 
 #
@@ -247,13 +247,15 @@ CONFIG_IP_NF_MATCH_REALM=m
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_FASTROUTE is not set
 # CONFIG_NET_HW_FLOWCONTROL is not set
 
 #
 # QoS and/or fair queueing
 #
 CONFIG_NET_SCHED=y
+CONFIG_NET_SCH_CLK_JIFFIES=y
+# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
+# CONFIG_NET_SCH_CLK_CPU is not set
 # CONFIG_NET_SCH_CBQ is not set
 CONFIG_NET_SCH_HTB=m
 # CONFIG_NET_SCH_HFSC is not set
@@ -279,6 +281,7 @@ CONFIG_NET_CLS_ROUTE=y
 # CONFIG_HAMRADIO is not set
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
+# CONFIG_TUX is not set
 CONFIG_DUMMY=m
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
@@ -288,7 +291,6 @@ CONFIG_TUN=m
 # Ethernet (10 or 100Mbit)
 #
 # CONFIG_NET_ETHERNET is not set
-# CONFIG_NE2000 is not set
 
 #
 # Ethernet (1000 Mbit)
@@ -389,7 +391,6 @@ CONFIG_RAMFS=y
 # CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
 # CONFIG_CRAMFS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_HPFS_FS is not set
@@ -463,13 +464,15 @@ CONFIG_NLS_DEFAULT="utf8"
 # Linux VServer
 #
 CONFIG_VSERVER_LEGACY=y
-# CONFIG_PROC_SECURE is not set
+# CONFIG_VSERVER_PROC_SECURE is not set
 CONFIG_VSERVER_HARDCPU=y
 # CONFIG_INOXID_NONE is not set
+# CONFIG_INOXID_UID16 is not set
 # CONFIG_INOXID_GID16 is not set
-CONFIG_INOXID_GID24=y
-# CONFIG_INOXID_GID32 is not set
-# CONFIG_INOXID_MAGIC is not set
+CONFIG_INOXID_UGID24=y
+# CONFIG_INOXID_INTERN is not set
+# CONFIG_INOXID_RUNTIME is not set
+CONFIG_VSERVER_DEBUG=y
 
 #
 # Security options
diff --git a/include/asm-um/module.h b/include/asm-um/module.h
new file mode 100644
index 000000000..dae3ddf6b
--- /dev/null
+++ b/include/asm-um/module.h
@@ -0,0 +1,13 @@
+#ifndef __UM_MODULE_H
+#define __UM_MODULE_H
+
+/* UML is simple */
+struct mod_arch_specific
+{
+};
+
+#define Elf_Shdr Elf32_Shdr
+#define Elf_Sym Elf32_Sym
+#define Elf_Ehdr Elf32_Ehdr
+
+#endif
-- 
2.47.0