From: Blaisorblade <blaisorblade@yahoo.it>
To: user-mode-linux-devel@lists.sourceforge.net,
Jeff Dike <jdike@addtoit.com>
Subject: [uml-devel] Testing requested - [PATCH] Fixing SKAS0 compilation problem / TT mode bug report
Date: Sun, 27 Nov 2005 21:59:37 +0100 [thread overview]
Message-ID: <200511272159.38069.blaisorblade@yahoo.it> (raw)
[-- Attachment #1: Type: text/plain, Size: 1780 bytes --]
The attached patch is a (hacky) proposal, alternative to Jeff's
fix-stub-syscall6, to fix the SKAS0 compilation problem.
In fact, Jeff's patch makes the problem appear on my system (where I never
reproduced it).
I'm going to stick this in -bs2, as it makes kernels compiled for me work
better. So please test compiling -bs2.
As an aside, I saw this code crashing at shutdown in TT mode, from
fs/proc/array.c:do_task_stat() :
if (mm) {
vsize = task_vsize(mm);
eip = KSTK_EIP(task);
esp = KSTK_ESP(task);
}
Went looking and guess what? There is full crap (starting from 2.6.14, due to
the fixes for sysrq-t IIRC):
include/asm-um/processor-i386.h
#define KSTK_EIP(tsk) KSTK_REG(tsk, EIP)
#define KSTK_ESP(tsk) KSTK_REG(tsk, UESP)
#define KSTK_EBP(tsk) KSTK_REG(tsk, EBP)
include/asm-um/processor-generic.h
#ifdef CONFIG_MODE_SKAS
#define KSTK_REG(tsk, reg) \
({ union uml_pt_regs regs; \
get_thread_regs(®s, tsk->thread.mode.skas.switch_buf); \
UPT_REG(®s, reg); })
#else
#define KSTK_REG(tsk, reg) (0xbadbabe)
#endif
I didn't fully realize the amount of crap in the patch when I reviewed it at
that time (but I do remember complaining about 0xbadbabe rather than
0xdeadbeef, so I'm guilty too).
I'll restore for TT mode the 2.6.13 content (which is wrong and kills sysrq-t,
but is better than crap).
And there's no reason for letting TT mode bitrot so much, sorry. Making UML
work for everybody, plus having a SMP testing mode, still means keeping it
working.
--
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade
[-- Attachment #2: uml-use-asm-preventing-ebp.diff --]
[-- Type: text/x-diff, Size: 738 bytes --]
Index: linux-2.6.14/arch/um/kernel/skas/clone.c
===================================================================
--- linux-2.6.14.orig/arch/um/kernel/skas/clone.c
+++ linux-2.6.14/arch/um/kernel/skas/clone.c
@@ -1,5 +1,6 @@
#include <sched.h>
#include <signal.h>
+#include <stddef.h>
#include <sys/mman.h>
#include <sys/time.h>
#include <asm/unistd.h>
@@ -39,6 +40,10 @@ stub_clone_handler(void)
from->fd, from->offset);
out:
/* save current result. Parent: pid; child: retcode of mmap */
+#if defined(UML_CONFIG_UML_X86) && !defined(UML_CONFIG_64BIT)
+ __asm__("movl %0, %1": : "r" (err), "g" (*(long*) (UML_CONFIG_STUB_DATA + offsetof(struct stub_data, err))));
+#else
from->err = err;
+#endif
trap_myself();
}
next reply other threads:[~2005-11-27 20:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-27 20:59 Blaisorblade [this message]
2005-11-28 0:47 ` [uml-devel] Blaisorblade's UML binaries - MORE MORE... please give us an x86_64 UML UML
2005-11-29 12:22 ` Phill Wombat
2005-11-29 16:52 ` Blaisorblade
2005-11-30 20:32 ` Phill Wombat
2005-12-01 12:34 ` Blaisorblade
2005-11-28 4:23 ` [uml-devel] Testing requested - [PATCH] Fixing SKAS0 compilation problem / TT mode bug report Jeff Dike
2005-11-29 16:28 ` Blaisorblade
2005-11-29 17:55 ` Jeff Dike
2005-12-02 0:18 ` Blaisorblade
2005-12-03 5:54 ` 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=200511272159.38069.blaisorblade@yahoo.it \
--to=blaisorblade@yahoo.it \
--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