mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] UML: build fix for .config w/o CONFIG_MODE_SKAS
@ 2004-10-20  2:33 Chris Wedgwood
  0 siblings, 0 replies; only message in thread
From: Chris Wedgwood @ 2004-10-20  2:33 UTC (permalink / raw)
  To: LKML; +Cc: Jeff Dike

This is a hacky (ie. fix properly) changes to make things build w/o
CONFIG_MODE_SKAS.  I think it's probably acceptable as-is for now
since a good chunk of that code will probably change in the not too
far off future anyhow.

Signed-off-by: cw@f00f.org

diff -Nru a/arch/um/kernel/process.c b/arch/um/kernel/process.c
--- a/arch/um/kernel/process.c	2004-10-19 17:47:59 -07:00
+++ b/arch/um/kernel/process.c	2004-10-19 17:47:59 -07:00
@@ -202,6 +202,11 @@
 		"    To make it working, you need a kernel patch for your host, too.\n"
 		"    See http://perso.wanadoo.fr/laurent.vivier/UML/ for further information.\n");
 
+/* Ugly hack for now... */
+#ifndef PTRACE_SYSEMU
+#define PTRACE_SYSEMU 31
+#endif
+
 static void __init check_sysemu(void)
 {
 	void *stack;
@@ -211,7 +216,9 @@
 		return;
 
 	printk("Checking syscall emulation patch for ptrace...");
+#ifdef CONFIG_MODE_SKAS
 	sysemu_supported = 0;
+#endif /* CONFIG_MODE_SKAS */
 	pid = start_ptraced_child(&stack);
 	if(ptrace(PTRACE_SYSEMU, pid, 0, 0) >= 0) {
 		struct user_regs_struct regs;
@@ -233,17 +240,23 @@
 
 		stop_ptraced_child(pid, stack, 0);
 
+#ifdef CONFIG_MODE_SKAS
 		sysemu_supported = 1;
+#endif /* CONFIG_MODE_SKAS */
 		printk("found\n");
 	}
 	else
 	{
 		stop_ptraced_child(pid, stack, 1);
+#ifdef CONFIG_MODE_SKAS
 		sysemu_supported = 0;
+#endif /* CONFIG_MODE_SKAS */
 		printk("missing\n");
 	}
 
+#ifdef CONFIG_MODE_SKAS
 	set_using_sysemu(!force_sysemu_disabled);
+#endif
 }
 
 void __init check_ptrace(void)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-10-20  2:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-20  2:33 [PATCH] UML: build fix for .config w/o CONFIG_MODE_SKAS Chris Wedgwood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®