2010-06-14 09:49:32

by Toralf Förster

[permalink] [raw]
Subject: Re: [PATCH] x86, hweight: Fix UML boot crash


Borislav Petkov wrote at 16:10:58
> Did you do 'make mrproper' before rebuilding UML with it?

Today I started with a clean git tree (cloned Linus tree) and got this :

foerste@n22 ~ $ start_uml.sh
Locating the bottom of the address space ... 0x1000
Locating the top of the address space ... 0xc0000000
Core dump limits :
soft - NONE
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 23175168 bytes to physical memory to account for exec-shield gap
Linux version 2.6.35-rc3 (tfoerste@n22) (gcc version 4.4.3 (Gentoo 4.4.3-r2
p1.2) ) #1 Mon Jun 14 11:45:10 CEST 2010
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 70637
Kernel command line: ubda=/home/tfoerste/virtual/uml/gentoo_root_fs
ubdb=/home/tfoerste/virtual/uml/swap_fs eth0=tuntap,,,192.168.0.253 mem=256M
root=98:0
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 254232k available
Hierarchical RCU implementation.
RCU-based detection of stalled CPUs is disabled.
Verbose stalled-CPUs detection is disabled.
NR_IRQS:15
Calibrating delay loop... 4692.37 BogoMIPS (lpj=23461888)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
Checking for host processor cmov support...Yes
Checking that host ptys support output SIGIO...Yes
Checking that host ptys support SIGIO on close...No, enabling workaround
Using 2.6 host AIO
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: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 5, 131072 bytes)
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
mconsole (version 2) initialized on /home/tfoerste/.uml/tfoerste/mconsole
Checking host MADV_REMOVE support...OK
UML Audio Relay (host dsp = /dev/sound/dsp, host mixer = /dev/sound/mixer)
Host TLS support detected
Detected host type: i386 (GDT indexes 6 to 9)
Installing knfsd (copyright (C) 1996 [email protected]).
msgmni has been set to 496
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler cfq registered (default)
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <[email protected]>
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:
EIP: 0073:[<081c4fcb>] CPU: 0 Not tainted ESP: 007b:08300b40 EFLAGS: 00010297
Not tainted
EAX: 00000000 EBX: 190d2000 ECX: ffff8aea EDX: 00000000
ESI: 191f4930 EDI: 191ef900 EBP: 191f4930 DS: 007b ES: 007b
08300794: [<0805e65f>] segv_handler+0x3f/0x60
083007a4: [<081c4fcb>] cfq_close_cooperator+0x4b/0x180
083007b0: [<0806eec5>] sig_handler_common+0x55/0xa0
083007f0: [<081c4fcb>] cfq_close_cooperator+0x4b/0x180
08300828: [<0806f063>] sig_handler+0x23/0x40
08300830: [<0806f2bd>] handle_signal+0x5d/0xa0
08300850: [<080715f7>] hard_handler+0x17/0x20
0830089c: [<081c4fcb>] cfq_close_cooperator+0x4b/0x180
08300a4c: [<0807a3eb>] T.696+0x9b/0xc0
08300a74: [<08079425>] enqueue_task+0x45/0x60
08300a94: [<0807945f>] activate_task+0x1f/0x30
08300aa0: [<080794d8>] try_to_wake_up+0x68/0xa0
08300acc: [<0809369f>] autoremove_wake_function+0x2f/0x60
08300ae8: [<0807754f>] __wake_up_common+0x4f/0x80
08300b18: [<08077837>] __wake_up+0x47/0x60
08300b3c: [<081c4fc6>] cfq_close_cooperator+0x46/0x180
08300b58: [<081c5440>] cfq_completed_request+0x2a0/0x560
08300b90: [<081b7fce>] elv_completed_request+0x7e/0xf0
08300ba8: [<081b98f6>] __blk_put_request+0x36/0xf0
08300bc0: [<081b9b26>] blk_finish_request+0x176/0x1d0
08300be0: [<081b9ea1>] blk_end_bidi_request+0x41/0x60
08300bf4: [<08068e8d>] ubd_intr+0x2d/0xf0
08300c14: [<080a6b32>] handle_IRQ_event+0x32/0xc0
08300c34: [<080a6c1b>] __do_IRQ+0x5b/0xb0
08300c50: [<0805b364>] do_IRQ+0x24/0x40
08300c5c: [<0805b59b>] sigio_handler+0x5b/0x80
08300c70: [<0806eec5>] sig_handler_common+0x55/0xa0
08300c80: [<0806efb5>] real_alarm_handler+0x35/0x40
08300cbc: [<080739f0>] __delay+0x20/0x30
08300ce8: [<0806f063>] sig_handler+0x23/0x40
08300cf0: [<0806f2bd>] handle_signal+0x5d/0xa0
08300d10: [<080715f7>] hard_handler+0x17/0x20

