Skip to content

Unable to handle page fault with program redis #30

@easonycliu

Description

@easonycliu

I first tested UKL with the program hello and every thing worked well. Then I tried to test with redis but failed because there is a page fault after launching the redis.

[   10.860705] In PID 1 and in_user is 1
[   10.860705] Going to create UKL here.
[   10.861700] Run /init as init process
[   10.862389] BUG: unable to handle page fault for address: ffffffff5277897c
[   10.863212] #PF: supervisor read access in user mode
[   10.863910] #PF: error_code(0x0000) - not-present page
[   10.864621] IDT: 0xfffffe0000000000 (limit=0xfff) GDT: 0xfffffe0000001000 (limit=0x7f)
[   10.865651] LDTR: NULL
[   10.865973] TR: 0x40 -- base=0xfffffe0000003000 limit=0x4087
[   10.866719] PGD 2a11067 P4D 2a11067 PUD 0 
[   10.867435] Oops: 0000 [#1] SMP
[   10.867864] CPU: 0 PID: 1 Comm: UKL Not tainted 5.14.0-rc7 #4
[   10.868519] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
[   10.869890] RIP: 00c3:ukl___strlen_avx2+0x1d/0x180
[   10.870438] Code: Unable to access opcode bytes at RIP 0xffffffff81e46393.
[   10.871252] RSP: 0018:00007fff1ac690e8 EFLAGS: 00010287
[   10.871824] RAX: 000000000000097c RBX: ffffffff5277897c RCX: 0000000000000000
[   10.872740] RDX: ffffffff5277897c RSI: ffffffff8285cd50 RDI: ffffffff5277897c
[   10.873654] RBP: ffffffff52778973 R08: 00007fff1ac69148 R09: 0000000000000030
[   10.874545] R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff83317440
[   10.875394] R13: ffffffff8285cd74 R14: 0000000083280e41 R15: 0000000000000000
[   10.876328] FS:  0000000002200000 GS:  0000000000000000
[   10.876905] CR2: ffffffff5277897c
[   10.877440] ---[ end trace f74d7d8c4bb605ed ]---
[   10.878116] RIP: 00c3:ukl___strlen_avx2+0x1d/0x180
[   10.878667] RSP: 0018:00007fff1ac690e8 EFLAGS: 00010287
[   10.879374] RAX: 000000000000097c RBX: ffffffff5277897c RCX: 0000000000000000
[   10.880211] RDX: ffffffff5277897c RSI: ffffffff8285cd50 RDI: ffffffff5277897c
[   10.881154] RBP: ffffffff52778973 R08: 00007fff1ac69148 R09: 0000000000000030
[   10.882014] R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff83317440
[   10.882921] R13: ffffffff8285cd74 R14: 0000000083280e41 R15: 0000000000000000
[   10.883719] FS:  0000000002200000(0000) GS:ffff88813bc00000(0000) knlGS:0000000000000000
[   10.884597] CS:  00c3 DS: 0000 ES: 0000 CR0: 0000000080050033
[   10.885389] CR2: ffffffff5277897c CR3: 0000000002a0f001 CR4: 0000000000070ef0
[   10.886287] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   10.887250] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[   10.888252] UKL exiting

My gcc version is 9.4.0 and I added -no-pie when compiling redis.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions