Getting the x86-64 rollup patch to work on my x86 laptop.
So I took the rollup patch I posted earlier (which made things work on x86-64), and tried to compile it on my x86 Ubuntu "Horny Hedgehog" laptop. I had to revert the /lib64 change, of course. (I need to come up with a good fix for that.)
I also needed to change one more thing: replacing <asm/signal.h> with <signal.h> in skas-i386/stub_segv.c. (I.E. the same kind of fix I had to make for skas-x86_64/stub_segv.c.)
That got it to build. Here's the panic and the dissassembly:
Initialized stdio console driver
Console initialized on /dev/tty0
Failed to open 'root_fs', errno = 2
VFS: Mounted root (hostfs filesystem).
Stub registers -
0 - 0
1 - 0
2 - 0
3 - 0
4 - 0
5 - 0
6 - 0
7 - 7b
8 - 7b
9 - 0
10 - 33
11 - ffffffff
12 - 40000c20
13 - 73
14 - 210246
15 - bf55ec10
16 - 7b
Kernel panic - not syncing: get_skas_faultinfo : failed to wait for SIGUSR1/SIGTRAP, pid = 13213, n = 13213, errno = 0, status = 0xb7f
EIP: 0073:[<40000c20>] CPU: 0 Not tainted ESP: 007b:bf55ec10 EFLAGS: 00210246
Not tainted
EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX: 00000000
ESI: 00000000 EDI: 00000000 EBP: 00000000 DS: 007b ES: 007b
088a7bac: [<08080b5d>] notifier_call_chain+0x2d/0x50 088a7bc8: [<080714a1>] panic+0x71/0x110 088a7be0: [<0805e910>] wait_stub_done+0x100/0x190 088a7c60: [<0805ea1a>] get_skas_faultinfo+0x7a/0xa0 088a7c70: [<0806a081>] save_registers+0x41/0x80 088a7c78: [<08060602>] user_signal+0x62/0x70 088a7c8c: [<0805f0f0>] userspace+0x180/0x220 088a7cd8: [<08055f50>] init+0x0/0x170 088a7ce4: [<0805fc12>] new_thread_handler+0xf2/0x130
081130b0 <stub_segv_handler>:
81130b0: 8b 44 24 5c mov 0x5c(%esp),%eax 81130b4: 8d 54 24 08 lea 0x8(%esp),%edx 81130b8: a3 04 f0 ff bf mov %eax,0xbffff004 81130bd: 8b 44 24 3c mov 0x3c(%esp),%eax 81130c1: a3 00 f0 ff bf mov %eax,0xbffff000 81130c6: 8b 44 24 38 mov 0x38(%esp),%eax 81130ca: a3 08 f0 ff bf mov %eax,0xbffff008 81130cf: 89 d0 mov %edx,%eax 81130d1: 89 c4 mov %eax,%esp 81130d3: b8 77 00 00 00 mov $0x77,%eax 81130d8: cd 80 int $0x80 81130da: c3 ret
08113000 <stub_clone_handler>:
8113000: 83 ec 14 sub $0x14,%esp 8113003: ba 78 00 00 00 mov $0x78,%edx 8113008: b9 fc f7 ff bf mov $0xbffff7fc,%ecx 811300d: 89 5c 24 04 mov %ebx,0x4(%esp) 8113011: 89 d0 mov %edx,%eax 8113013: bb 11 84 00 00 mov $0x8411,%ebx 8113018: 89 6c 24 10 mov %ebp,0x10(%esp) 811301c: bd 00 f0 ff bf mov $0xbffff000,%ebp 8113021: 89 74 24 08 mov %esi,0x8(%esp) 8113025: 89 7c 24 0c mov %edi,0xc(%esp) 8113029: cd 80 int $0x80 811302b: 85 c0 test %eax,%eax 811302d: 89 c7 mov %eax,%edi 811302f: 75 5c jne 811308d <stub_clone_handler+0x8d> 8113031: b8 1a 00 00 00 mov $0x1a,%eax 8113036: 89 fb mov %edi,%ebx 8113038: 89 f9 mov %edi,%ecx 811303a: 89 fa mov %edi,%edx 811303c: 89 fe mov %edi,%esi 811303e: cd 80 int $0x80 8113040: 85 c0 test %eax,%eax 8113042: 89 c7 mov %eax,%edi 8113044: 75 47 jne 811308d <stub_clone_handler+0x8d> 8113046: be 68 00 00 00 mov $0x68,%esi 811304b: bb 01 00 00 00 mov $0x1,%ebx 8113050: b9 08 f0 ff bf mov $0xbffff008,%ecx 8113055: 89 f0 mov %esi,%eax 8113057: 89 fa mov %edi,%edx 8113059: cd 80 int $0x80 811305b: 85 c0 test %eax,%eax 811305d: 89 c7 mov %eax,%edi 811305f: 75 2c jne 811308d <stub_clone_handler+0x8d> 8113061: 8b 1d 00 f0 ff bf mov 0xbffff000,%ebx 8113067: b9 00 10 00 00 mov $0x1000,%ecx 811306c: ba 03 00 00 00 mov $0x3,%edx 8113071: be 11 00 00 00 mov $0x11,%esi 8113076: 8b 3d 04 f0 ff bf mov 0xbffff004,%edi 811307c: 89 d8 mov %ebx,%eax 811307e: 89 eb mov %ebp,%ebx 8113080: 55 push %ebp 8113081: 89 c5 mov %eax,%ebp 8113083: b8 c0 00 00 00 mov $0xc0,%eax 8113088: cd 80 int $0x80 811308a: 5d pop %ebp 811308b: 89 c7 mov %eax,%edi 811308d: 89 7d 18 mov %edi,0x18(%ebp) 8113090: cc int3 8113091: 8b 5c 24 04 mov 0x4(%esp),%ebx 8113095: 8b 74 24 08 mov 0x8(%esp),%esi 8113099: 8b 7c 24 0c mov 0xc(%esp),%edi 811309d: 8b 6c 24 10 mov 0x10(%esp),%ebp 81130a1: 83 c4 14 add $0x14,%esp 81130a4: c3 ret 81130a5: 90 nop 81130a6: 90 nop 81130a7: 90 nop 81130a8: 90 nop 81130a9: 90 nop 81130aa: 90 nop 81130ab: 90 nop 81130ac: 90 nop 81130ad: 90 nop 81130ae: 90 nop 81130af: 90 nop
This make any sense to you? (the original 2.6.15-rc1 builds for me just fine on x86, but I'd like a codebase that builds on both x86-64 and x86. Yes, I'm picky...)
Rob
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 35 lines · Rob Landley
So I took the rollup patch I posted earlier (which made things work on x86-64), and tried to compile it on my x86 Ubuntu "Horny Hedgehog" laptop. I had to revert the /lib64 change, of course. (I need to come up with a good fix for that.)
I also needed to change one more thing: replacing <
asm/signal.h> with <signal.h> inskas-i386/stub_segv.c. (I.E. the same kind of fix I had to make forskas-x86_64/stub_segv.c.)That got it to build. Here's the panic and the dissassembly:
Initialized stdio console driver
Console initialized on/dev/tty0
Failed to open 'root_fs', errno = 2
VFS: Mounted root (hostfs filesystem).
Stub registers -0 - 0 1 - 0 2 - 0 3 - 0 4 - 0 5 - 0 6 - 0 7 - 7b 8 - 7b 9 - 0 10 - 33 11 - ffffffff 12 - 40000c20 13 - 73 14 - 210246 15 - bf55ec10 16 - 7b Kernel panic - not syncing: get_skas_faultinfo : failed to wait for SIGUSR1/SIGTRAP, pid = 13213, n = 13213, errno = 0, status = 0xb7fEIP: 0073:[<40000c20>] CPU: 0 Not tainted ESP: 007b:bf55ec10 EFLAGS: 00210246
Not tainted
EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX: 00000000
ESI: 00000000 EDI: 00000000 EBP: 00000000 DS: 007b ES: 007b
Quoted 9 lines
088a7bac: [<08080b5d>] notifier_call_chain+0x2d/0x50 088a7bc8: [<080714a1>] panic+0x71/0x110 088a7be0: [<0805e910>] wait_stub_done+0x100/0x190 088a7c60: [<0805ea1a>] get_skas_faultinfo+0x7a/0xa0 088a7c70: [<0806a081>] save_registers+0x41/0x80 088a7c78: [<08060602>] user_signal+0x62/0x70 088a7c8c: [<0805f0f0>] userspace+0x180/0x220 088a7cd8: [<08055f50>] init+0x0/0x170 088a7ce4: [<0805fc12>] new_thread_handler+0xf2/0x130
Oh, this implies, that registers already have been restored successfully after processing of stub_segv!
So I guess, SIGUSR1 isn't unblocked at sigreturn or there is no SIGUSR1 in the queue for userspace (don't ask me why ...). In that case userspace wouldn't stop at stub_segv's sigreturn, but would try to run the segfaulted code, which again segfaults, as first segfault is unhandled yet. If so, just handling SIGSEGV the same way as SIGUSR1 or SIGSTOP in wait_stub_done() could work around the problem. (Not a solution, but a test only)
Quoted 14 lines
081130b0<stub_segv_handler>:81130b0: 8b 44 24 5c mov 0x5c(%esp),%eax 81130b4: 8d 54 24 08 lea 0x8(%esp),%edx 81130b8: a3 04 f0 ff bf mov %eax,0xbffff004 81130bd: 8b 44 24 3c mov 0x3c(%esp),%eax 81130c1: a3 00 f0 ff bf mov %eax,0xbffff000 81130c6: 8b 44 24 38 mov 0x38(%esp),%eax 81130ca: a3 08 f0 ff bf mov %eax,0xbffff008 81130cf: 89 d0 mov %edx,%eax 81130d1: 89 c4 mov %eax,%esp 81130d3: b8 77 00 00 00 mov $0x77,%eax 81130d8: cd 80 int $0x80 81130da: c3 ret
This looks fine.
Bodo
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 2 lines · Rob Landley
Kernel panic - not syncing: get_skas_faultinfo : failed to wait forSIGUSR1/SIGTRAP, pid = 13213, n = 13213, errno = 0, status =
0xb7f
Can you try my latest patchset?
Jeff
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 7 lines · Jeff Dike
Quoted 2 lines · Rob Landley
Kernel panic - not syncing: get_skas_faultinfo : failed to wait forSIGUSR1/SIGTRAP, pid = 13213, n = 13213, errno = 0, status =
0xb7fCan you try my latest patchset?
Jeff
Sure:
tar xvjf linux-2.6.14.tar.bz2
cd linux-2.6.14
bzcat ../patch-2.6.15-rc1.bz2 | patch -p1
tar xvf ../patches.tar
for i in cat patches/series; do patch -p1 patches/$i; done cp ../../system/uml-miniconf allno.config
make ARCH=um allnoconfig
make ARCH=um
...
CHK arch/um/include/user_constants.h UPD arch/um/include/user_constants.h CHK include/linux/version.h UPD include/linux/version.h
SYMLINK include/asm -> include/asm-um
SPLIT include/linux/autoconf.h -> include/config/*
gcc -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing
-fno-common -ffreestanding -O2 -fomit-frame-pointer -D__arch_um__
-DSUBARCH=\"i386\" -Iarch/um/include -I/home/landley/newbuild/firmware-build/sources/packages/linux-2.6.14/arch/um/include/skas -Dvmap=kernel_vmap -Din6addr_loopback=kernel_in6addr_loopback -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask -U__i386__ -Ui386
-march=i686 -mpreferred-stack-boundary=2 -D_LARGEFILE64_SOURCE -nostdinc
-isystem /usr/lib/gcc-lib/i486-linux/3.3.5/include -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -S -o arch/um/kernel-offsets.s arch/um/sys-i386/kernel-offsets.c
In file included from include/asm/thread_info.h:12,
from include/linux/thread_info.h:21,
from include/linux/spinlock.h:53,
from include/linux/capability.h:45,
from include/linux/sched.h:7,
from arch/um/sys-i386/kernel-offsets.c:3:
include/asm/processor.h:19: error: field `tls' has incomplete type
In file included from arch/um/include/um_mmu.h:17,
from include/asm/mmu.h:9,
from include/linux/sched.h:23,
from arch/um/sys-i386/kernel-offsets.c:3:/home/landley/newbuild/firmware-build/sources/packages/linux-2.6.14/arch/um/include/skas/mmu-skas.h:19:
error: syntax error before "uml_ldt_t" /home/landley/newbuild/firmware-build/sources/packages/linux-2.6.14/arch/um/include/skas/mmu-skas.h:19:
warning: no semicolon at end of struct or union
In file included from include/asm/mmu.h:9,
from include/linux/sched.h:23,
from arch/um/sys-i386/kernel-offsets.c:3:arch/um/include/um_mmu.h:25: error: field `skas' has incomplete type
make: *** [arch/um/kernel-offsets.s] Error 1
Rob
CONFIG_MODE_SKAS=yCONFIG_BINFMT_ELF=yCONFIG_HOSTFS=yCONFIG_SYSCTL=yCONFIG_STDERR_CONSOLE=yCONFIG_UNIX98_PTYS=yCONFIG_BLK_DEV_LOOP=yCONFIG_BLK_DEV_UBD=yCONFIG_TMPFS=yCONFIG_SWAP=yCONFIG_LBD=yCONFIG_EXT2_FS=yCONFIG_PROC_FS=yCONFIG_SQUASHFS=yCONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3CONFIG_ZLIB_INFLATE=y
Quoted 3 lines · Rob Landley
Sure:
make: *** [
arch/um/kernel-offsets.s] Error 1
Sorry, I forgot this was x86_64. Try the patches up to tt-options - the tls stuff doesn't build on x86_64 yet.
Jeff
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 9 lines · Jeff Dike
Quoted 3 lines · Rob Landley
Sure:
make: *** [
arch/um/kernel-offsets.s] Error 1Sorry, I forgot this was
x86_64. Try the patches up to tt-options - the tls stuff doesn't build onx86_64yet.Jeff
No, now I'm trying to build it on x86. I got x86-64 to work (the rollup patch is what I had to apply to 2.6.15-rc1 to get that to work). I think that included tls, but since the target system doesn't use it I don't know.
Unfortunately, 2.6.15-rc1 with your current patch tarball applied isn't building on my ubuntu "horny hedgehog" x86 laptop. Hence the dumps...
I'm trying to get one codebase that builds on both...
Rob
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 2 lines · Rob Landley
is what I had to apply to 2.6.15-rc1 to get that to work). I think that included tls, but since the target system doesn't use it I don't know.
OK, well your recipe results in this
$ grep MODE obj1/.config # CONFIG_MODE_TT is not set # CONFIG_MODE_SKAS is not set
which is not a healthy config. It fails to build here, but the errors are different.
This case does need better error checking though.
Can you check a config that actually has a chance of running?
Jeff
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 4 lines · Jeff Dike
Quoted 2 lines · Rob Landley
is what I had to apply to 2.6.15-rc1 to get that to work). I think that included tls, but since the target system doesn't use it I don't know.
Quoted 8 lines
OK, well your recipe results in this
$ grep MODE obj1/.config # CONFIG_MODE_TT is not set # CONFIG_MODE_SKAS is not setwhich is not a healthy config. It fails to build here, but the errors are different.
That means you didn't get the uml-miniconf I attached to my message copied into allno.config in the source directory. (Did I typo my script?)
2.6.15-rc1 developed a new feature that lets you take a config snippet setting just the features you want and generate a working .config from that. I wrote some bad documentation for it earlier this morning:
http://seclists.org/lists/linux-kernel/2005/Nov/5804.html
Quoted 3 lines
This case does need better error checking though.
Can you check a config that actually has a chance of running?
I'm fairly certain I did. That's why my errors are different. :)
Quoted 1 line
Jeff
Rob
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 2 lines · Rob Landley
That means you didn't get the uml-miniconf I attached to my message copied into allno.config in the source directory.
I did, I think. I followed your recipe.
I didn't notice your miniconf was setting CONFIG_MODE_SKAS=y. I need to figure out why that isn't happening.
Jeff
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 2 lines · Rob Landley
That means you didn't get the uml-miniconf I attached to my message copied into allno.config in the source directory. (Did I typo my script?)
Figured it out. When you do a O= build, the allno.config has to be in the object directory.
Anyhoo, stock -rc1 builds and runs fine here with that config.
Jeff
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 7 lines · Jeff Dike
Quoted 3 lines · Rob Landley
That means you didn't get the uml-miniconf I attached to my message copied into allno.config in the source directory. (Did I typo my script?)
Figured it out. When you do a O= build, the allno.config has to be in the object directory.
Strange, when I tried it here the allno.config had to be in the source directory. (Which I considered a bug.) Today I've been specifying the environment variable explicitly, to by pass the whole issue.
Quoted 1 line
Anyhoo, stock -rc1 builds and runs fine here with that config.
Here it boots up to a prompt, and I can type stuff at that prompt even, but if I try to do anything like whoami or ls, it dies. I could try to narrow down which syscall it's dying on, if you like.
Here's the dissassembly you asked for (of plain 2.6.15-rc1 on my x86 laptop):
0811c0b0 <stub_segv_handler>:
811c0b0: 8b 44 24 5c mov 0x5c(%esp),%eax 811c0b4: 8d 54 24 08 lea 0x8(%esp),%edx 811c0b8: a3 04 f0 ff bf mov %eax,0xbffff004 811c0bd: 8b 44 24 3c mov 0x3c(%esp),%eax 811c0c1: a3 00 f0 ff bf mov %eax,0xbffff000 811c0c6: 8b 44 24 38 mov 0x38(%esp),%eax 811c0ca: a3 08 f0 ff bf mov %eax,0xbffff008 811c0cf: b8 14 00 00 00 mov $0x14,%eax 811c0d4: cd 80 int $0x80 811c0d6: 89 c3 mov %eax,%ebx 811c0d8: b8 25 00 00 00 mov $0x25,%eax 811c0dd: b9 0a 00 00 00 mov $0xa,%ecx 811c0e2: cd 80 int $0x80 811c0e4: 89 d0 mov %edx,%eax 811c0e6: 89 c4 mov %eax,%esp 811c0e8: b8 77 00 00 00 mov $0x77,%eax 811c0ed: cd 80 int $0x80 811c0ef: c3 ret
0811c000 <stub_clone_handler>:
811c000: 83 ec 14 sub $0x14,%esp 811c003: ba 78 00 00 00 mov $0x78,%edx 811c008: b9 fc f7 ff bf mov $0xbffff7fc,%ecx 811c00d: 89 5c 24 04 mov %ebx,0x4(%esp) 811c011: 89 d0 mov %edx,%eax 811c013: bb 11 84 00 00 mov $0x8411,%ebx 811c018: 89 6c 24 10 mov %ebp,0x10(%esp) 811c01c: bd 00 f0 ff bf mov $0xbffff000,%ebp 811c021: 89 74 24 08 mov %esi,0x8(%esp) 811c025: 89 7c 24 0c mov %edi,0xc(%esp) 811c029: cd 80 int $0x80 811c02b: 85 c0 test %eax,%eax 811c02d: 89 c7 mov %eax,%edi 811c02f: 75 5c jne 811c08d <stub_clone_handler+0x8d> 811c031: b8 1a 00 00 00 mov $0x1a,%eax 811c036: 89 fb mov %edi,%ebx 811c038: 89 f9 mov %edi,%ecx 811c03a: 89 fa mov %edi,%edx 811c03c: 89 fe mov %edi,%esi 811c03e: cd 80 int $0x80 811c040: 85 c0 test %eax,%eax 811c042: 89 c7 mov %eax,%edi 811c044: 75 47 jne 811c08d <stub_clone_handler+0x8d> 811c046: be 68 00 00 00 mov $0x68,%esi 811c04b: bb 01 00 00 00 mov $0x1,%ebx 811c050: b9 08 f0 ff bf mov $0xbffff008,%ecx 811c055: 89 f0 mov %esi,%eax 811c057: 89 fa mov %edi,%edx 811c059: cd 80 int $0x80 811c05b: 85 c0 test %eax,%eax 811c05d: 89 c7 mov %eax,%edi 811c05f: 75 2c jne 811c08d <stub_clone_handler+0x8d> 811c061: 8b 1d 00 f0 ff bf mov 0xbffff000,%ebx 811c067: b9 00 10 00 00 mov $0x1000,%ecx 811c06c: ba 03 00 00 00 mov $0x3,%edx 811c071: be 11 00 00 00 mov $0x11,%esi 811c076: 8b 3d 04 f0 ff bf mov 0xbffff004,%edi 811c07c: 89 d8 mov %ebx,%eax 811c07e: 89 eb mov %ebp,%ebx 811c080: 55 push %ebp 811c081: 89 c5 mov %eax,%ebp 811c083: b8 c0 00 00 00 mov $0xc0,%eax 811c088: cd 80 int $0x80 811c08a: 5d pop %ebp 811c08b: 89 c7 mov %eax,%edi 811c08d: 89 7d 18 mov %edi,0x18(%ebp) 811c090: cc int3 811c091: 8b 5c 24 04 mov 0x4(%esp),%ebx 811c095: 8b 74 24 08 mov 0x8(%esp),%esi 811c099: 8b 7c 24 0c mov 0xc(%esp),%edi 811c09d: 8b 6c 24 10 mov 0x10(%esp),%ebp 811c0a1: 83 c4 14 add $0x14,%esp 811c0a4: c3 ret 811c0a5: 90 nop 811c0a6: 90 nop 811c0a7: 90 nop 811c0a8: 90 nop 811c0a9: 90 nop 811c0aa: 90 nop 811c0ab: 90 nop 811c0ac: 90 nop 811c0ad: 90 nop 811c0ae: 90 nop 811c0af: 90 nop
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 9 lines · Jeff Dike
Quoted 3 lines · Rob Landley
Sure:
make: *** [
arch/um/kernel-offsets.s] Error 1Sorry, I forgot this was
x86_64. Try the patches up to tt-options - the tls stuff doesn't build onx86_64yet.Jeff
Actually, it turns out straight 2.6.15-rc1 is unstable under -skas0 mode on my intel laptop. It boots up and gives me a shell prompt (which is all I tested the first time), but if I type whoami (my standard "is this a UML or a host system prompt" test), it panics with:
sh-3.00# whoami
Stub registers -
0 - bffff000
1 - 1000
2 - 3
3 - 11
4 - bffff000
5 - 0
6 - bffff000
7 - 7b
8 - 7b
9 - 0
10 - 33
11 - ffffffff
12 - bfffe08d
13 - 73
14 - 210246
15 - bffff7fc
16 - 7b
Kernel panic - not syncing: copy_context_skas0 : failed to wait for SIGUSR1/SIGTRAP, pid = 9642, n = 9642, errno = 0, status = 0xb7f
EIP: 0073:[<ffffe410>] CPU: 0 Not tainted ESP: 007b:bfa61780 EFLAGS: 00200206
Not tainted
EAX: ffffffda EBX: 01200011 ECX: 00000000 EDX: 00000000
ESI: 00000000 EDI: 401922e8 EBP: bfa617d8 DS: 007b ES: 007b
0819387c: [<08080b5d>] notifier_call_chain+0x2d/0x50 08193898: [<080714a1>] panic+0x71/0x110 081938b0: [<0805e910>] wait_stub_done+0x100/0x190 0819391c: [<0806bc75>] ptrace_setregs+0x25/0x40 08193930: [<0805f340>] copy_context_skas0+0x1b0/0x270 08193a0c: [<0805e6aa>] init_new_context_skas+0x11a/0x1a0 08193a3c: [<0806f912>] copy_mm+0xd2/0x380 08193a80: [<0807051c>] copy_process+0x43c/0xd90 08193aa0: [<0805dcd3>] setjmp_wrapper+0x83/0x90 08193ac4: [<0805dc87>] setjmp_wrapper+0x37/0x90 08193ae4: [<0805a745>] change_signals+0x65/0x90 08193b60: [<08070edf>] do_fork+0x6f/0x1ca 08193b80: [<0807f5a4>] kernel_sigprocmask+0x64/0x140 08193b90: [<08060b00>] copy_to_user_skas+0x70/0xa0 08193ba0: [<08060a50>] copy_chunk_to_user+0x0/0x40 08193bc8: [<0806ced9>] sys_clone+0x79/0xa0 08193bf4: [<080601fc>] handle_syscall+0xec/0x100 08193c64: [<0805eac8>] handle_trap+0x28/0x130 08193c8c: [<0805f134>] userspace+0x1c4/0x220 08193cd8: [<08055f50>] init+0x0/0x170 08193ce4: [<0805fc12>] new_thread_handler+0xf2/0x130
What do you want dumps of? (Keep in mind this is straight -rc1. As of yesterday I can't get your current patch set to even _build_ on my 32-bit x86 ubuntu laptop.)
Let me know what you want me to try...
Rob
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 1 line · Rob Landley
What do you want dumps of? (Keep in mind this is straight -rc1.
The usual disassembly.
Jeff
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 1 line · Rob Landley
include/asm/processor.h:19: error: field `tls' has incomplete type
This is strange. It's complaining about not having a struct user_desc, which is defined in asm-i386/ldt.h, which is included from asm-um/ldt-i386.h through the asm/arch symlink.
Your asm/arch link points to asm-i386, doesn't it?
Quoted 1 line
error: syntax error before "
uml_ldt_t"
uml_ldt_t is clearly typedefed in asm/ldt-i386.h, which is symlinked from ldt.h, which is included into mme-skas.h.
Your recipe says you did a completely clean build, but the symptoms look to me like you have leftovers from a non-UML or non-UML/i386 build.
Jeff
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 8 lines · Jeff Dike
Quoted 1 line · Rob Landley
include/asm/processor.h:19: error: field `tls' has incomplete typeThis is strange. It's complaining about not having a struct
user_desc, which is defined inasm-i386/ldt.h, which is included fromasm-um/ldt-i386.hthrough the asm/arch symlink.Your asm/arch link points to asm-i386, doesn't it?
Let's see. Grab a fresh patches.tar off the website, cd into the source directory of 2.6.15-rc1 that just built but didn't work to give the assembly dump from a moment ago, and go:
for i in cat patches/series; do patch -p1 -i patches/$i; done
mkdir ../linux-umlbuild2
make KCONFIG_ALLCONFIG=../../sources/system/uml-miniconf \
ARCH=um O=../linux-umlbuild2 allnoconfig
cd ../linux-umlbuild2
make ARCH=um
And it dies with:
SPLIT include/linux/autoconf.h -> include/config/*
gcc -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing
-fno-common -ffreestanding -O2 -fomit-frame-pointer -D__arch_um__
-DSUBARCH=\"i386\" -Iarch/um/include -I/home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/arch/um/include -I/home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/arch/um/include/skas -Dvmap=kernel_vmap -Din6addr_loopback=kernel_in6addr_loopback
-Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask -U__i386__ -Ui386
-march=i686 -mpreferred-stack-boundary=2 -D_LARGEFILE64_SOURCE -nostdinc
-isystem /usr/lib/gcc-lib/i486-linux/3.3.5/include -D__KERNEL__ -Iinclude
-Iinclude2
-I/home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/include -include include/linux/autoconf.h -S -oarch/um/kernel-offsets.s /home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/arch/um/sys-i386/kernel-offsets.c In file included from include2/asm/thread_info.h:12,
from /home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/include/linux/thread_info.h:21,
from /home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/include/linux/spinlock.h:53,
from /home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/include/linux/capability.h:45,
from /home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/include/linux/sched.h:7,
from /home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/arch/um/sys-i386/kernel-offsets.c:3:include/asm/processor.h:19: error: field `tls' has incomplete type
I can send you the tarball of this linux-umlbuild2 directory if you like (it's 118k).
find . -name asm./include/asm
./include2/asm
ls -l include/asm include2/asm
lrwxrwxrwx 1 landley landley 72 2005-11-17 16:46 include2/asm -> /home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/include/asm-um lrwxrwxrwx 1 landley landley 6 2005-11-17 16:46 include/asm -> asm-um
ls -l include/asm/arch include2/asm/arch
ls: include2/asm/arch: No such file or directory
lrwxrwxrwx 1 landley landley 74 2005-11-17 16:46 include/asm/arch -> /home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/include/asm-i386
I have no idea what the difference between include and include2 is, but it's there on the straight -rc1 that built, so I'm assuming it's intentional.
Quoted 7 lines
Quoted 1 line
error: syntax error before "
uml_ldt_t"
uml_ldt_tis clearly typedefed inasm/ldt-i386.h, which is symlinked fromldt.h, which is included intomme-skas.h.Your recipe says you did a completely clean build, but the symptoms look to me like you have leftovers from a non-UML or non-UML/i386 build.
I've never done any non-x86 builds on my laptop. (Only an x86 toolchain installed.) I have done non-UML builds, but this is a clean directory.
gcc -v says:
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.5/specs Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux Thread model: posix
gcc version 3.3.5 (Debian 1:3.3.5-8ubuntu2)
I have noticed that if you do a UML build and then make ARCH=um distclean and diff the directory with a freshly extracted tarball, you get all sorts of crud left over. But that's a side issue. (And another reason to use O=, I suppose...)
Quoted 1 line
Jeff
Rob
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 15 lines · Rob Landley
find . -name asm
./include/asm
./include2/asmls -l
include/asminclude2/asm
lrwxrwxrwx 1 landley landley 72 2005-11-17 16:46 include2/asm ->/home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/include/asm-umlrwxrwxrwx 1 landley landley 6 2005-11-17 16:46include/asm-> asm-umls -l
include/asm/archinclude2/asm/arch
ls: include2/asm/arch: No such file or directory
lrwxrwxrwx 1 landley landley 74 2005-11-17 16:46include/asm/arch->/home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/include/asm-i386
Quoted 3 lines
I have no idea what the difference between include and include2 is, but it's there on the straight -rc1 that built, so I'm assuming it's intentional.
By the way: for some reason, the asm-i386 directory contains an "asm-i386" symlink pointing to itself:
ls
-l /home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/include/asm-i386/asm-i386 lrwxrwxrwx 1 landley landley 75 2005-11-17
17:08 /home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/include/asm-i386/asm-i386 -> /home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/include/asm-i386/
Useful data point?
Rob
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 9 lines · Rob Landley
find . -name asm
./include/asm
./include2/asmls -l
include/asminclude2/asm
lrwxrwxrwx 1 landley landley 72 2005-11-17 16:46 include2/asm ->/home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/include/asm-umlrwxrwxrwx 1 landley landley 6 2005-11-17 16:46include/asm-> asm-um
Quoted 4 lines
ls -l
include/asm/archinclude2/asm/arch
ls: include2/asm/arch: No such file or directory
lrwxrwxrwx 1 landley landley 74 2005-11-17 16:46include/asm/arch->/home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/include/asm-i386
This all looks the same as I have here, except for the asm-i386 thing, which I don't think matters. ldt.h seems to be at the center of this, so can you check the following:
asm-i386/ldt.h contains a struct user_desc
asm-um includes asm/arch/ldt.h
asm-um/ldt.h contains a typedef of uml_ldt_t mmu-skas.h includes asm-um/ldt.h
Also, generate a .i for the C file that's being built and check that the definitions are getting pulled in. There may be an easier way to do this, but I
turn on V=1
cd obj
paste the gcc command into an xterm
edit it as follows
the -o -c foo.o is replaced by -E
add > x.i at the end
Jeff
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 18 lines · Jeff Dike
Quoted 10 lines · Rob Landley
find . -name asm
./include/asm
./include2/asmls -l
include/asminclude2/asm
lrwxrwxrwx 1 landley landley 72 2005-11-17 16:46 include2/asm ->/home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/include/asm-umlrwxrwxrwx 1 landley landley 6 2005-11-17 16:46include/asm-> asm-umQuoted 6 lines
ls -l
include/asm/archinclude2/asm/arch
ls: include2/asm/arch: No such file or directory
lrwxrwxrwx 1 landley landley 74 2005-11-17 16:46include/asm/arch->/home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/include/asm-i386
Quoted 3 lines
This all looks the same as I have here, except for the asm-i386 thing, which I don't think matters.
ldt.hseems to be at the center of this, so can you check the following:
Oops.
I grabbed your thursday patches tarball (overwriting the one I had), and the result is a mess. Your very first patch goes:
uml-reuse-i386-cpu-optim-fix.patch
patching file arch/um/Kconfig
Reversed (or previously applied) patch detected! Assume -R? [n]
And whether I tell it it's reversed or to skip it, the result is failed hunks and more reversed patches later on.
Here's my apply script:
#!/bin/sh
rm -rf linux-2.6.14 &&
tar xvjf ../sources/packages/linux-2.6.14.tar.bz2 &&
cd linux-2.6.14 &&
(bzcat ../../sources/packages/patch-2.6.15-rc1.bz2 | exit 1) | patch -p1 && tar xvf ~/patches.tar &&
for i in cat patches/series
do
echo $i
patch -p1 -i patches/$i
done
Is the problem on my end, or is your tarball horked?
I'll dig around and see if I still have a copy of wednesday's, which at least applied...
Rob
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 2 lines · Rob Landley
I grabbed your thursday patches tarball (overwriting the one I had), and the result is a mess. Your very first patch goes:
Nevermind, my script was at fault...
Rob
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 18 lines · Jeff Dike
Quoted 10 lines · Rob Landley
find . -name asm
./include/asm
./include2/asmls -l
include/asminclude2/asm
lrwxrwxrwx 1 landley landley 72 2005-11-17 16:46 include2/asm ->/home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/include/asm-umlrwxrwxrwx 1 landley landley 6 2005-11-17 16:46include/asm-> asm-umQuoted 6 lines
ls -l
include/asm/archinclude2/asm/arch
ls: include2/asm/arch: No such file or directory
lrwxrwxrwx 1 landley landley 74 2005-11-17 16:46include/asm/arch->/home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/include/asm-i386
Quoted 4 lines
This all looks the same as I have here, except for the asm-i386 thing, which I don't think matters.
ldt.hseems to be at the center of this, so can you check the following:
asm-i386/ldt.hcontains a structuser_desc
Yup.
Quoted 1 line
asm-um includes
asm/arch/ldt.h
There's no asm subdirectory under asm-um.
Quoted 1 line
asm-um/ldt.hcontains a typedef ofuml_ldt_t
asm-um/ldt.h is a 0 byte file.
Quoted 1 line
mmu-skas.hincludesasm-um/ldt.h
The one in arch/um/include/skas includes asm/ldt.h The one in arch/um/kernel/skas/include is a 0 byte file.
Quoted 9 lines
Also, generate a .i for the C file that's being built and check that the definitions are getting pulled in. There may be an easier way to do this, but I
turn on V=1
cd obj
paste the gcc command into an xterm
edit it as follows
the -o -c foo.o is replaced by -E
add > x.i at the end
The line that's going boing is
gcc -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing
-fno-common -ffreestanding -O2 -fomit-frame-pointer -D__arch_um__
-DSUBARCH=\"i386\" -Iarch/um/include -I/home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/arch/um/include -I/home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/arch/um/include/skas -Dvmap=kernel_vmap -Din6addr_loopback=kernel_in6addr_loopback
-Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask -U__i386__ -Ui386
-mpreferred-stack-boundary=2 -D_LARGEFILE64_SOURCE -nostdinc
-isystem /usr/lib/gcc-lib/i486-linux/3.3.5/include -D__KERNEL__ -Iinclude
-Iinclude2
-I/home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/include -include include/linux/autoconf.h -S -oarch/um/kernel-offsets.s /home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/arch/um/sys-i386/kernel-offsets.c
I don't even have to add V=1 to get it, that sucker isn't run through a prettification macro. However, whey you say "-o -c foo.o", I can't find that to replace it with -E. Do you mean the "-S -o kernel-offsets.s" bit?
Rob
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28&alloc_id845&opÌk
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 9 lines · Rob Landley
Quoted 7 lines · Jeff Dike
Quoted 1 line · Rob Landley
find . -name asm
This all looks the same as I have here, except for the asm-i386 thing, which I don't think matters.
ldt.hseems to be at the center of this, so can you check the following:
asm-i386/ldt.hcontains a structuser_desc
Quoted 5 lines
Yup.
Quoted 1 line
asm-um includes
asm/arch/ldt.hThere's no asm subdirectory under asm-um.
Jeff meant that inside asm-um you should have a "arch" symlink to "../asm-i386", and that include/asm/arch/ldt.h should exist (in the source tree root).
Quoted 3 lines
Quoted 1 line
asm-um/ldt.hcontains a typedef ofuml_ldt_t
asm-um/ldt.his a 0 byte file.
Damnit! Do rm on it and things will work (Makefiles will create a symlink to ldt-$(SUBARCH) in its place). We had this problem in the past, and exactly for a mis-formed patch with quilt.
Quoted 4 lines
Quoted 1 line
mmu-skas.hincludesasm-um/ldt.hThe one in
arch/um/include/skasincludesasm/ldt.hThe one inarch/um/kernel/skas/includeis a 0 byte file.
I suppose that's a rename from something in the patchset... and that the file is not properly deleted (I hope this one shouldn't create problems).
Damn it again! Je-eff? I remember quilt can be taught to do it!
Quoted 3 lines
Quoted 3 lines
Also, generate a .i for the C file that's being built and check that the definitions are getting pulled in. There may be an easier way to do this, but I
I do make ARCH=um $path.i is supposed to work. I recently fixed it (should be upstream) up for userspace files (along with other extensions - .lst, .s and so on) . Before, obviously, I did as you do.
Quoted 25 lines
Quoted 6 lines
turn on V=1
cd obj
paste the gcc command into an xterm
edit it as follows
the -o -c foo.o is replaced by -E
add > x.i at the endThe line that's going boing is
gcc -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing
(quoted diff) +0
-4-fno-common -ffreestanding -O2 -fomit-frame-pointer -D__arch_um__ -DSUBARCH=\"i386\" -Iarch/um/include -I/home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/arch/um/include -I/home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/arch/um/include/skas -Dvmap=kernel_vmap -Din6addr_loopback=kernel_in6addr_loopback
(quoted diff) +0
-6-Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask -U__i386__ -Ui386 -mpreferred-stack-boundary=2 -D_LARGEFILE64_SOURCE -nostdinc -isystem /usr/lib/gcc-lib/i486-linux/3.3.5/include -D__KERNEL__ -Iinclude -Iinclude2 -I/home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/include -include include/linux/autoconf.h -S -o
arch/um/kernel-offsets.s/home/landley/newbuild/firmware-build/tmpdir/linux-2.6.14/arch/um/sys-i386/kernel-offsets.c
Quoted 3 lines
I don't even have to add V=1 to get it, that sucker isn't run through a prettification macro. However, whey you say "-o -c foo.o", I can't find that to replace it with -E. Do you mean the "-S -o kernel-offsets.s" bit?
In this case yes - Jeff thought the build would stop when building a "foo.o", but it's stopping earlier than he expected.
Signature · 23 lines
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 ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_idv28&alloc_id845&opÌk _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 10 lines · Blaisorblade
Quoted 9 lines · Rob Landley
Quoted 7 lines · Jeff Dike
Quoted 1 line · Rob Landley
find . -name asm
This all looks the same as I have here, except for the asm-i386 thing, which I don't think matters.
ldt.hseems to be at the center of this, so can you check the following:
asm-i386/ldt.hcontains a structuser_desc
Quoted 8 lines
Quoted 5 lines
Yup.
Quoted 1 line
asm-um includes
asm/arch/ldt.hThere's no asm subdirectory under asm-um.
Jeff meant that inside asm-um you should have a "arch" symlink to "../asm-i386",
Yeah, that's there, a symlink to ~source/include/asm-i386
Quoted 2 lines
and that
include/asm/arch/ldt.hshould exist (in the source tree root).
Well, from the obj directory there's include/asm/arch/ldt.h (704 bytes).
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
asm-um/ldt.hcontains a typedef ofuml_ldt_t
asm-um/ldt.his a 0 byte file.Damnit! Do rm on it and things will work (Makefiles will create a symlink to ldt-$(SUBARCH) in its place). We had this problem in the past, and exactly for a mis-formed patch with quilt.
Should I delete all of them, then?
find . -size 0b./arch/um/drivers/ubd_user.c./arch/um/include/signal_user.h./arch/um/include/time_user.h./arch/um/include/umid.h./arch/um/kernel/irq_user.c./arch/um/kernel/signal_user.c./arch/um/kernel/skas/include/mm_id.h./arch/um/kernel/skas/include/mmu-skas.h./arch/um/kernel/skas/include/mode-skas.h./arch/um/kernel/skas/include/proc_mm.h./arch/um/kernel/skas/include/skas.h./arch/um/kernel/skas/include/stub-data.h./arch/um/kernel/skas/include/uaccess-skas.h./arch/um/kernel/skas/include/mode_kern_skas.h./arch/um/kernel/skas/mem_user.c./arch/um/kernel/skas/process.c./arch/um/kernel/skas/trap_user.c./arch/um/kernel/time.c./arch/um/kernel/trap_user.c./arch/um/kernel/tt/include/debug.h./arch/um/kernel/tt/include/mmu-tt.h./arch/um/kernel/tt/include/mode_kern-tt.h./arch/um/kernel/tt/include/tt.h./arch/um/kernel/tt/include/uaccess-tt.h./arch/um/kernel/tty_log.c./arch/um/kernel/user_util.c./fs/hostfs/Makefile./fs/hostfs/hostfs.h./fs/hostfs/hostfs_kern.c./fs/hostfs/hostfs_user.c./include/asm-um/ldt.h
Let's see...
find . -size 0b | xargs rm
Oh that's a _much_ happier build. It's got various warnings about iplicit declarations and unused variables but none of those big long chains of "in file included from" and the build made it all the way to the link stage before dying:
CC lib/semaphore-sleepers.o CC lib/sha1.o CC lib/string.o CC lib/vsprintf.o AR lib/lib.a GEN .version CHK include/linux/compile.h UPD include/linux/compile.h CC init/version.o LD init/built-in.o LD .tmp_vmlinux1
arch/um/sys-i386/built-in.o(.text+0x3b60): In function `load_TLS':
: undefined reference to `indirect_set_thread_area'
collect2: ld returned 1 exit status
KSYM .tmp_kallsyms1.S
nm: '.tmp_vmlinux1': No such file
No valid symbol.
make[2]: *** [.tmp_kallsyms1.S] Error 1
make[1]: *** [_all] Error 2
make: *** [all] Error 2
This is progress!
What would you like next from me?
Rob
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 8 lines · Rob Landley
Quoted 6 lines · Blaisorblade
Quoted 5 lines · Rob Landley
Quoted 4 lines · Jeff Dike
Quoted 1 line · Rob Landley
find . -name asm
asm-um/ldt.hcontains a typedef ofuml_ldt_t
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
asm-um/ldt.his a 0 byte file.Damnit! Do rm on it and things will work (Makefiles will create a symlink to ldt-$(SUBARCH) in its place). We had this problem in the past, and exactly for a mis-formed patch with quilt.
Should I delete all of them, then?
It shouldn't do any harm removing them... for headers like that the 0-length file prevents the creation of the symlink.
Also, I think that even when the patch is wrong (doesn't remove the file), applying it with quilt does the right thing.
Quoted 3 lines
find . -size 0b
./arch/um/drivers/ubd_user.c./arch/um/include/signal_user.h
.......
Quoted 5 lines
./fs/hostfs/Makefile./fs/hostfs/hostfs.h./fs/hostfs/hostfs_kern.c./fs/hostfs/hostfs_user.c./include/asm-um/ldt.h
JEEFF :-| ? Where are you? How should I hunt you ;-))) ?
Quoted 32 lines
Let's see...
find . -size 0b | xargs rm
Oh that's a _much_ happier build. It's got various warnings about iplicit declarations and unused variables but none of those big long chains of "in file included from" and the build made it all the way to the link stage before dying:
CC lib/semaphore-sleepers.o CC lib/sha1.o CC lib/string.o CC lib/vsprintf.o AR lib/lib.a GEN .version CHK include/linux/compile.h UPD include/linux/compile.h CC init/version.o LD init/built-in.o LD .tmp_vmlinux1arch/um/sys-i386/built-in.o(.text+0x3b60): In function `load_TLS':
: undefined reference to `indirect_set_thread_area'collect2: ld returned 1 exit status
KSYM.tmp_kallsyms1.S
nm: '.tmp_vmlinux1': No such file
No valid symbol.
make[2]: *** [.tmp_kallsyms1.S] Error 1
make[1]: *** [_all] Error 2
make: *** [all] Error 2
Quoted 1 line
This is progress!
Disable TT mode or play with such things IIRC - actually there's a proper fix along lines of "move #ifdef's inside sys-i386/tls.c to properly cater to dependencies" if you want.
This comes from the TLS patches btw...
Signature · 20 lines
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 ___________________________________ Yahoo! Messenger: chiamate gratuite in tutto il mondo http://it.messenger.yahoo.com ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 11 lines · Blaisorblade
Quoted 11 lines
arch/um/sys-i386/built-in.o(.text+0x3b60): In function `load_TLS':
: undefined reference to `indirect_set_thread_area'collect2: ld returned 1 exit status
KSYM.tmp_kallsyms1.S
nm: '.tmp_vmlinux1': No such file
No valid symbol.
make[2]: *** [.tmp_kallsyms1.S] Error 1
make[1]: *** [_all] Error 2
make: *** [all] Error 2
Quoted 3 lines
Quoted 1 line
This is progress!
Disable TT mode or play with such things IIRC
Nope, tt mode already is disabled.
Quoted 5 lines
- actually there's a proper
fix along lines of "move #ifdef's insidesys-i386/tls.cto properly cater to dependencies" if you want.This comes from the TLS patches btw...
I'll be banging on this more in a bit...
Rob
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 12 lines · Rob Landley
Quoted 11 lines · Blaisorblade
Quoted 11 lines
arch/um/sys-i386/built-in.o(.text+0x3b60): In function `load_TLS':
: undefined reference to `indirect_set_thread_area'collect2: ld returned 1 exit status
KSYM.tmp_kallsyms1.S
nm: '.tmp_vmlinux1': No such file
No valid symbol.
make[2]: *** [.tmp_kallsyms1.S] Error 1
make[1]: *** [_all] Error 2
make: *** [all] Error 2
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
This is progress!
Disable TT mode or play with such things IIRC
Nope, tt mode already is disabled.
Be creative - enable it then... yep, indirect_... is defined only when TT is active, but is also used otherwise.
Quoted 9 lines
Quoted 5 lines
- actually there's a proper
fix along lines of "move #ifdef's insidesys-i386/tls.cto properly cater to dependencies" if you want.This comes from the TLS patches btw...
I'll be banging on this more in a bit...
Rob
Signature · 23 lines
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 ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
[uml-devel] tls incrementals for 2.6.15 breaking build ... still?
i'm trying to build an 'uptodate' UML guest and see exactly this 'undefined reference to indirect_set_thread_area' (reported in November) with 2.6.15 and all the incrementals from the patch tarball for 2006-01-08 on user-mode-linux.sf.net.
the comment related to this patch says CONFIG_MODE_ TT 'off' ... but this email says try it 'on' and that just leads to:
CC arch/um/os-Linux/tls.oarch/um/os-Linux/tls.c:48: error: syntax error before "get_thread_area" arch/um/os-Linux/tls.c:48: warning: type defaults to int' in declaration of _syscall1'arch/um/os-Linux/tls.c:48: warning: function declaration isn't a prototype arch/um/os-Linux/tls.c:48: warning: data definition has no type or storage classarch/um/os-Linux/tls.c:49: error: syntax error before "set_thread_area" arch/um/os-Linux/tls.c:49: warning: type defaults to int' in declaration of _syscall1'arch/um/os-Linux/tls.c:49: warning: function declaration isn't a prototype arch/um/os-Linux/tls.c:49: warning: data definition has no type or storage classarch/um/os-Linux/tls.c:51: warning: "struct user_desc" declared inside parameter listarch/um/os-Linux/tls.c:51: warning: its scope is only this definition or declaration, which is probably not what you want arch/um/os-Linux/tls.c: In function `do_set_thread_area_tt':arch/um/os-Linux/tls.c:55: warning: implicit declaration of function `set_thread_area'arch/um/os-Linux/tls.c: At top level:arch/um/os-Linux/tls.c:62: warning: "struct user_desc" declared inside parameter listarch/um/os-Linux/tls.c: In function `do_get_thread_area_tt':arch/um/os-Linux/tls.c:66: warning: implicit declaration of function `get_thread_area'
make[1]: *** [arch/um/os-Linux/tls.o] Error 1
Quoted 42 lines · Blaisorblade
Quoted 13 lines · Rob Landley
Quoted 11 lines · Blaisorblade
Quoted 11 lines
arch/um/sys-i386/built-in.o(.text+0x3b60): In function `load_TLS':
: undefined reference to `indirect_set_thread_area'collect2: ld returned 1 exit status
KSYM.tmp_kallsyms1.S
nm: '.tmp_vmlinux1': No such file
No valid symbol.
make[2]: *** [.tmp_kallsyms1.S] Error 1
make[1]: *** [_all] Error 2
make: *** [all] Error 2Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
This is progress!
Disable TT mode or play with such things IIRC
Nope, tt mode already is disabled.
Be creative - enable it then... yep,
indirect_... is defined only when TT is active, but is also used otherwise.Quoted 14 lines
Quoted 6 lines
- actually there's a proper
fix along lines of "move #ifdef's insidesys-i386/tls.cto properly cater to dependencies" if you want.This comes from the TLS patches btw...
I'll be banging on this more in a bit...
Rob
Re: [uml-devel] tls incrementals for 2.6.15 breaking build ... still?
so instead of just my usual whining attached is a suggested fix ;)
Quoted 37 lines · D. Bahi
i'm trying to build an 'uptodate' UML guest and see exactly this 'undefined reference to
indirect_set_thread_area' (reported in November) with 2.6.15 and all the incrementals from the patch tarball for 2006-01-08 on user-mode-linux.sf.net.the comment related to this patch says
CONFIG_MODE_TT 'off' ... but this email says try it 'on' and that just leads to:CC
arch/um/os-Linux/tls.oarch/um/os-Linux/tls.c:48: error: syntax error before "get_thread_area"arch/um/os-Linux/tls.c:48: warning: type defaults toint' in declaration of_syscall1'arch/um/os-Linux/tls.c:48: warning: function declaration isn't a prototypearch/um/os-Linux/tls.c:48: warning: data definition has no type or storage classarch/um/os-Linux/tls.c:49: error: syntax error before "set_thread_area"arch/um/os-Linux/tls.c:49: warning: type defaults toint' in declaration of_syscall1'arch/um/os-Linux/tls.c:49: warning: function declaration isn't a prototypearch/um/os-Linux/tls.c:49: warning: data definition has no type or storage classarch/um/os-Linux/tls.c:51: warning: "structuser_desc" declared inside parameter listarch/um/os-Linux/tls.c:51: warning: its scope is only this definition or declaration, which is probably not what you wantarch/um/os-Linux/tls.c: In function `do_set_thread_area_tt':arch/um/os-Linux/tls.c:55: warning: implicit declaration of function `set_thread_area'arch/um/os-Linux/tls.c: At top level:arch/um/os-Linux/tls.c:62: warning: "structuser_desc" declared inside parameter listarch/um/os-Linux/tls.c: In function `do_get_thread_area_tt':arch/um/os-Linux/tls.c:66: warning: implicit declaration of function `get_thread_area'
make[1]: *** [arch/um/os-Linux/tls.o] Error 1
Quoted 54 lines
Quoted 50 lines · Blaisorblade
Quoted 14 lines · Rob Landley
Quoted 11 lines · Blaisorblade
Quoted 11 lines
arch/um/sys-i386/built-in.o(.text+0x3b60): In function `load_TLS':
: undefined reference to `indirect_set_thread_area'collect2: ld returned 1 exit status
KSYM.tmp_kallsyms1.S
nm: '.tmp_vmlinux1': No such file
No valid symbol.
make[2]: *** [.tmp_kallsyms1.S] Error 1
make[1]: *** [_all] Error 2
make: *** [all] Error 2Quoted 9 lines
Quoted 6 lines
Quoted 3 lines
This is progress!
Disable TT mode or play with such things IIRC
Nope, tt mode already is disabled.
Be creative - enable it then... yep,
indirect_... is defined only when TT is active, but is also used otherwise.Quoted 17 lines
Quoted 7 lines
- actually there's a proper
fix along lines of "move #ifdef's insidesys-i386/tls.cto properly cater to dependencies" if you want.This comes from the TLS patches btw...
I'll be banging on this more in a bit...
Rob
arch/um/sys-i386/tls.c renamed from arch/um/sys-i386/tls.c~ +1 -1
@@ -134,7 +134,7 @@ int load_TLS(int flags, struct task_struif (!(flags &O_FORCE ) && curr->flushed)continue ; - ret = (flags &O_INDIRECT ) ?indirect_set_thread_area (&curr->tls):do_set_thread_area (&curr->tls); + ret =CHOOSE_MODE_PROC ( indirect_set_thread_area, do_set_thread_area, &curr->tls );if (ret) goto out;