Kernel panic - not syncing: Segfault with no mm
083006c8: [<0827feff>] panic+0x60/0xd0
083006e0: [<0805e5dc>] segv+0x2ac/0x2f0
08300794: [<0805e65f>] segv_handler+0x3f/0x60
083007a4: [<081c4fcb>] cfq_close_cooperator+0x4b/0x180
083007b0: [<0806eec5>] sig_handler_common+0x55/0xa0
083007f0: [<081c4fcb>] cfq_close_cooperator+0x4b/0x180
08300828: [<0806f063>] sig_handler+0x23/0x40
08300830: [<0806f2bd>] handle_signal+0x5d/0xa0
08300850: [<080715f7>] hard_handler+0x17/0x20
0830089c: [<081c4fcb>] cfq_close_cooperator+0x4b/0x180
08300a4c: [<0807a3eb>] T.696+0x9b/0xc0
08300a74: [<08079425>] enqueue_task+0x45/0x60
08300a94: [<0807945f>] activate_task+0x1f/0x30
08300aa0: [<080794d8>] try_to_wake_up+0x68/0xa0
08300acc: [<0809369f>] autoremove_wake_function+0x2f/0x60
08300ae8: [<0807754f>] __wake_up_common+0x4f/0x80
08300b18: [<08077837>] __wake_up+0x47/0x60
08300b3c: [<081c4fc6>] cfq_close_cooperator+0x46/0x180
08300b58: [<081c5440>] cfq_completed_request+0x2a0/0x560
08300b90: [<081b7fce>] elv_completed_request+0x7e/0xf0
08300ba8: [<081b98f6>] __blk_put_request+0x36/0xf0
08300bc0: [<081b9b26>] blk_finish_request+0x176/0x1d0
08300be0: [<081b9ea1>] blk_end_bidi_request+0x41/0x60
08300bf4: [<08068e8d>] ubd_intr+0x2d/0xf0
08300c14: [<080a6b32>] handle_IRQ_event+0x32/0xc0
08300c34: [<080a6c1b>] __do_IRQ+0x5b/0xb0
08300c50: [<0805b364>] do_IRQ+0x24/0x40
08300c5c: [<0805b59b>] sigio_handler+0x5b/0x80
08300c70: [<0806eec5>] sig_handler_common+0x55/0xa0
08300c80: [<0806efb5>] real_alarm_handler+0x35/0x40
08300cbc: [<080739f0>] __delay+0x20/0x30
08300ce8: [<0806f063>] sig_handler+0x23/0x40
08300cf0: [<0806f2bd>] handle_signal+0x5d/0xa0
08300d10: [<080715f7>] hard_handler+0x17/0x20


