--- ./include/asm-i386/unistd.h.SYSCALL	Wed Feb 20 14:17:01 2002
+++ ./include/asm-i386/unistd.h	Thu Apr  4 10:28:19 2002
@@ -242,6 +242,7 @@
 #define __NR_removexattr	235
 #define __NR_lremovexattr	236
 #define __NR_fremovexattr	237
+#define __NR_log_message	238
 
 /* user-visible error numbers are in the range -1 - -124: see <asm-i386/errno.h> */
 
--- ./arch/i386/kernel/entry.S.SYSCALL	Wed Feb 20 14:16:50 2002
+++ ./arch/i386/kernel/entry.S	Thu Apr  4 10:27:56 2002
@@ -634,6 +634,7 @@
 	.long SYMBOL_NAME(sys_ni_syscall)	/* 235 reserved for removexattr */
 	.long SYMBOL_NAME(sys_ni_syscall)	/* reserved for lremovexattr */
 	.long SYMBOL_NAME(sys_ni_syscall)	/* reserved for fremovexattr */
+	.long SYMBOL_NAME(sys_log_message)	/* 238: log_message */
 
 	.rept NR_syscalls-(.-sys_call_table)/4
 		.long SYMBOL_NAME(sys_ni_syscall)
--- ./kernel/printk.c.SYSCALL	Wed Feb 20 14:17:02 2002
+++ ./kernel/printk.c	Thu Apr  4 12:44:16 2002
@@ -475,6 +475,33 @@
 }
 EXPORT_SYMBOL(printk);
 
+/*
+ * sys_log_message:
+ * This syscall takes one null-terminated string (@message) and its length (@len)
+ * from (privileged) userspace and prints it to the system message log.
+ * cf. ptrace.c::ptrace_writedata()
+ * cf. sys.c::copy_from_user() and syscalls.
+ */
+asmlinkage int sys_log_message(const char * message, int len)
+{
+	int errno;
+	char msg[256];
+ 
+	if (!capable(CAP_SYS_ADMIN))
+		return -EPERM;
+	if (len < 0 || len >= sizeof(msg))
+		return -EINVAL;
+
+	errno = -EFAULT;
+	if (!copy_from_user(msg, message, len)) {
+		msg[len] = 0;
+		errno = 0;
+		printk("%s", msg);
+	}
+
+	return errno;
+}
+
 /**
  * acquire_console_sem - lock the console system for exclusive use.
  *
