[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debian-users:44891] Re: user-mode-linuxはどこ?



こんにちは,

user-mode-linuxをTTモードでうごかしてみようと試してみました.
debian-amd64によると,NPTLがうまく動かないらしいので,
現在のdebian/user-mode-linux/debian/amd64は動かせなさそうですね.

i386だとうごくかもしれません.

今回採用した作成手順:
1. cg-clone rsync://kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/
で取得したツリーを使用.

2. make mrproper ARCH=um
3. make menuconfig ARCH=um
4. make-kpkg clean; make-kpkg --rootcmd=fakeroot --arch=um --revision Custom.1.5.um kernel_image

下記のパッチを適用

diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c
--- a/arch/um/kernel/um_arch.c
+++ b/arch/um/kernel/um_arch.c
@@ -334,8 +334,10 @@ int linux_main(int argc, char **argv)
                add_arg(DEFAULT_COMMAND_LINE);

        os_early_checks();
+#ifdef CONFIG_MODE_SKAS
        if (force_tt)
                clear_can_do_skas();
+#endif
        mode_tt = force_tt ? 1 : !can_do_skas();
 #ifndef CONFIG_MODE_TT
        if (mode_tt) {




$ linux-2.6.14-rc3 con0=fd:0,fd:1 con=pty root=/dev/root rootflags=/ rootfstype=hostfs ro devfs=nomount  init=/bin/bin
Checking PROT_EXEC mmap in /tmp...OK
UML running in TT mode
tracing thread pid = 8257
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...missing
Linux version 2.6.14-rc3-gdd0fc66f (dancer@dancer64) (gcc version 4.0.2 (Debian 4.0.2-2)) #1 Sun Oct 9 13:36:21 JST 2005
Built 1 zonelists
Kernel command line: con0=fd:0,fd:1 con=pty root=/dev/root rootflags=/ rootfstype=hostfs ro devfs=nomount init=/bin/bin
PID hash table entries: 256 (order: 8, 8192 bytes)
Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
Inode-cache hash table entries: 4096 (order: 3, 32768 bytes)
Memory: 27300k available
Mount-cache hash table entries: 256
Checking that host ptys support output SIGIO...Yes
Checking that host ptys support SIGIO on close...No, enabling workaround
Checking for /dev/anon on the host...Not available (open failed with errno 2)
softlockup thread 0 started up.
Disabling 2.6 AIO in tt mode
2.6 host AIO support not used - falling back to I/O thread
NET: Registered protocol family 16
mconsole (version 2) initialized on /home/dancer/.uml/mOQN1q/mconsole
UML Audio Relay (host dsp = /dev/sound/dsp, host mixer = /dev/sound/mixer)
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
loop: loaded (max 8 devices)
nbd: registered device at major 43
PPP generic driver version 2.4.2
SLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels, max=256).
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@xxxxxxxxxxxx>
NET: Registered protocol family 2
IP route cache hash table entries: 512 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Initialized stdio console driver
Console initialized on /dev/tty0
Initializing software serial port version 1
Failed to open 'root_fs', errno = 2
VFS: Mounted root (hostfs filesystem) readonly.
Failed to execute /bin/bin.  Attempting defaults...
Kernel panic - not syncing: Kernel mode fault at addr 0x0, ip 0x0

Pid: 1, comm: init Not tainted 2.6.14-rc3-gdd0fc66f
RIP: c000:[<0000000000000000>]
RSP: 000000006044fc30  EFLAGS: 00010202
RAX: 0000000000000001 RBX: 0000000000000000 RCX: 00000000601a0cfa
RDX: 000000006003268e RSI: 0000000000000001 RDI: 000000006044fb00
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000008 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 000000000000000a R15: 0000000000000009
Call Trace:
6044f6f8:  [<60015cdf>] panic_exit+0x2f/0x50
6044f718:  [<60047f0b>] notifier_call_chain+0x2b/0x50
6044f748:  [<60038334>] panic+0xe4/0x180
6044f788:  [<601a0cfa>] __sigprocmask+0x4a/0xb0
6044f7b8:  [<601185c7>] __up_read+0x77/0xa0
6044f7d8:  [<60014e22>] handle_page_fault+0xb2/0x2c0
6044f838:  [<600151fa>] segv+0x1ca/0x2d0
6044f8b8:  [<60012f31>] change_signals+0x51/0x80
6044f928:  [<6001559e>] segv_handler+0x9e/0xb0
6044f968:  [<60018aaa>] sig_handler_common_tt+0xfa/0x1a0
6044f9d8:  [<600327f0>] sig_handler+0x10/0x20
6044f9e8:  [<601a0a80>] __restore_rt+0x0/0x10
6044fa78:  [<6003268e>] run_kernel_thread+0x2e/0x50
6044fa88:  [<601a0cfa>] __sigprocmask+0x4a/0xb0
6044fae8:  [<600326a1>] run_kernel_thread+0x41/0x50
6044faf8:  [<6000e1a0>] init+0x0/0x140
6044fb38:  [<6003268e>] run_kernel_thread+0x2e/0x50
6044fbe8:  [<60017033>] new_thread_handler+0x113/0x130
6044fcd8:  [<601a0cfa>] __sigprocmask+0x4a/0xb0




上川