EIP: 0000:[<00000000>] CPU: 0 Not tainted EFLAGS: 00000000
Not tainted
EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX: 00000000
ESI: 00000000 EDI: 00000000 EBP: 00000000 DS: 0000 ES: 0000
083006a4: [<080986ac>] notifier_call_chain+0x3c/0x70
083006c8: [<0827ff27>] panic+0x88/0xd0
083006e0: [<0805e5dc>] segv+0x2ac/0x2f0
08300794: [<0805e65f>] segv_handler+0x3f/0x60
083007a4: [<081c4fcb>] cfq_close_cooperator+0x4b/0x180
083007b0: [<0806eec5>] sig_handler_common+0x55/0xa0
083007f0: [<081c4fcb>] cfq_close_cooperator+0x4b/0x180
08300828: [<0806f063>] sig_handler+0x23/0x40
08300830: [<0806f2bd>] handle_signal+0x5d/0xa0
08300850: [<080715f7>] hard_handler+0x17/0x20
0830089c: [<081c4fcb>] cfq_close_cooperator+0x4b/0x180
08300a4c: [<0807a3eb>] T.696+0x9b/0xc0
08300a74: [<08079425>] enqueue_task+0x45/0x60
08300a94: [<0807945f>] activate_task+0x1f/0x30
08300aa0: [<080794d8>] try_to_wake_up+0x68/0xa0
08300acc: [<0809369f>] autoremove_wake_function+0x2f/0x60
08300ae8: [<0807754f>] __wake_up_common+0x4f/0x80
08300b18: [<08077837>] __wake_up+0x47/0x60
08300b3c: [<081c4fc6>] cfq_close_cooperator+0x46/0x180
08300b58: [<081c5440>] cfq_completed_request+0x2a0/0x560
08300b90: [<081b7fce>] elv_completed_request+0x7e/0xf0
08300ba8: [<081b98f6>] __blk_put_request+0x36/0xf0
08300bc0: [<081b9b26>] blk_finish_request+0x176/0x1d0
08300be0: [<081b9ea1>] blk_end_bidi_request+0x41/0x60
08300bf4: [<08068e8d>] ubd_intr+0x2d/0xf0
08300c14: [<080a6b32>] handle_IRQ_event+0x32/0xc0
08300c34: [<080a6c1b>] __do_IRQ+0x5b/0xb0
08300c50: [<0805b364>] do_IRQ+0x24/0x40
08300c5c: [<0805b59b>] sigio_handler+0x5b/0x80
08300c70: [<0806eec5>] sig_handler_common+0x55/0xa0
08300c80: [<0806efb5>] real_alarm_handler+0x35/0x40
08300cbc: [<080739f0>] __delay+0x20/0x30
08300ce8: [<0806f063>] sig_handler+0x23/0x40
08300cf0: [<0806f2bd>] handle_signal+0x5d/0xa0
08300d10: [<080715f7>] hard_handler+0x17/0x20

Terminated


--
MfG/Kind regards
Toralf F?rster

pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3


Attachments:
config (16.45 kB)

2010-06-14 10:26:34

by Paolo Giarrusso

[permalink] [raw]
Subject: Re: [uml-devel] [PATCH] x86, hweight: Fix UML boot crash

2010/6/14 Toralf Förster <[email protected]>:
>
> Borislav Petkov wrote at 16:10:58
>> Did you do 'make mrproper' before rebuilding UML with it?
>
> Today I started with a clean git tree (cloned Linus tree) and got this :
>
> foerste@n22 ~ $ start_uml.sh

Can you enable frame pointers to get an accurate stack trace? x86 can
be accurate without, but I don't think this was ever implemented for
UML.
Because I'm not sure if below cfq_close_cooperator is being called
again, or if it's just garbage (as I guess). Anyway, it's still likely
that the crash is on hweight32.

Also, it'd be interesting to diff your configuration with the one used
by people the patch works for. Say,
$ grep HWEIGHT .config
(if there are any CFLAGS set in ARcH_HWEIGHT_CFLAGS, that would be a
problem as far as I see).

> EIP: 0073:[<081c4fcb>] CPU: 0 Not tainted ESP: 007b:08300b40 EFLAGS: 00010297
>    Not tainted
> EAX: 00000000 EBX: 190d2000 ECX: ffff8aea EDX: 00000000
> ESI: 191f4930 EDI: 191ef900 EBP: 191f4930 DS: 007b ES: 007b
> 08300794:  [<0805e65f>] segv_handler+0x3f/0x60
> 083007a4:  [<081c4fcb>] cfq_close_cooperator+0x4b/0x180
> 083007b0:  [<0806eec5>] sig_handler_common+0x55/0xa0
> 083007f0:  [<081c4fcb>] cfq_close_cooperator+0x4b/0x180
> 08300828:  [<0806f063>] sig_handler+0x23/0x40
> 08300830:  [<0806f2bd>] handle_signal+0x5d/0xa0
> 08300850:  [<080715f7>] hard_handler+0x17/0x20
> 0830089c:  [<081c4fcb>] cfq_close_cooperator+0x4b/0x180
> 08300a4c:  [<0807a3eb>] T.696+0x9b/0xc0
> 08300a74:  [<08079425>] enqueue_task+0x45/0x60
> 08300a94:  [<0807945f>] activate_task+0x1f/0x30
> 08300aa0:  [<080794d8>] try_to_wake_up+0x68/0xa0
> 08300acc:  [<0809369f>] autoremove_wake_function+0x2f/0x60
> 08300ae8:  [<0807754f>] __wake_up_common+0x4f/0x80
> 08300b18:  [<08077837>] __wake_up+0x47/0x60
> 08300b3c:  [<081c4fc6>] cfq_close_cooperator+0x46/0x180
> 08300b58:  [<081c5440>] cfq_completed_request+0x2a0/0x560
> 08300b90:  [<081b7fce>] elv_completed_request+0x7e/0xf0
> 08300ba8:  [<081b98f6>] __blk_put_request+0x36/0xf0
> 08300bc0:  [<081b9b26>] blk_finish_request+0x176/0x1d0
> 08300be0:  [<081b9ea1>] blk_end_bidi_request+0x41/0x60
> 08300bf4:  [<08068e8d>] ubd_intr+0x2d/0xf0
> 08300c14:  [<080a6b32>] handle_IRQ_event+0x32/0xc0
> 08300c34:  [<080a6c1b>] __do_IRQ+0x5b/0xb0
> 08300c50:  [<0805b364>] do_IRQ+0x24/0x40
> 08300c5c:  [<0805b59b>] sigio_handler+0x5b/0x80
> 08300c70:  [<0806eec5>] sig_handler_common+0x55/0xa0
> 08300c80:  [<0806efb5>] real_alarm_handler+0x35/0x40
> 08300cbc:  [<080739f0>] __delay+0x20/0x30
> 08300ce8:  [<0806f063>] sig_handler+0x23/0x40
> 08300cf0:  [<0806f2bd>] handle_signal+0x5d/0xa0
> 08300d10:  [<080715f7>] hard_handler+0x17/0x20


