linux-um archives
 help / color / mirror / Atom feed
From: Daniel Gryniewicz <dang@fprintf.net>
To: Jeff Dike <jdike@addtoit.com>
Cc: uml-devel <user-mode-linux-devel@lists.sourceforge.net>
Subject: Re: [uml-devel] SKAS3 for 2.6.23
Date: Mon, 10 Dec 2007 22:26:46 -0500	[thread overview]
Message-ID: <1197343606.6483.484.camel@athena.fprintf.net> (raw)
In-Reply-To: <1197301533.6483.440.camel@athena.fprintf.net>

[-- Attachment #1: Type: text/plain, Size: 758 bytes --]


On Mon, 2007-12-10 at 10:45 -0500, Daniel Gryniewicz wrote:
> On Sat, 2007-12-08 at 09:17 -0500, Jeff Dike wrote:
> > A skas3 patch which works on 2.6.23 is below. 
> 
> BTW, it would appear that applying this patch breaks building the
> resulting kernel as a guest kernel, at least on x86_64.
> asm-x86_64/proc_mm.h doesn't end up in asm/, and the #includes don't use
> asm/arch.  I don't know if it's intended that this should work as a
> guest kernel?
> 
> Daniel

Okay, attached is a patch against 2.6.23.9 + skas3 patch to make it
build (and run) as a UML guest.  I've only tested it on x86_64 (but I
did use SUBARCH=i386).  I went the route of minimal changes to get it to
build, as just including things from asm/arch/ didn't work very well.

Daniel

[-- Attachment #2: uml-2.6.23-skas3-guest.patch --]
[-- Type: text/x-patch, Size: 2093 bytes --]

diff --exclude-from=/home/dang/.scripts/diffrc -up -ruN linux-2.6.23.orig/arch/um/sys-i386/ptrace_user.c linux-2.6.23/arch/um/sys-i386/ptrace_user.c
--- linux-2.6.23.orig/arch/um/sys-i386/ptrace_user.c	2007-10-09 16:31:38.000000000 -0400
+++ linux-2.6.23/arch/um/sys-i386/ptrace_user.c	2007-12-10 22:14:01.000000000 -0500
@@ -9,7 +9,7 @@
 #include <unistd.h>
 #include "ptrace_user.h"
 /* Grr, asm/user.h includes asm/ptrace.h, so has to follow ptrace_user.h */
-#include <asm/user.h>
+#include <sys/user.h>
 #include "kern_util.h"
 #include "sysdep/thread.h"
 #include "user.h"
diff --exclude-from=/home/dang/.scripts/diffrc -up -ruN linux-2.6.23.orig/include/asm-um/compat.h linux-2.6.23/include/asm-um/compat.h
--- linux-2.6.23.orig/include/asm-um/compat.h	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.23/include/asm-um/compat.h	2007-12-10 21:57:27.000000000 -0500
@@ -0,0 +1,9 @@
+#ifndef _ASM_X86_64_COMPAT_H
+#define _ASM_X86_64_COMPAT_H
+
+typedef s32		compat_int_t;
+typedef s32		compat_long_t;
+typedef u32		compat_uint_t;
+typedef u32		compat_ulong_t;
+
+#endif /* _ASM_X86_64_COMPAT_H */
diff --exclude-from=/home/dang/.scripts/diffrc -up -ruN linux-2.6.23.orig/include/asm-um/proc_mm.h linux-2.6.23/include/asm-um/proc_mm.h
--- linux-2.6.23.orig/include/asm-um/proc_mm.h	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.23/include/asm-um/proc_mm.h	2007-12-10 21:56:44.000000000 -0500
@@ -0,0 +1 @@
+#include <asm/arch/proc_mm.h>
diff --exclude-from=/home/dang/.scripts/diffrc -up -ruN linux-2.6.23.orig/include/asm-um/ptrace-x86_64.h linux-2.6.23/include/asm-um/ptrace-x86_64.h
--- linux-2.6.23.orig/include/asm-um/ptrace-x86_64.h	2007-10-09 16:31:38.000000000 -0400
+++ linux-2.6.23/include/asm-um/ptrace-x86_64.h	2007-12-10 21:58:07.000000000 -0500
@@ -87,4 +87,15 @@ extern void arch_switch_to_skas(struct t
 extern long arch_prctl_skas(struct task_struct *task, int code,
 			    unsigned long __user *addr);
 
+struct ptrace_faultinfo {
+	int is_write;
+	unsigned long addr;
+};
+
+struct ptrace_ldt {
+	int func;
+  	void *ptr;
+	unsigned long bytecount;
+};
+
 #endif

[-- Attachment #3: Type: text/plain, Size: 278 bytes --]

-------------------------------------------------------------------------
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

[-- Attachment #4: Type: text/plain, Size: 194 bytes --]

_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

  reply	other threads:[~2007-12-11  3:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-08 14:17 [uml-devel] SKAS3 for 2.6.23 Jeff Dike
2007-12-08 14:51 ` Karol Swietlicki
2007-12-09 23:28   ` Nix
2007-12-10 15:45 ` Daniel Gryniewicz
2007-12-11  3:26   ` Daniel Gryniewicz [this message]
2007-12-11 17:11     ` Jeff Dike

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1197343606.6483.484.camel@athena.fprintf.net \
    --to=dang@fprintf.net \
    --cc=jdike@addtoit.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox