[linus:master] [eventfs] 852e46e239: BUG:unable_to_handle_page_fault_for_address

kernel test robot
2024-01-29T02:59:11Z

Hello,

kernel test robot noticed "BUG:unable_to_handle_page_fault_for_address" on:

commit: 852e46e239ee6db3cd220614cf8bce96e79227c2 ("eventfs: Do not create dentries nor inodes in iterate_shared")
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master

[test failed on linus/master 7ed2632ec7d72e926b9e8bcc9ad1bb0cd37274bf]
[test failed on linux-next/master 774551425799cb5bbac94e1768fd69eec4f78dd4]

in testcase: stress-ng
version: stress-ng-x86_64-1744999cb-1_20240112
with following parameters:

nr_threads: 10%
disk: 1HDD
testtime: 60s
fs: xfs
class: filesystem
test: getdent
cpufreq_governor: performance

compiler: gcc-12
test machine: 64 threads 2 sockets Intel(R) Xeon(R) Gold 6346 CPU @ 3.10GHz (Ice Lake) with 256G 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@intel.com>
| Closes: https://lore.kernel.org/oe-lkp/202401291043.e62e89dc-oliver.sang@intel.com

[ 52.318955][ T4398] BUG: unable to handle page fault for address: 0000042c000004db
[ 52.326780][ T4398] #PF: supervisor read access in kernel mode
[ 52.332830][ T4398] #PF: error_code(0x0000) - not-present page
[ 52.338864][ T4398] PGD 186970067 P4D 0
[ 52.342993][ T4398] Oops: 0000 [#1] SMP NOPTI
[ 52.347552][ T4398] CPU: 32 PID: 4398 Comm: stress-ng-getde Not tainted 6.7.0-rc2-00049-g852e46e239ee #1
[ 52.357235][ T4398] Hardware name: Inspur NF5180M6/NF5180M6, BIOS 06.00.04 04/12/2022
[ 52.365278][ T4398] RIP: 0010:set_top_events_ownership (fs/tracefs/event_inode.c:172 (discriminator 1))
[ 52.371424][ T4398] Code: 00 00 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 44 00 00 48 8b 47 f8 48 85 c0 74 11 <f6> 40 78 02 74 0b 8b 50 50 f7 c2 00 00 08 00 75 05 c3 cc cc cc cc
All code
========
0: 00 00 add %al,(%rax)
2: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
9: 00 00 00
c: 90 nop
d: 90 nop
e: 90 nop
f: 90 nop
10: 90 nop
11: 90 nop
12: 90 nop
13: 90 nop
14: 90 nop
15: 90 nop
16: 90 nop
17: 90 nop
18: 90 nop
19: 90 nop
1a: 90 nop
1b: 90 nop
1c: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
21: 48 8b 47 f8 mov -0x8(%rdi),%rax
25: 48 85 c0 test %rax,%rax
28: 74 11 je 0x3b
2a:* f6 40 78 02 testb $0x2,0x78(%rax) <-- trapping instruction
2e: 74 0b je 0x3b
30: 8b 50 50 mov 0x50(%rax),%edx
33: f7 c2 00 00 08 00 test $0x80000,%edx
39: 75 05 jne 0x40
3b: c3 retq
3c: cc int3
3d: cc int3
3e: cc int3
3f: cc int3

Code starting with the faulting instruction
===========================================
0: f6 40 78 02 testb $0x2,0x78(%rax)
4: 74 0b je 0x11
6: 8b 50 50 mov 0x50(%rax),%edx
9: f7 c2 00 00 08 00 test $0x80000,%edx
f: 75 05 jne 0x16
11: c3 retq
12: cc int3
13: cc int3
14: cc int3
15: cc int3
[ 52.391324][ T4398] RSP: 0018:ffa000000f2efc90 EFLAGS: 00010206
[ 52.397481][ T4398] RAX: 0000042c00000463 RBX: ff110002452ae2c8 RCX: 0000000000004000
[ 52.405547][ T4398] RDX: 0000000000000024 RSI: ff110002452ae2c8 RDI: ff110002452ae2c8
[ 52.413616][ T4398] RBP: ffffffff83080320 R08: 0000000000000064 R09: ff1100018a25dd40
[ 52.421686][ T4398] R10: ffffffffffff8c98 R11: 0000000000000000 R12: 0000000000000024
[ 52.429755][ T4398] R13: ffffffff83080320 R14: ffa000000f2efedc R15: 0000000000018000
[ 52.437828][ T4398] FS: 00007f3b60e3d740(0000) GS:ff11001fffe00000(0000) knlGS:0000000000000000
[ 52.446854][ T4398] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 52.453547][ T4398] CR2: 0000042c000004db CR3: 0000000113750004 CR4: 0000000000771ef0
[ 52.461629][ T4398] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 52.469707][ T4398] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 52.477783][ T4398] PKRU: 55555554
[ 52.481444][ T4398] Call Trace:
[ 52.484848][ T4398] <TASK>
[ 52.487894][ T4398] ? __die (arch/x86/kernel/dumpstack.c:421 arch/x86/kernel/dumpstack.c:434)
[ 52.491898][ T4398] ? page_fault_oops (arch/x86/mm/fault.c:707)
[ 52.496854][ T4398] ? 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)
[ 52.501725][ T4398] ? asm_exc_page_fault (arch/x86/include/asm/idtentry.h:570)
[ 52.506858][ T4398] ? set_top_events_ownership (fs/tracefs/event_inode.c:172 (discriminator 1))
[ 52.512425][ T4398] eventfs_permission (fs/tracefs/event_inode.c:203)
[ 52.517390][ T4398] inode_permission (fs/namei.c:462 fs/namei.c:529 fs/namei.c:504)
[ 52.522271][ T4398] may_open (fs/namei.c:3250)
[ 52.526453][ T4398] do_open (fs/namei.c:3621)
[ 52.530540][ T4398] ? open_last_lookups (fs/namei.c:3569)
[ 52.535670][ T4398] path_openat (fs/namei.c:3780)
[ 52.540187][ T4398] do_filp_open (fs/namei.c:3809)
[ 52.544696][ T4398] do_sys_openat2 (fs/open.c:1440)
[ 52.549285][ T4398] __x64_sys_openat (fs/open.c:1466)
[ 52.554044][ T4398] do_syscall_64 (arch/x86/entry/common.c:51 arch/x86/entry/common.c:82)
[ 52.558541][ T4398] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:129)
[ 52.564509][ T4398] RIP: 0033:0x7f3b60fcb127
[ 52.568991][ T4398] Code: 25 00 00 41 00 3d 00 00 41 00 74 47 64 8b 04 25 18 00 00 00 85 c0 75 6b 44 89 e2 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 0f 87 95 00 00 00 48 8b 4c 24 28 64 48 2b 0c 25
All code
========
0: 25 00 00 41 00 and $0x410000,%eax
5: 3d 00 00 41 00 cmp $0x410000,%eax
a: 74 47 je 0x53
c: 64 8b 04 25 18 00 00 mov %fs:0x18,%eax
13: 00
14: 85 c0 test %eax,%eax
16: 75 6b jne 0x83
18: 44 89 e2 mov %r12d,%edx
1b: 48 89 ee mov %rbp,%rsi
1e: bf 9c ff ff ff mov $0xffffff9c,%edi
23: b8 01 01 00 00 mov $0x101,%eax
28: 0f 05 syscall
2a:* 48 3d 00 f0 ff ff cmp $0xfffffffffffff000,%rax <-- trapping instruction
30: 0f 87 95 00 00 00 ja 0xcb
36: 48 8b 4c 24 28 mov 0x28(%rsp),%rcx
3b: 64 fs
3c: 48 rex.W
3d: 2b .byte 0x2b
3e: 0c 25 or $0x25,%al

Code starting with the faulting instruction
===========================================
0: 48 3d 00 f0 ff ff cmp $0xfffffffffffff000,%rax
6: 0f 87 95 00 00 00 ja 0xa1
c: 48 8b 4c 24 28 mov 0x28(%rsp),%rcx
11: 64 fs
12: 48 rex.W
13: 2b .byte 0x2b
14: 0c 25 or $0x25,%al

The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20240129/202401291043.e62e89dc-oliver.sang@intel.com

--
0-DAY CI Kernel Test Service