--
Paolo Giarrusso - Ph.D. Student
http://www.informatik.uni-marburg.de/~pgiarrusso/

2010-06-14 12:54:49

by Toralf Förster

[permalink] [raw]
Subject: Re: [uml-devel] [PATCH] x86, hweight: Fix UML boot crash


Paolo Giarrusso wrote at 12:26:11
> Can you enable frame pointers to get an accurate stack trace? x86 can
Attached the .config with that function enabled, here's the output :
...
Initializing software serial port version 1
console [mc-1] enabled
ubda:
EIP: 0073:[<081bfec3>] CPU: 0 Not tainted ESP: 007b:082faaf0 EFLAGS: 00010297
Not tainted
EAX: 00000000 EBX: 180d5000 ECX: 00000001 EDX: 00000000
ESI: 181f8930 EDI: 181f4900 EBP: 082fab08 DS: 007b ES: 007b
082fa658: [<08075f5d>] show_regs+0xed/0x120
082fa674: [<0805e50e>] segv+0x25e/0x2b0
082fa72c: [<0805e5a1>] segv_handler+0x41/0x60
082fa74c: [<0806eb64>] sig_handler_common+0x54/0xa0
082fa7c8: [<0806ed07>] sig_handler+0x27/0x50
082fa7d8: [<0806ef5c>] handle_signal+0x5c/0xa0
082fa7fc: [<080712d8>] hard_handler+0x18/0x20
082fa80c: [<b77e1400>] 0xb77e1400
082fab0c: [<081c030a>] cfq_completed_request+0x27a/0x540
082fab50: [<081b32d6>] elv_completed_request+0x76/0xe0
082fab6c: [<081b4b60>] __blk_put_request+0x30/0xc0
082fab88: [<081b4d54>] blk_finish_request+0x164/0x1c0
082fabac: [<081b50d0>] blk_end_bidi_request+0x40/0x60
082fabc4: [<081b514b>] blk_end_request+0x1b/0x20
082fabd0: [<08068c2c>] ubd_intr+0x2c/0xf0
082fabf4: [<080a83b5>] handle_IRQ_event+0x35/0xd0
082fac14: [<080a84ad>] __do_IRQ+0x5d/0xb0
082fac34: [<0805b2c5>] do_IRQ+0x25/0x40
082fac44: [<0805b4fb>] sigio_handler+0x5b/0x80
082fac5c: [<0806eb64>] sig_handler_common+0x54/0xa0
082facd8: [<0806ed07>] sig_handler+0x27/0x50
082face8: [<0806ef5c>] handle_signal+0x5c/0xa0
082fad0c: [<080712d8>] hard_handler+0x18/0x20
082fad1c: [<b77e1400>] 0xb77e1400

