Re: [GIT PULL] x86/vdso changes for v3.1

From: Arnaud Lacombe
Date: Thu Aug 25 2011 - 10:08:40 EST


Hi,

On Thu, Aug 25, 2011 at 7:51 AM, Andrew Lutomirski <luto@xxxxxxx> wrote:
> On Thu, Aug 25, 2011 at 1:58 AM, Arnaud Lacombe <lacombar@xxxxxxxxx> wrote:
>> Hi,
>>
>> On Fri, Jul 22, 2011 at 11:42 AM, Ingo Molnar <mingo@xxxxxxx> wrote:
>>> Linus,
>>>
>>> Please pull the latest x86-vdso-for-linus git tree from:
>>>
>>>   git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-vdso-for-linus
>>>
>>>
>>> out-of-topic modifications in x86-vdso-for-linus:
>>> -------------------------------------------------
>>> arch/ia64/Kconfig                  # ae7bd11: clocksource: Change __ARCH_HAS_CL
>>> arch/ia64/include/asm/clocksource.h# ae7bd11: clocksource: Change __ARCH_HAS_CL
>>>                                   # 574c44f: ia64: Replace clocksource.fsys_mm
>>> arch/ia64/kernel/cyclone.c         # 574c44f: ia64: Replace clocksource.fsys_mm
>>> arch/ia64/kernel/time.c            # 574c44f: ia64: Replace clocksource.fsys_mm
>>> arch/ia64/sn/kernel/sn2/timer.c    # 574c44f: ia64: Replace clocksource.fsys_mm
>>> drivers/char/hpet.c                # 574c44f: ia64: Replace clocksource.fsys_mm
>>> include/linux/clocksource.h        # ae7bd11: clocksource: Change __ARCH_HAS_CL
>>>                                   # 574c44f: ia64: Replace clocksource.fsys_mm
>>>                                   # 433bd80: clocksource: Replace vread with g
>>> include/linux/seccomp.h            # 5cec93c: x86-64: Emulate legacy vsyscalls
>>>
>>>  Thanks,
>>>
>>>        Ingo
>>>
>>> ------------------>
>>> Andy Lutomirski (17):
>>>      x86-64: Fix alignment of jiffies variable
>>>      x86-64: Document some of entry_64.S
>>>      x86-64: Give vvars their own page
>>>      x86-64: Remove kernel.vsyscall64 sysctl
>>>      x86-64: Map the HPET NX
>>>      x86-64: Remove vsyscall number 3 (venosys)
>>>      x86-64: Fill unused parts of the vsyscall page with 0xcc
>>>      x86-64: Emulate legacy vsyscalls
>>>      x86-64: Improve vsyscall emulation CS and RIP handling
>>>      x86: Make alternative instruction pointers relative
>>
>> Bisecting this BUG:
>>
>> CPU: Intel QEMU Virtual CPU version 0.13.0 stepping 03
>> BUG: unable to handle kernel paging request at 8277e54c
>> IP: [<c13765fb>] apply_alternatives+0xc3/0x18a
>> *pde = 00000000
>> Oops: 0000 [#1] DEBUG_PAGEALLOC
>>
>> Pid: 0, comm: swapper Not tainted 3.1.0-rc3 #20 Bochs Bochs
>> EIP: 0060:[<c13765fb>] EFLAGS: 00000286 CPU: 0
>> EIP is at apply_alternatives+0xc3/0x18a
>> EAX: ffffffff EBX: c13bee40 ECX: 00000005 EDX: 8277e54c
>> ESI: 8277e54c EDI: c1349e9e EBP: c1349fa8 ESP: c1349e70
>>  DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
>> Process swapper (pid: 0, ti=c1348000 task=c134e340 task.ti=c1348000)
>> Stack:
>>  00000002 c135d7c0 c11418a0 00000db8 c1349e9e 82655b12 00000005 8277e54c
>>  c13bf6ec c1349e05 05000086 f6890046 00f69000 c1349eb0 00000086 00000000
>>  00000046 c1349ec0 00000046 00000000 c1349edc c101f29c 00000dc5 00000000
>> Call Trace:
>>  [<c11418a0>] ? serial8250_start_tx+0xe0/0xe0
>>  [<c101f29c>] ? console_unlock+0x10c/0x150
>>  [<c10039c3>] ? do_IRQ+0x43/0xa0
>>  [<c12975a9>] ? common_interrupt+0x29/0x30
>>  [<c1294d59>] ? printk+0x18/0x1f
>>  [<c139070b>] ? print_cpu_info+0x93/0x11f
>>  [<c13766d9>] alternative_instructions+0x17/0x32
>>  [<c1377552>] check_bugs+0x91/0x93
>>  [<c13716b6>] start_kernel+0x289/0x294
>>  [<c13711b7>] ? loglevel+0x1a/0x1a
>>  [<c13710b3>] i386_start_kernel+0xb3/0xbb
>> Code: ec fe ff ff 8d 0c 0b 89 8d dc fe ff ff 8d 54 13 04 8b bd d8 fe
>> ff ff 89 95 e4 fe ff ff 89 b5 e0 fe ff ff 8b 8d e0 fe ff ff 89 d6 <f3>
>> a4 80 bd f6 fe ff ff e8 75 17 80 bd ec fe ff ff 05 75 0e 89
>> EIP: [<c13765fb>] apply_alternatives+0xc3/0x18a SS:ESP 0068:c1349e70
>> CR2: 000000008277e54c
>> ---[ end trace 4eaa2a86a8e2da22 ]---
>> Kernel panic - not syncing: Attempted to kill the idle task!
>> Pid: 0, comm: swapper Tainted: G      D     3.1.0-rc3 #20
>> Call Trace:
>>  [<c1294d59>] ? printk+0x18/0x1f
>>  [<c1294c4a>] panic+0x57/0x14e
>>  [<c10221a1>] do_exit+0x201/0x290
>>  [<c1004ace>] oops_end+0x6e/0x90
>>  [<c1294d59>] ? printk+0x18/0x1f
>>  [<c1013efc>] no_context+0xbc/0x150
>>  [<c1013fc0>] __bad_area_nosemaphore+0x30/0x170
>>  [<c1014450>] ? vmalloc_sync_all+0xf0/0xf0
>>  [<c1014112>] bad_area_nosemaphore+0x12/0x20
>>  [<c101466f>] do_page_fault+0x21f/0x360
>>  [<c105c070>] ? get_page_from_freelist+0x110/0x300
>>  [<c1023b24>] ? irq_exit+0x54/0x90
>>  [<c10039c3>] ? do_IRQ+0x43/0xa0
>>  [<c1140e31>] ? wait_for_xmitr+0x31/0x90
>>  [<c1014450>] ? vmalloc_sync_all+0xf0/0xf0
>>  [<c1296df8>] error_code+0x58/0x60
>>  [<c1014450>] ? vmalloc_sync_all+0xf0/0xf0
>>  [<c13765fb>] ? apply_alternatives+0xc3/0x18a
>>  [<c11418a0>] ? serial8250_start_tx+0xe0/0xe0
>>  [<c101f29c>] ? console_unlock+0x10c/0x150
>>  [<c10039c3>] ? do_IRQ+0x43/0xa0
>>  [<c12975a9>] ? common_interrupt+0x29/0x30
>>  [<c1294d59>] ? printk+0x18/0x1f
>>  [<c139070b>] ? print_cpu_info+0x93/0x11f
>>  [<c13766d9>] alternative_instructions+0x17/0x32
>>  [<c1377552>] check_bugs+0x91/0x93
>>  [<c13716b6>] start_kernel+0x289/0x294
>>  [<c13711b7>] ? loglevel+0x1a/0x1a
>>  [<c13710b3>] i386_start_kernel+0xb3/0xbb
>> QEMU: Terminated
>>
>> lead me to that commit:
>>
>> commit 59e97e4d6fbcd5b74a94cb48bcbfc6f8478a5e93
>> Author: Andy Lutomirski <luto@xxxxxxx>
>> Date:   Wed Jul 13 09:24:10 2011 -0400
>>
>>    x86: Make alternative instruction pointers relative
>>
>>    This save a few bytes on x86-64 and means that future patches can
>>    apply alternatives to unrelocated code.
>>
>>    Signed-off-by: Andy Lutomirski <luto@xxxxxxx>
>>    Link: http://lkml.kernel.org/r/ff64a6b9a1a3860ca4a7b8b6dc7b4754f9491cd7.1310563276.git.luto@xxxxxxx
>>    Signed-off-by: H. Peter Anvin <hpa@xxxxxxxxxxxxxxx>
>>
>
> I probably missed a hardcoded alternative entry that depends on
> config.  Can you send me your System.map and the output of objdump -s
> -j .altinstructions vmlinux?
>
see attached.

> I'm also having issues building from your .config.  Building
> 59e97e4d6fbcd5b74a94cb48bcbfc6f8478a5e93 asks me about Moorestown MID
> platform, Ethernet, etc.
>
yes, the config is against -rc3. An `oldnoconfig' should do the job
before the build.

- Arnaud

> --Andy
>

obj/next-bisect/vmlinux: file format elf32-i386

Contents of section .altinstructions:
c13bedc8 5e26c4ff 20090000 1a000503 3b28c4ff ^&.. .......;(..
c13bedd8 00000000 9a000200 3e28c4ff 0b090000 ........>(......
c13bede8 e4000303 4a28c4ff 02090000 6a000a08 ....J(......j...
c13bedf8 7028c4ff 00000000 18000200 502ac4ff p(..........P*..
c13bee08 00000000 9a000500 562ac4ff e6080000 ........V*......
c13bee18 e4000303 662ac4ff dd080000 6a000a08 ....f*......j...
c13bee28 8b2ac4ff d9080000 19000403 3c2bc4ff .*..........<+..
c13bee38 00000000 18000200 d26c29c1 08f73bc1 .........l)...;.
c13bee48 19000505 0f46c4ff 00000000 9a000500 .....F..........
c13bee58 1546c4ff b1080000 e4000303 1447c4ff .F...........G..
c13bee68 00000000 18000200 2347c4ff 9c080000 ........#G......
c13bee78 6a000a08 6f48c4ff 00000000 9a000200 j...oH..........
c13bee88 9e48c4ff 8c080000 18000303 8f53c4ff .H...........S..
c13bee98 83080000 19000503 8e53c4ff 7a080000 .........S..z...
c13beea8 19000503 499cc4ff 00000000 e4000200 ....I...........
c13beeb8 959dc4ff 00000000 9a000500 9b9dc4ff ................
c13beec8 59080000 e4000303 ab9dc4ff 50080000 Y...........P...
c13beed8 6a000a08 0c9ec4ff 00000000 18000200 j...............
c13beee8 e39ec4ff 00000000 e4000200 819fc4ff ................
c13beef8 00000000 e4000200 b0a2c4ff 00000000 ................
c13bef08 e4000200 32a3c4ff 00000000 e4000200 ....2...........
c13bef18 aca4c4ff 00000000 9a000500 b2a4c4ff ................
c13bef28 04080000 e4000303 c2a4c4ff fb070000 ................
c13bef38 6a000a08 38a5c4ff 00000000 18000200 j...8...........
c13bef48 d684fbff 00000000 9a000500 da84fbff ................
c13bef58 df070000 e4000303 f384fbff d6070000 ................
c13bef68 6a000a08 4785fbff 00000000 18000200 j...G...........
c13bef78 32cec4ff c6070000 08000505 53cec4ff 2...........S...
c13bef88 bf070000 08000504 98cec4ff b7070000 ................
c13bef98 08000505 9bcec4ff b0070000 08000505 ................
c13befa8 f5cec4ff a9070000 08000505 20ddc4ff ............ ...
c13befb8 a2070000 d7000202 28ddc4ff 98070000 ........(.......
c13befc8 d7000202 a6ddc4ff 8e070000 d7000202 ................
c13befd8 23dec4ff 84070000 d7000202 30dec4ff #...........0...
c13befe8 7a070000 d7000202 33e6c4ff 70070000 z.......3...p...
c13beff8 08000505 eae6c4ff 69070000 08000505 ........i.......
c13bf008 28e7c4ff 62070000 08000505 dae7c4ff (...b...........
c13bf018 5b070000 08000505 02ecc4ff 54070000 [...........T...
c13bf028 d7000202 08ecc4ff 4a070000 d7000202 ........J.......
c13bf038 35eec4ff 40070000 d7000202 43eec4ff 5...@.......C...
c13bf048 36070000 d7000202 d2efc4ff 2c070000 6...........,...
c13bf058 97000504 f60ac5ff 24070000 d7000202 ........$.......
c13bf068 020bc5ff 1a070000 d7000202 1654c5ff .............T..
c13bf078 10070000 3f000403 575ec5ff 07070000 ....?...W^......
c13bf088 1a000503 675ec5ff fe060000 1a000503 ....g^..........
c13bf098 dcc6c7ff f5060000 08000504 e2c8c7ff ................
c13bf0a8 ed060000 08000504 d53fc8ff e5060000 .........?......
c13bf0b8 97000504 7ad6c8ff dd060000 19000403 ....z...........
c13bf0c8 2de2c8ff d4060000 08000505 37e2c8ff -...........7...
c13bf0d8 cd060000 08000505 aae5c8ff c6060000 ................
c13bf0e8 08000505 b4e5c8ff bf060000 08000505 ................
c13bf0f8 10e6c8ff b8060000 08000505 c3e6c8ff ................
c13bf108 b1060000 08000505 dee6c8ff aa060000 ................
c13bf118 08000505 79e7c8ff a3060000 08000505 ....y...........
c13bf128 cae7c8ff 9c060000 08000505 8fe8c8ff ................
c13bf138 95060000 08000505 a4eac8ff 8e060000 ................
c13bf148 08000505 2debc8ff 87060000 08000504 ....-...........
c13bf158 70f0c8ff 7f060000 08000505 83f0c8ff p...............
c13bf168 78060000 08000505 80f9c8ff 71060000 x...........q...
c13bf178 08000505 84f9c8ff 6a060000 08000505 ........j.......
c13bf188 08fcc8ff 63060000 08000505 10fcc8ff ....c...........
c13bf198 5c060000 08000505 fafcc8ff 55060000 \...........U...
c13bf1a8 08000505 02fdc8ff 4e060000 08000505 ........N.......
c13bf1b8 f5fdc8ff 47060000 08000505 f9fdc8ff ....G...........
c13bf1c8 40060000 08000505 14fec8ff 39060000 @...........9...
c13bf1d8 08000505 2cfec8ff 32060000 08000505 ....,...2.......
c13bf1e8 1f13c9ff 2b060000 08000505 7c13c9ff ....+.......|...
c13bf1f8 24060000 08000505 8818c9ff 1d060000 $...............
c13bf208 08000505 8a18c9ff 16060000 08000505 ................
c13bf218 b618c9ff 0f060000 08000505 d418c9ff ................
c13bf228 08060000 08000505 0e19c9ff 01060000 ................
c13bf238 08000505 5319c9ff fa050000 08000505 ....S...........
c13bf248 a219c9ff f3050000 08000505 a219c9ff ................
c13bf258 ec050000 08000505 a219c9ff e5050000 ................
c13bf268 08000505 b520c9ff de050000 08000505 ..... ..........
c13bf278 b720c9ff d7050000 08000505 b920c9ff . ........... ..
c13bf288 d0050000 08000505 be20c9ff c9050000 ......... ......
c13bf298 08000505 c320c9ff c2050000 08000505 ..... ..........
c13bf2a8 d62cc9ff bb050000 08000505 a03cc9ff .,...........<..
c13bf2b8 b4050000 08000505 c13cc9ff ad050000 .........<......
c13bf2c8 08000505 af46c9ff a6050000 08000505 .....F..........
c13bf2d8 3c47c9ff 9f050000 08000505 484ac9ff <G..........HJ..
c13bf2e8 98050000 08000505 f3f9fbff 91050000 ................
c13bf2f8 97000504 af33fdff 89050000 3f000403 .....3......?...
c13bf308 b433fdff 80050000 3f000403 c119caff .3......?.......
c13bf318 77050000 3f000403 d71fcaff 6e050000 w...?.......n...
c13bf328 3f000403 9c6acaff 65050000 19000403 ?....j..e.......
c13bf338 ba6acaff 5c050000 19000403 e30bccff .j..\...........
c13bf348 53050000 19000503 a9c0ccff 4a050000 S...........J...
c13bf358 19000403 1bc3ccff 41050000 19000403 ........A.......
c13bf368 dadbccff 38050000 19000403 55fbccff ....8.......U...
c13bf378 2f050000 3f000403 4e6aceff 26050000 /...?...Nj..&...
c13bf388 3f000403 b96fceff 1d050000 3f000403 ?....o......?...
c13bf398 3ee0d4ff 14050000 71000303 35e0d4ff >.......q...5...
c13bf3a8 0b050000 72000303 3ae0d4ff 02050000 ....r...:.......
c13bf3b8 71000303 31e0d4ff f9040000 72000303 q...1.......r...
c13bf3c8 0614d5ff f0040000 97000504 2e14d5ff ................
c13bf3d8 e8040000 97000504 fd12d7ff e0040000 ................
c13bf3e8 19000503 6d14d7ff d7040000 1a000503 ....m...........
c13bf3f8 e414d7ff ce040000 1a000503 1303d9ff ................
c13bf408 c5040000 19000503 25f6d9ff bc040000 ........%.......
c13bf418 1a000503 9fd3dbff b3040000 1a000503 ................
c13bf428 d77adcff aa040000 19000503 7d80dcff .z..........}...
c13bf438 a1040000 19000403 7581dcff 98040000 ........u.......
c13bf448 1a000503 2386dcff 8f040000 1a000503 ....#...........
c13bf458 3186dcff 86040000 19000403 4f86dcff 1...........O...
c13bf468 7d040000 19000403 da8adcff 74040000 }...........t...
c13bf478 19000503 528edcff 6b040000 19000503 ....R...k.......
c13bf488 38a3dcff 62040000 1a000503 df48deff 8...b........H..
c13bf498 59040000 19000503 cb49deff 50040000 Y........I..P...
c13bf4a8 19000503 2c64deff 47040000 19000503 ....,d..G.......
c13bf4b8 4c65deff 3e040000 1a000503 5c65deff Le..>.......\e..
c13bf4c8 35040000 19000403 7665deff 2c040000 5.......ve..,...
c13bf4d8 19000403 a268deff 23040000 19000503 .....h..#.......
c13bf4e8 c86bdeff 1a040000 19000503 636cdeff .k..........cl..
c13bf4f8 11040000 19000403 526ddeff 08040000 ........Rm......
c13bf508 1a000503 8f70deff ff030000 1a000503 .....p..........
c13bf518 8e70deff f6030000 19000403 b570deff .p...........p..
c13bf528 ed030000 19000403 3076deff e4030000 ........0v......
c13bf538 1a000503 a411dfff db030000 1a000503 ................
c13bf548 6122dfff d2030000 19000503 563ddfff a"..........V=..
c13bf558 c9030000 19000503 fb46dfff c0030000 .........F......
c13bf568 1a000503 fc46dfff b7030000 19000403 .....F..........
c13bf578 2047dfff ae030000 19000403 4b00e0ff G..........K...
c13bf588 a5030000 19000503 9003e0ff 9c030000 ................
c13bf598 1a000503 9d07e0ff 93030000 19000503 ................
c13bf5a8 f70de0ff 8a030000 19000403 4e0ee0ff ............N...
c13bf5b8 81030000 1a000503 880ee0ff 78030000 ............x...
c13bf5c8 19000403 0731e0ff 6f030000 19000503 .....1..o.......
c13bf5d8 3b63e0ff 66030000 1a000503 e56be0ff ;c..f........k..
c13bf5e8 5d030000 19000503 dc6ee0ff 54030000 ]........n..T...
c13bf5f8 19000403 726fe0ff 4b030000 1a000503 ....ro..K.......
c13bf608 856fe0ff 42030000 19000403 2594e1ff .o..B.......%...
c13bf618 39030000 19000503 0d9ae1ff 30030000 9...........0...
c13bf628 19000503 f29ae1ff 27030000 1a000503 ........'.......
c13bf638 009be1ff 1e030000 19000403 3b9be1ff ............;...
c13bf648 15030000 19000403 4c9be1ff 0c030000 ........L.......
c13bf658 19000403 04a3e1ff 03030000 1a000503 ................
c13bf668 e442e2ff fa020000 1a000503 7555e2ff .B..........uU..
c13bf678 f1020000 1a000503 8749e3ff e8020000 .........I......
c13bf688 3f000403 ab49e3ff df020000 3f000403 ?....I......?...
c13bf698 ba33e4ff d6020000 97000504 b733e4ff .3...........3..
c13bf6a8 ce020000 97000504 225ce4ff c6020000 ........"\......
c13bf6b8 19000403 352ee5ff bd020000 97000504 ....5...........
c13bf6c8 3b2ee5ff b5020000 97000504 a997e8ff ;...............
c13bf6d8 ad020000 19000403 e793ecff a4020000 ................
c13bf6e8 1a000503 ....