kda’s blog

February 9, 2011

UML x86-64 doesn’t work for me

Filed under: Uncategorized — Denis Kirjanov @ 8:42 pm

Heh, I’ve decided to build UML under x86-64 host (Pentium 4).

That is what I have got

denis@denis-desktop:~/syssrc$ ./startuml.sh
Core dump limits :
soft – 0
hard – NONE
Checking that ptrace can change system call numbers…OK
Checking syscall emulation patch for ptrace…OK
Checking advanced syscall emulation patch for ptrace…OK
Checking for tmpfs mount on /dev/shm…OK
Checking PROT_EXEC mmap in /dev/shm/…OK
Checking for the skas3 patch in the host:
- /proc/mm…not found: No such file or directory
- PTRACE_FAULTINFO…not found
- PTRACE_LDT…not found
UML running in SKAS0 mode
Adding 2936832 bytes to physical memory to account for exec-shield gap
Linux version 2.6.38-rc4-00012-g0e44b22 (denis@denis-desktop) (gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5) ) #1 Wed Feb 9 23:34:12 MSK 2011
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8787
Kernel command line: ubd0=../uml/root_fs_val eth0=tuntap,,,10.20.42.41 root=98:0
PID hash table entries: 256 (order: -1, 2048 bytes)
Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
Inode-cache hash table entries: 4096 (order: 3, 32768 bytes)
Memory: 28772k available
NR_IRQS:15
Calibrating delay loop… 113.45 BogoMIPS (lpj=567296)
pid_max: default: 32768 minimum: 301
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
Using 2.6 host AIO
make_umid – mkstemp(/home/denis/.uml/sClNZv) failed: Permission denied
Failed to initialize umid “”, trying with a random umid
make_umid – mkstemp(/home/denis/.uml/tieiIQ) failed: Permission denied
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
Switching to clocksource itimer
NET: Registered protocol family 2
IP route cache hash table entries: 512 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 3, 32768 bytes)
TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
UDP hash table entries: 128 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 128 (order: 0, 4096 bytes)
NET: Registered protocol family 1
make_umid – mkstemp(/home/denis/.uml/yjPprb) failed: Permission denied
Checking host MADV_REMOVE support…OK
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
msgmni has been set to 56
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
TCP cubic registered
NET: Registered protocol family 17
Initialized stdio console driver
Console initialized on /dev/tty0
console [tty0] enabled
Initializing software serial port version 1
console [mc-1] enabled
ubda: unknown partition table
Choosing a random ethernet address for device eth0
Netdevice 0 (b2:5a:6c:eb:7a:47) :
TUN/TAP backend – IP = 10.20.42.41
VFS: Mounted root (ext2 filesystem) readonly on device 98:0.
request_module: runaway loop modprobe binfmt-464c
request_module: runaway loop modprobe binfmt-464c
request_module: runaway loop modprobe binfmt-464c
request_module: runaway loop modprobe binfmt-464c
request_module: runaway loop modprobe binfmt-464c
kworker/u:0 invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=0, oom_score_adj=0
Call Trace:
60b3b928:  [<6005a310>] T.358+0×64/0x15c
60b3b958:  [<6005a833>] out_of_memory+0×209/0x2cc
60b3b9d8:  [<6005d3f0>] __alloc_pages_nodemask+0x52f/0×627
60b3ba78:  [<60062202>] shrink_inactive_list+0x2bb/0x2cd
60b3bac8:  [<6005eb41>] __do_page_cache_readahead+0x9e/0×192
60b3bb48:  [<6005ec51>] ra_submit+0x1c/0×20
60b3bb58:  [<6005eec9>] ondemand_readahead+0×194/0x1a7
60b3bba8:  [<6005efb1>] page_cache_sync_readahead+0×38/0x3a
60b3bbb8:  [<60059869>] generic_file_aio_read+0×264/0x5bf
60b3bbc8:  [<60023a44>] wait_stub_done+0x3c/0xd6
60b3bc98:  [<6007b506>] do_sync_read+0xd1/0x10e
60b3bd08:  [<60024da5>] init_new_ldt+0x1d0/0x30f
60b3bd68:  [<601078ea>] get_vfs_caps_from_disk+0×26/0xd1
60b3bdb8:  [<6007c00f>] vfs_read+0xa6/0×154
60b3bdf8:  [<600804e9>] kernel_read+0x3e/0x4b
60b3be28:  [<600805ee>] prepare_binprm+0xf8/0xff
60b3be58:  [<60081386>] do_execve+0×102/0x2bc
60b3beb8:  [<600117b1>] um_execve+0×27/0×58
60b3bee8:  [<60013435>] kernel_execve+0x2d/0×38
60b3bf18:  [<6003d9c6>] ____call_usermodehelper+0×79/0×83
60b3bf48:  [<6002042d>] run_kernel_thread+0×41/0x4a
60b3bf58:  [<6003d94d>] ____call_usermodehelper+0×0/0×83
60b3bf98:  [<60020414>] run_kernel_thread+0×28/0x4a
60b3bfc8:  [<600128ff>] new_thread_handler+0×71/0x9b

Mem-Info:
Normal per-cpu:
CPU    0: hi:    6, btch:   1 usd:   0
active_anon:50 inactive_anon:0 isolated_anon:0
active_file:7 inactive_file:1 isolated_file:0
unevictable:0 dirty:0 writeback:0 unstable:0
free:189 slab_reclaimable:22 slab_unreclaimable:2380
mapped:0 shmem:0 pagetables:50 bounce:0
Normal free:756kB min:748kB low:932kB high:1120kB active_anon:200kB inactive_anon:0kB active_file:28kB inactive_file:4kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:35148kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:88kB slab_unreclaimable:9520kB kernel_stack:17288kB pagetables:200kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:48 all_unreclaimable? no
lowmem_reserve[]: 0 0
Normal: 1*4kB 0*8kB 1*16kB 1*32kB 1*64kB 1*128kB 0*256kB 1*512kB 0*1024kB 0*2048kB 0*4096kB = 756kB
8 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap  = 0kB
Total swap = 0kB
8909 pages RAM
1716 pages reserved
7 pages shared
4824 pages non-shared
[ pid ]   uid  tgid total_vm      rss cpu oom_adj oom_score_adj name
Kernel panic – not syncing: Out of memory and no killable processes…

Call Trace:
60b3b858:  [<6019beb1>] panic+0xea/0x1dc
60b3b8b8:  [<60040e50>] __kernel_text_address+0×65/0x6b
60b3b8c0:  [<600128ff>] new_thread_handler+0×71/0x9b
60b3b8f8:  [<6011b81f>] show_mem+0x10f/0×118
60b3b928:  [<6005a333>] T.358+0×87/0x15c
60b3b958:  [<6005a83f>] out_of_memory+0×215/0x2cc
60b3b9d8:  [<6005d3f0>] __alloc_pages_nodemask+0x52f/0×627
60b3ba78:  [<60062202>] shrink_inactive_list+0x2bb/0x2cd
60b3bac8:  [<6005eb41>] __do_page_cache_readahead+0x9e/0×192
60b3bb48:  [<6005ec51>] ra_submit+0x1c/0×20
60b3bb58:  [<6005eec9>] ondemand_readahead+0×194/0x1a7
60b3bba8:  [<6005efb1>] page_cache_sync_readahead+0×38/0x3a
60b3bbb8:  [<60059869>] generic_file_aio_read+0×264/0x5bf
60b3bbc8:  [<60023a44>] wait_stub_done+0x3c/0xd6
60b3bc98:  [<6007b506>] do_sync_read+0xd1/0x10e
60b3bd08:  [<60024da5>] init_new_ldt+0x1d0/0x30f
60b3bd68:  [<601078ea>] get_vfs_caps_from_disk+0×26/0xd1
60b3bdb8:  [<6007c00f>] vfs_read+0xa6/0×154
60b3bdf8:  [<600804e9>] kernel_read+0x3e/0x4b
60b3be28:  [<600805ee>] prepare_binprm+0xf8/0xff
60b3be58:  [<60081386>] do_execve+0×102/0x2bc
60b3beb8:  [<600117b1>] um_execve+0×27/0×58
60b3bee8:  [<60013435>] kernel_execve+0x2d/0×38
60b3bf18:  [<6003d9c6>] ____call_usermodehelper+0×79/0×83
60b3bf48:  [<6002042d>] run_kernel_thread+0×41/0x4a
60b3bf58:  [<6003d94d>] ____call_usermodehelper+0×0/0×83
60b3bf98:  [<60020414>] run_kernel_thread+0×28/0x4a
60b3bfc8:  [<600128ff>] new_thread_handler+0×71/0x9b

Modules linked in:
Pid: 2162, comm: kworker/u:0 Not tainted 2.6.38-rc4-00012-g0e44b22
RIP: 0033:[<00007f20325c1e87>]
RSP: 00007fffd8ca2a88  EFLAGS: 00000206
RAX: 0000000000000000 RBX: 0000000000002e73 RCX: ffffffffffffffff
RDX: 0000000000000000 RSI: 0000000000000013 RDI: 0000000000002e73
RBP: 00007fffd8ca2ac0 R08: 0000000000000000 R09: 00007fffd8ca2ac0
R10: 00007fffd8ca2810 R11: 0000000000000206 R12: 0000000000002e6f
R13: 00007f2032d306a8 R14: 00007fffd8ca2cc8 R15: 00007fffd8ca35b6
Call Trace:
60b3b7e8:  [<600149b7>] panic_exit+0x2f/0×45
60b3b808:  [<60046b0e>] notifier_call_chain+0×32/0x5e
60b3b848:  [<60046b54>] atomic_notifier_call_chain+0xf/0×11
60b3b858:  [<6019becc>] panic+0×105/0x1dc
60b3b8b8:  [<60040e50>] __kernel_text_address+0×65/0x6b
60b3b8c0:  [<600128ff>] new_thread_handler+0×71/0x9b
60b3b8f8:  [<6011b81f>] show_mem+0x10f/0×118
60b3b928:  [<6005a333>] T.358+0×87/0x15c
60b3b958:  [<6005a83f>] out_of_memory+0×215/0x2cc
60b3b9d8:  [<6005d3f0>] __alloc_pages_nodemask+0x52f/0×627
60b3ba78:  [<60062202>] shrink_inactive_list+0x2bb/0x2cd
60b3bac8:  [<6005eb41>] __do_page_cache_readahead+0x9e/0×192
60b3bb48:  [<6005ec51>] ra_submit+0x1c/0×20
60b3bb58:  [<6005eec9>] ondemand_readahead+0×194/0x1a7
60b3bba8:  [<6005efb1>] page_cache_sync_readahead+0×38/0x3a
60b3bbb8:  [<60059869>] generic_file_aio_read+0×264/0x5bf
60b3bbc8:  [<60023a44>] wait_stub_done+0x3c/0xd6
60b3bc98:  [<6007b506>] do_sync_read+0xd1/0x10e
60b3bd08:  [<60024da5>] init_new_ldt+0x1d0/0x30f
60b3bd68:  [<601078ea>] get_vfs_caps_from_disk+0×26/0xd1
60b3bdb8:  [<6007c00f>] vfs_read+0xa6/0×154
60b3bdf8:  [<600804e9>] kernel_read+0x3e/0x4b
60b3be28:  [<600805ee>] prepare_binprm+0xf8/0xff
60b3be58:  [<60081386>] do_execve+0×102/0x2bc
60b3beb8:  [<600117b1>] um_execve+0×27/0×58
60b3bee8:  [<60013435>] kernel_execve+0x2d/0×38
60b3bf18:  [<6003d9c6>] ____call_usermodehelper+0×79/0×83
60b3bf48:  [<6002042d>] run_kernel_thread+0×41/0x4a
60b3bf58:  [<6003d94d>] ____call_usermodehelper+0×0/0×83
60b3bf98:  [<60020414>] run_kernel_thread+0×28/0x4a
60b3bfc8:  [<600128ff>] new_thread_handler+0×71/0x9b

Kernel panic – not syncing: Kernel mode signal 4
Call Trace:
61c4e118:  [<6019beb1>] panic+0xea/0x1dc
61c4e218:  [<600142be>] relay_signal+0×38/0×79
61c4e248:  [<600212f8>]Terminated

February 8, 2011

User Mode Linux powerpc port

Filed under: Uncategorized — Denis Kirjanov @ 7:56 pm

I’m going to port UML to the PowerPC platform. Looks like the ppc port is totally broken with the current kernel (2.6.38-rc3). I’ve moved  sys-ppc directory to sys-powerpc.  I added some stubs today such as sysdep/archsetjmp.h, vmflags.h, kernel-offsets.h.

Glibc provides some info about setjmp/longjump.

make ARCH=um linux is impossible now :/

January 3, 2011

Alcohol

Filed under: Uncategorized — Denis Kirjanov @ 4:35 pm

Not a tequila, not a cognac but just whiskey with the cola :)

December 25, 2010

Another beautiful poem (on russian)

Filed under: Uncategorized — Denis Kirjanov @ 7:24 pm

2011

Filed under: Uncategorized — Tags: — Denis Kirjanov @ 10:50 am

Waiting for the New Year…


December 1, 2010

RelaxFM poem

Filed under: Uncategorized — Denis Kirjanov @ 8:43 pm

Thoughts

Filed under: Linux — Denis Kirjanov @ 8:40 pm

Today I have killed Gentoo on my laptop to replace it with the MacOS X 10.4. Yeah, MacOS X is great because all devices work out of the box. Now I understand that I can’t imagine my laptop without Linux :)

November 13, 2010

Extracting 88W8300 firmware

Filed under: Linux — Tags: , — Denis Kirjanov @ 12:00 pm

Ok, I have one Wi-Fi  chip since 2005 currently unsupported by the Linux. (Asus WIFI-TV card ).

So, this is a not a good news.

Here is a lspci output:

01:0f.0 Ethernet controller: Marvell Technology Group Ltd. 88W8335 [Libertas] 802.11b/g Wireless (rev 43)
Subsystem: ASUSTeK Computer Inc. Device 8187
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 64, Cache Line Size: 16 bytes
Interrupt: pin A routed to IRQ 5
Region 0: Memory at cfdf0000 (32-bit, non-prefetchable) [size=64K]
Region 1: Memory at cfde0000 (32-bit, non-prefetchable) [size=64K]

One major problem here is that card requires firmware: so-called boot and main parts. As has been highlighted by the mrv8k firmware extractor, boot firmware part begins with  the magic sequence 0xE3A0BF40, 0xE59F40D8, 0xE5945000, 0xE2155002

Ok, my win driver name is CB55N51.sys and looks like this is a boot part:

:~/Downloads$ hexdump CB55N51.sys | grep  “bf40″
000bf40 8b00 e486 000c 8900 0486 0d20 8b00 f086
001bf40 0000 6656 86c7 0ea0 0000 0001 e1e8 fffc
002bf40 03f9 3100 f075 758b 89f0 90b0 0000 8b00
003bf40 7921 2900 d029 4853 7800 2800 d009 4852
0044de0 0022 0000 0000 0000 bf40 e3a0 40d8 e59f

Extracted 256bytes long boot part is identical to the *BSD malo and for now it is great.

:~/Downloads$ diff -s mrv8k-b.fw malo-firmware/malo8335-h
Files mrv8k-b.fw and malo-firmware/malo8335-h are identical

Now the bad news since currently available fw extractor doesn’t know nothing about my WiFi card and the following magic sequence doesn’t work: 0xE59FF018, 0xE59FF018, 0xE59FF018, 0xE59FF018, 0xE59FF018, 0×00000000, 0xE59FF018, 0xE59FF018. In the CB55  driver I have found this sequence which is a very close to the previous one:

00039d20  18 f0 9f e5 18 f0 9f e5  18 f0 9f e5 18 f0 9f e5 |…………….|
00039d30  18 f0 9f e5 18 f0 9f e5 18 f0 9f e5 18 f0 9f e5 |…………….|
00039d40  60 9a 00 00 3c 9a 00 00  40 9a 00 00 44 9a 00 00  |`…<…@…D…|

Nothing interesting, but I’ll keep in touch

[19061.100969] mrv8k_pci: Marvell W8335 Wireless driver
[19061.101025] mrv8k_pci 0000:01:0f.0: PCI INT A -> GSI 20 (level, low) -> IRQ 20
[19062.492521] Booting firmware has failed, status: 5
[19062.492527] unable to load mrv8k-f.fw
[19062.492573] mrv8k_pci 0000:01:0f.0: PCI INT A disabled
[19062.492585] mrv8k_pci: probe of 0000:01:0f.0 failed with error -1

August 31, 2010

Nokia n900

Filed under: Uncategorized — Denis Kirjanov @ 10:18 am

I damaged my Nokia n900. Phone fell from the table and damaged the screen (little bit ) :/

August 21, 2010

Gentoo on the Powerbook G4

Filed under: Uncategorized — Tags: , , — Denis Kirjanov @ 7:33 pm

Yeah, I did it! )
Fedora and Ubuntu in the past. But more importantly that my current Openbox workplace is very similar to the previous one :) (R.I.P. IBM Thinkpad T40)

Xorg note:
without the following in make.conf my first attempt was really sucks and useless:
INPUT_DEVICES=”synaptics mouse keyboard”
VIDEO_CARDS=”nv”

Hardware notes:

processor : 0
cpu : 7447A, altivec supported
clock : 1499.999000MHz
revision : 1.5 (pvr 8003 0105)
bogomips : 73.72
timebase : 18432000
platform : PowerMac
model : PowerBook6,8
machine : PowerBook6,8
motherboard : PowerBook6,8 MacRISC3 Power Macintosh
detected as : 287 (PowerBook G4 12")
pmac flags : 0000001a
L2 cache : 512K unified
pmac-generation : NewWorld
Memory : 1280 MB

Older Posts »

Theme: WordPress Classic. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.