Kernel panic - not syncing: Segfault with no mm
082fa640: [<08277d5b>] dump_stack+0x22/0x24
082fa658: [<08277dbe>] panic+0x61/0xdb
082fa674: [<0805e51a>] segv+0x26a/0x2b0
082fa72c: [<0805e5a1>] segv_handler+0x41/0x60
082fa74c: [<0806eb64>] sig_handler_common+0x54/0xa0
082fa7c8: [<0806ed07>] sig_handler+0x27/0x50
082fa7d8: [<0806ef5c>] handle_signal+0x5c/0xa0
082fa7fc: [<080712d8>] hard_handler+0x18/0x20
082fa80c: [<b77e1400>] 0xb77e1400
082fab0c: [<081c030a>] cfq_completed_request+0x27a/0x540
082fab50: [<081b32d6>] elv_completed_request+0x76/0xe0
082fab6c: [<081b4b60>] __blk_put_request+0x30/0xc0
082fab88: [<081b4d54>] blk_finish_request+0x164/0x1c0
082fabac: [<081b50d0>] blk_end_bidi_request+0x40/0x60
082fabc4: [<081b514b>] blk_end_request+0x1b/0x20
082fabd0: [<08068c2c>] ubd_intr+0x2c/0xf0
082fabf4: [<080a83b5>] handle_IRQ_event+0x35/0xd0
082fac14: [<080a84ad>] __do_IRQ+0x5d/0xb0
082fac34: [<0805b2c5>] do_IRQ+0x25/0x40
082fac44: [<0805b4fb>] sigio_handler+0x5b/0x80
082fac5c: [<0806eb64>] sig_handler_common+0x54/0xa0
082facd8: [<0806ed07>] sig_handler+0x27/0x50
082face8: [<0806ef5c>] handle_signal+0x5c/0xa0
082fad0c: [<080712d8>] hard_handler+0x18/0x20
082fad1c: [<b77e1400>] 0xb77e1400


EIP: 0000:[<00000000>] CPU: 0 Not tainted EFLAGS: 00000000
Not tainted
EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX: 00000000
ESI: 00000000 EDI: 00000000 EBP: 00000000 DS: 0000 ES: 0000
082fa5f4: [<08075f5d>] show_regs+0xed/0x120
082fa610: [<0805e7dc>] panic_exit+0x2c/0x50
082fa620: [<0809928e>] notifier_call_chain+0x3e/0x70
082fa648: [<08099313>] atomic_notifier_call_chain+0x23/0x30
082fa658: [<08277de6>] panic+0x89/0xdb
082fa674: [<0805e51a>] segv+0x26a/0x2b0
082fa72c: [<0805e5a1>] segv_handler+0x41/0x60
082fa74c: [<0806eb64>] sig_handler_common+0x54/0xa0
082fa7c8: [<0806ed07>] sig_handler+0x27/0x50
082fa7d8: [<0806ef5c>] handle_signal+0x5c/0xa0
082fa7fc: [<080712d8>] hard_handler+0x18/0x20
082fa80c: [<b77e1400>] 0xb77e1400
082fab0c: [<081c030a>] cfq_completed_request+0x27a/0x540
082fab50: [<081b32d6>] elv_completed_request+0x76/0xe0
082fab6c: [<081b4b60>] __blk_put_request+0x30/0xc0
082fab88: [<081b4d54>] blk_finish_request+0x164/0x1c0
082fabac: [<081b50d0>] blk_end_bidi_request+0x40/0x60
082fabc4: [<081b514b>] blk_end_request+0x1b/0x20
082fabd0: [<08068c2c>] ubd_intr+0x2c/0xf0
082fabf4: [<080a83b5>] handle_IRQ_event+0x35/0xd0
082fac14: [<080a84ad>] __do_IRQ+0x5d/0xb0
082fac34: [<0805b2c5>] do_IRQ+0x25/0x40
082fac44: [<0805b4fb>] sigio_handler+0x5b/0x80
082fac5c: [<0806eb64>] sig_handler_common+0x54/0xa0
082facd8: [<0806ed07>] sig_handler+0x27/0x50
082face8: [<0806ef5c>] handle_signal+0x5c/0xa0
082fad0c: [<080712d8>] hard_handler+0x18/0x20
082fad1c: [<b77e1400>] 0xb77e1400


> by people the patch works for. Say,
> $ grep HWEIGHT .config
tfoerste@n22 ~/devel/linux-2.6 $ grep HWEIGHT .config
CONFIG_GENERIC_HWEIGHT=y

--
MfG/Kind regards
Toralf Förster

pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3


Attachments:
.config (17.72 kB)

2010-06-14 13:00:31

by Borislav Petkov

[permalink] [raw]
Subject: Re: [PATCH] x86, hweight: Fix UML boot crash

From: Toralf F?rster <[email protected]>
Date: Mon, Jun 14, 2010 at 11:49:24AM +0200

> Borislav Petkov wrote at 16:10:58
> > Did you do 'make mrproper' before rebuilding UML with it?
>
> Today I started with a clean git tree (cloned Linus tree) and got this :

Right, I kinda missed that line, now it makes sense.

Linus' tree doesn't contain the fix yet - rather it is in -tip:
http://git.kernel.org/tip/055c47272b8f5679d08ccc57efea3cb4aaeb5fc6

You can easily cherry-pick it from there and retest.

Thanks.

--
Regards/Gruss,
Boris.

Operating Systems Research Center
Advanced Micro Devices, Inc.

2010-06-14 13:45:06

by Toralf Förster

[permalink] [raw]
Subject: Re: [PATCH] x86, hweight: Fix UML boot crash


Borislav Petkov wrote at 15:00:39

> Linus' tree doesn't contain the fix yet - rather it is in -tip:
> http://git.kernel.org/tip/055c47272b8f5679d08ccc57efea3cb4aaeb5fc6
>
> You can easily cherry-pick it from there and retest.
Issue solved works with that patch.

FWIW : This command sequence produced a linux executable which crashed too:

$> ~/devel/linux-2.6 $ patch -p1 < ../linux-2.6-
tip.git-055c47272b8f5679d08ccc57efea3cb4aaeb5fc6.patch patching file
arch/um/include/asm/arch_hweight.h

$> ~/devel/linux-2.6 $ make ARCH=um CC="ccache gcc"
make[1]: `arch/um/sys-i386/user-offsets.s' is up to date.
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
LINK linux
$> start_uml.sh
...

But after I compiled it w/o ccache

$> ~/devel/linux-2.6 $ make ARCH=um

linux executable works (!?!)

Anyway thx for the fix
:-)

--
MfG/Kind regards
Toralf F?rster

pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3

2010-06-14 14:39:04

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH] x86, hweight: Fix UML boot crash

2010/6/14 Toralf Förster <[email protected]>:
> Borislav Petkov wrote at 15:00:39
>
>> Linus' tree doesn't contain the fix yet - rather it is in -tip:
>> http://git.kernel.org/tip/055c47272b8f5679d08ccc57efea3cb4aaeb5fc6
>>
>> You can easily cherry-pick it from there and retest.
> Issue solved works with that patch.
>
> FWIW : This command sequence produced a linux executable which crashed too:
>
> $> ~/devel/linux-2.6 $ patch -p1 < ../linux-2.6-
> tip.git-055c47272b8f5679d08ccc57efea3cb4aaeb5fc6.patch patching file
> arch/um/include/asm/arch_hweight.h
>
> $> ~/devel/linux-2.6 $ make ARCH=um CC="ccache gcc"
> make[1]: `arch/um/sys-i386/user-offsets.s' is up to date.
>  CHK     include/linux/version.h
>  CHK     include/generated/utsrelease.h
>  CALL    scripts/checksyscalls.sh
>  CHK     include/generated/compile.h
>  LINK linux
> $> start_uml.sh
> ...
>
> But after I compiled it w/o ccache
>
> $> ~/devel/linux-2.6 $ make ARCH=um
>
> linux executable works (!?!)

I assume you did a `make clean' in between?
So could this just be the problem that new include files early in the
include path are
not detected by the dependency system, as they aren't in any *.d file?

BTW, I'm also using ccache. Always. Ever. All my (cross)compilers are symlinks
to ccache ;-)

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2010-06-14 15:11:33

by Toralf Förster

[permalink] [raw]
Subject: Re: [PATCH] x86, hweight: Fix UML boot crash


Geert Uytterhoeven wrote at 16:39:00
> I assume you did a `make clean' in between?
...
> BTW, I'm also using ccache. Always. Ever. All my (cross)compilers are
Well, I'm unsure - might be I made that mistake, especially b/c I use ccache
too since years and didn't experienced any fault so far.

--
MfG/Kind regards
Toralf Förster

pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3

2010-06-14 15:21:35

by H. Peter Anvin

[permalink] [raw]
Subject: Re: [PATCH] x86, hweight: Fix UML boot crash

On 06/14/2010 08:11 AM, Toralf Förster wrote:
>
> Geert Uytterhoeven wrote at 16:39:00
>> I assume you did a `make clean' in between?
> ...
>> BTW, I'm also using ccache. Always. Ever. All my (cross)compilers are
> Well, I'm unsure - might be I made that mistake, especially b/c I use ccache
> too since years and didn't experienced any fault so far.

I have certainly seen a number of cases where ccache doesn't pick up
sublte differences, for reasons unknown.

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.