Re: [PATCH v2] Remove custom dumb_map_offset implementations in i915 driver

From: kernel test robot
Date: Mon Nov 13 2023 - 02:26:21 EST




Hello,

kernel test robot noticed "BUG:unable_to_handle_page_fault_for_address" on:

commit: a09fc21ac1126b7a5542d2653aa2c319d3bbf5f4 ("[PATCH v2] Remove custom dumb_map_offset implementations in i915 driver")
url: https://github.com/intel-lab-lkp/linux/commits/Dipam-Turkar/Remove-custom-dumb_map_offset-implementations-in-i915-driver/20231111-024912
base: git://anongit.freedesktop.org/drm-intel for-linux-next
patch link: https://lore.kernel.org/all/20231110184126.712310-1-dipamt1729@xxxxxxxxx/
patch subject: [PATCH v2] Remove custom dumb_map_offset implementations in i915 driver

in testcase: phoronix-test-suite
version:
with following parameters:

need_x: true
test: x11perf-1.1.1
option_a: 500px PutImage Square
cpufreq_governor: performance



compiler: gcc-12
test machine: 12 threads 1 sockets Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz (Coffee Lake) with 32G memory

(please refer to attached dmesg/kmsg for entire log/backtrace)



If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <oliver.sang@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-lkp/202311131508.7fc7540b-oliver.sang@xxxxxxxxx


