From: cw@f00f.org (Chris Wedgwood)
To: LKML <linux-kernel@vger.kernel.org>
Cc: Jeff Dike <jdike@addtoit.com>
Subject: [PATCH] UML: build fix for .config w/o CONFIG_MODE_SKAS
Date: Tue, 19 Oct 2004 19:33:56 -0700 [thread overview]
Message-ID: <20041020023356.GC8597@taniwha.stupidest.org> (raw)
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)
reply other threads:[~2004-10-20 2:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20041020023356.GC8597@taniwha.stupidest.org \
--to=cw@f00f.org \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®