[ 53.192823][ T1574] BUG: unable to handle page fault for address: 0000000000040000
[ 53.200433][ T1574] #PF: supervisor read access in kernel mode
[ 53.206290][ T1574] #PF: error_code(0x0000) - not-present page
[ 53.212150][ T1574] PGD 0 P4D 0
[ 53.215393][ T1574] Oops: 0000 [#1] SMP PTI
[ 53.219598][ T1574] CPU: 0 PID: 1574 Comm: Xorg Tainted: G S 6.6.0-rc7-01630-ga09fc21ac112 #1
[ 53.229545][ T1574] Hardware name: Dell Inc. OptiPlex 7060/0C96W1, BIOS 1.4.2 06/11/2019
[ 53.237674][ T1574] RIP: 0010:i915_gem_mmap (arch/x86/include/asm/atomic.h:23 include/linux/atomic/atomic-arch-fallback.h:444 include/linux/atomic/atomic-instrumented.h:33 include/linux/refcount.h:147 include/linux/refcount.h:152 include/linux/refcount.h:227 include/linux/refcount.h:245 include/linux/kref.h:111 drivers/gpu/drm/i915/gem/i915_gem_object.h:109 drivers/gpu/drm/i915/gem/i915_gem_mman.c:1027) i915
[ 53.239774][ T633] perf: 'sched' is not a perf-command. See 'perf --help'.
[ 53.243647][ T1574] Code: 00 85 d2 78 46 85 c9 78 42 31 f6 eb 85 48 83 fb 01 19 c0 83 e0 f7 83 e8 0d e9 f5 fe ff ff 48 8b bb c0 00 00 00 48 85 ff 74 59 <8b> 17 85 d2 74 53 8d 4a 01 89 d0 f0 0f b1 0f 75 59 85 d2 78 22 85
All code
========
0: 00 85 d2 78 46 85 add %al,-0x7ab9872e(%rbp)
6: c9 leaveq
7: 78 42 js 0x4b
9: 31 f6 xor %esi,%esi
b: eb 85 jmp 0xffffffffffffff92
d: 48 83 fb 01 cmp $0x1,%rbx
11: 19 c0 sbb %eax,%eax
13: 83 e0 f7 and $0xfffffff7,%eax
16: 83 e8 0d sub $0xd,%eax
19: e9 f5 fe ff ff jmpq 0xffffffffffffff13
1e: 48 8b bb c0 00 00 00 mov 0xc0(%rbx),%rdi
25: 48 85 ff test %rdi,%rdi
28: 74 59 je 0x83
2a:* 8b 17 mov (%rdi),%edx <-- trapping instruction
2c: 85 d2 test %edx,%edx
2e: 74 53 je 0x83
30: 8d 4a 01 lea 0x1(%rdx),%ecx
33: 89 d0 mov %edx,%eax
35: f0 0f b1 0f lock cmpxchg %ecx,(%rdi)
39: 75 59 jne 0x94
3b: 85 d2 test %edx,%edx
3d: 78 22 js 0x61
3f: 85 .byte 0x85

Code starting with the faulting instruction
===========================================
0: 8b 17 mov (%rdi),%edx
2: 85 d2 test %edx,%edx
4: 74 53 je 0x59
6: 8d 4a 01 lea 0x1(%rdx),%ecx
9: 89 d0 mov %edx,%eax
b: f0 0f b1 0f lock cmpxchg %ecx,(%rdi)
f: 75 59 jne 0x6a
11: 85 d2 test %edx,%edx
13: 78 22 js 0x37
15: 85 .byte 0x85
[ 53.243649][ T1574] RSP: 0018:ffffc90002117d10 EFLAGS: 00010206
[ 53.243650][ T1574] RAX: 0000000000000001 RBX: ffff88810452de98 RCX: 0000000000100000
[ 53.243651][ T1574] RDX: 0000000000000001 RSI: ffff888877be0000 RDI: 0000000000040000
[ 53.243652][ T1574] RBP: ffff888169b452e0 R08: ffffc90002117cf0 R09: 0000000000000000
[ 53.243653][ T1574] R10: ffff888108e0fe0c R11: 0000000000000008 R12: ffff8888745e0000
[ 53.243653][ T1574] R13: ffff888877be0000 R14: 0000000000100000 R15: ffff888169b452e0
[ 53.243654][ T1574] FS: 00007f200cf59f00(0000) GS:ffff888853600000(0000) knlGS:0000000000000000
[ 53.250665][ T633]
[ 53.270183][ T1574] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 53.270184][ T1574] CR2: 0000000000040000 CR3: 0000000107052002 CR4: 00000000003706f0
[ 53.270185][ T1574] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 53.270186][ T1574] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 53.270187][ T1574] Call Trace:
[ 53.270189][ T1574] <TASK>
[ 53.270191][ T1574] ? __die (arch/x86/kernel/dumpstack.c:421 arch/x86/kernel/dumpstack.c:434)
[ 53.276433][ T633] Events disabled
[ 53.284111][ T1574] ? page_fault_oops (arch/x86/mm/fault.c:707)
[ 53.284114][ T1574] ? exc_page_fault (arch/x86/include/asm/irqflags.h:37 arch/x86/include/asm/irqflags.h:72 arch/x86/mm/fault.c:1513 arch/x86/mm/fault.c:1561)
[ 53.284117][ T1574] ? asm_exc_page_fault (arch/x86/include/asm/idtentry.h:570)
[ 53.284120][ T1574] ? i915_gem_mmap (arch/x86/include/asm/atomic.h:23 include/linux/atomic/atomic-arch-fallback.h:444 include/linux/atomic/atomic-instrumented.h:33 include/linux/refcount.h:147 include/linux/refcount.h:152 include/linux/refcount.h:227 include/linux/refcount.h:245 include/linux/kref.h:111 drivers/gpu/drm/i915/gem/i915_gem_object.h:109 drivers/gpu/drm/i915/gem/i915_gem_mman.c:1027) i915
[ 53.291999][ T633]
[ 53.299843][ T1574] mmap_region (include/linux/fs.h:1961 mm/mmap.c:2754)
[ 53.299847][ T1574] do_mmap (mm/mmap.c:1354)
[ 53.299848][ T1574] ? apparmor_mmap_file (arch/x86/include/asm/current.h:41 security/apparmor/include/cred.h:76 security/apparmor/include/cred.h:109 security/apparmor/lsm.c:511 security/apparmor/lsm.c:556 security/apparmor/lsm.c:537 security/apparmor/lsm.c:562)
[ 53.299851][ T1574] vm_mmap_pgoff (mm/util.c:546)
[ 53.409245][ T1574] ksys_mmap_pgoff (mm/mmap.c:1400)
[ 53.413900][ T1574] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
[ 53.418192][ T1574] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:120)
[ 53.423962][ T1574] RIP: 0033:0x7f200d4b40b2
[ 53.428264][ T1574] Code: 0f 1f 84 00 00 00 00 00 41 f7 c1 ff 0f 00 00 75 27 55 48 89 fd 53 89 cb 48 85 ff 74 3b 41 89 da 48 89 ef b8 09 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 66 5b 5d c3 0f 1f 00 48 8b 05 a9 3d 0c 00 64
All code
========
0: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1)
7: 00
8: 41 f7 c1 ff 0f 00 00 test $0xfff,%r9d
f: 75 27 jne 0x38
11: 55 push %rbp
12: 48 89 fd mov %rdi,%rbp
15: 53 push %rbx
16: 89 cb mov %ecx,%ebx
18: 48 85 ff test %rdi,%rdi
1b: 74 3b je 0x58
1d: 41 89 da mov %ebx,%r10d
20: 48 89 ef mov %rbp,%rdi
23: b8 09 00 00 00 mov $0x9,%eax
28: 0f 05 syscall
2a:* 48 3d 00 f0 ff ff cmp $0xfffffffffffff000,%rax <-- trapping instruction
30: 77 66 ja 0x98
32: 5b pop %rbx
33: 5d pop %rbp
34: c3 retq
35: 0f 1f 00 nopl (%rax)
38: 48 8b 05 a9 3d 0c 00 mov 0xc3da9(%rip),%rax # 0xc3de8
3f: 64 fs

Code starting with the faulting instruction
===========================================
0: 48 3d 00 f0 ff ff cmp $0xfffffffffffff000,%rax
6: 77 66 ja 0x6e
8: 5b pop %rbx
9: 5d pop %rbp
a: c3 retq
b: 0f 1f 00 nopl (%rax)
e: 48 8b 05 a9 3d 0c 00 mov 0xc3da9(%rip),%rax # 0xc3dbe
15: 64 fs


The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20231113/202311131508.7fc7540b-oliver.sang@xxxxxxxxx



--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki