Bug 202111

Summary: random bug: unable to handle kernel paging, related to vt_do_kdgkb_ioctl() function
Product: Drivers Reporter: Barto (mister.freeman)
Component: OtherAssignee: drivers_other
Status: NEW ---    
Severity: normal CC: natrio
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.19.12 Subsystem:
Regression: No Bisected commit-id:
Attachments: dmesg

Description Barto 2018-12-31 19:45:40 UTC
Created attachment 280227 [details]
dmesg

Hello,

I notice a random bug at boot with kernel 4.19.12, related to vt_do_kdgkb_ioctl() function :

[   11.376579] BUG: unable to handle kernel paging request at ffff8e3ba50b8000
[   11.377780] PGD 110a01067 P4D 110a01067 PUD 110a05067 PMD 222a74063 PTE 80000002250b8061
[   11.377785] Oops: 0003 [#1] PREEMPT SMP PTI
[   11.377790] CPU: 3 PID: 411 Comm: loadkeys Not tainted 4.19.12-arch1-1-ARCH #1
[   11.381766] Hardware name: Gigabyte Technology Co., Ltd. P35-DS3L/P35-DS3L, BIOS F9 06/19/2009
[   11.381771] RIP: 0010:__memmove+0x81/0x1a0
[   11.381773] Code: 4c 89 4f 10 4c 89 47 18 48 8d 7f 20 73 d4 48 83 c2 20 e9 a2 00 00 00 66 90 48 89 d1 4c 8b 5c 16 f8 4c 8d 54 17 f8 48 c1 e9 03 <f3> 48 a5 4d 89 1a e9 0c 01 00 00 0f 1f 40 00 48 89 d1 4c 8b 1e 49
[   11.381773] RSP: 0018:ffffab31812cfd08 EFLAGS: 00010207
[   11.381775] RAX: ffff8e3ba50b3755 RBX: ffffffffa4cc97c0 RCX: 00000e387ff8240f
[   11.381776] RDX: 000071c3ffc16924 RSI: ffff8e3ba50b7ffd RDI: ffff8e3ba50b7ffd
[   11.381777] RBP: ffff8e3ba50b3755 R08: 00007ffd65661830 R09: 00000000fffff73b
[   11.381778] R10: ffffffffa4cca071 R11: 00505b1b004d5b1b R12: 0000000000000000
[   11.381779] R13: ffff8e3ba50b374f R14: 000000000000000f R15: ffff8e3ba5026c00
[   11.381780] FS:  00007f0e828bb540(0000) GS:ffff8e3ba7b80000(0000) knlGS:0000000000000000
[   11.381781] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   11.381782] CR2: ffff8e3ba50b8000 CR3: 0000000225ab8000 CR4: 00000000000406e0
[   11.381783] Call Trace:
[   11.381789]  vt_do_kdgkb_ioctl+0x2d3/0x420
[   11.381795]  ? cap_inode_getsecurity+0x240/0x240
[   11.381798]  vt_ioctl+0xb70/0x1110
[   11.406510]  ? __switch_to_asm+0x40/0x70
[   11.406513]  ? seccomp_run_filters+0x5c/0x150
[   11.406514]  ? __switch_to_asm+0x34/0x70
[   11.406517]  tty_ioctl+0x220/0x890
[   11.406521]  ? __seccomp_filter+0x43/0x490
[   11.415467]  ? __switch_to_asm+0x34/0x70
[   11.416818]  ? __audit_syscall_exit+0x22a/0x290
[   11.418161]  do_vfs_ioctl+0xa4/0x630
[   11.419504]  ? syscall_slow_exit_work+0x19b/0x1b0
[   11.420848]  ? syscall_trace_enter+0x1d3/0x2d0
[   11.422209]  ksys_ioctl+0x60/0x90
[   11.423509]  __x64_sys_ioctl+0x16/0x20
[   11.425911]  do_syscall_64+0x5b/0x170
[   11.427281]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[   11.428564] RIP: 0033:0x7f0e827e880b

I use archlinux, motherboard : gigabyte GA-P35-DS3L, CPU: intel quad core Q9650,
my keyboard is a PS/2 model (not USB),

I tested the ram, all is ok, no problems found by memtest,

despite the error the boot can continue without problems,
with previous kernel versions I didn't have this error,

you can find as attachment the complete dmesg log
Comment 1 Barto 2018-12-31 19:50:16 UTC
maybe related also to this bug report :
https://bugzilla.kernel.org/show_bug.cgi?id=194589
Comment 2 Natrio 2019-02-09 10:15:53 UTC
The same bug, on both 4.19.* and 4.20.* kernels, random too, only on loadkeys, but not every boot:

BUG: unable to handle kernel paging request at ffffa3cbd0292000
PGD 4e01067 P4D 4e01067 PUD 4e05067 PMD 1101bc063 PTE 8000000110292061
Oops: 0003 [#1] PREEMPT SMP PTI
CPU: 1 PID: 378 Comm: loadkeys Not tainted 4.20.7-arch1-1-ARCH #1
Hardware name: Gigabyte Tecohnology Co., Ltd. H61M-S2PV/H61M-S2PV, BIOS FC 02/15/2012
RIP: 0010:__memmove+0x81/0x1a0
Code: 4c 89 4f 10 4c 89 47 18 48 8d 7f 20 73 d4 48 83 c2 20 e9 a2 00 00 00 66 90 48 89 d1 4c 8b 5c 16 f8 4c 8d 54 17 f8 48 c1 e9 03 <f3> 48 a5 4d 89 1a e9 0c 01 00 00 0f 1f 40 00 48 89 d1 4c 8b 1e 49
RSP: 0018:ffffb5b880c53d08 EFLAGS: 00010202
RAX: ffffa3cbd024a131 RBX: ffffffff92cc4080 RCX: 00000b8678546528
RDX: 00005c33c2a7a808 RSI: ffffa3cbd0291ff9 RDI: ffffa3cbd0291ff9
RBP: ffffa3cbd024a131 R08: 00007fff8dc0ff30 R09: 00000000fffff73b
R10: ffffffff92cc4931 R11: 00505b1b004d5b1b R12: 0000000000000000
R13: ffffa3cbd024a12b R14: 0000000000000009 R15: ffffa3cbd01b2800
FS:  00007f666736e540(0000) GS:ffffa3cbdb100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffa3cbd0292000 CR3: 0000000119bb6001 CR4: 00000000000606e0
Call Trace:
 vt_do_kdgkb_ioctl+0x2d3/0x420
 ? cap_inode_getsecurity+0x240/0x240
 vt_ioctl+0xb70/0x1110
 ? __mod_node_page_state+0x69/0xa0
 tty_ioctl+0x220/0x8c0
 ? seccomp_run_filters+0x5c/0x150
 do_vfs_ioctl+0xa4/0x630
 ? handle_mm_fault+0x10a/0x250
 ? syscall_trace_enter+0x1d3/0x2d0
 ksys_ioctl+0x60/0x90
 __x64_sys_ioctl+0x16/0x20
 do_syscall_64+0x5b/0x170
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f666729b80b
Code: 0f 1e fa 48 8b 05 55 b6 0c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 25 b6 0c 00 f7 d8 64 89 01 48
RSP: 002b:00007fff8dc0ff18 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007f666729b80b
RDX: 00007fff8dc0ff30 RSI: 0000000000004b49 RDI: 0000000000000003
RBP: 00007fff8dc0ff31 R08: 00007f6667367aa0 R09: 00007f66672e8480
R10: 0000060200000119 R11: 0000000000000246 R12: 0000557ab0c7c2b0
R13: 00007fff8dc0ff30 R14: 0000000000000008 R15: 0000000000000003
Modules linked in: mousedev intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel crct10dif_pclmul crc32_pclmul iTCO_wdt ghash_clmulni_intel iTCO_vendor_support ppdev cryptd snd_hda_codec_realtek intel_cstate snd_hda_codec_generic intel_uncore snd_hda_intel snd_emu10k1 intel_rapl_perf mei_me psmouse snd_hda_codec input_leds i2c_i801 snd_util_mem snd_ac97_codec parport_pc snd_hda_core atl1c mei snd_rawmidi snd_seq_device emu10k1_gp parport ac97_bus gameport snd_hwdep pcc_cpufreq evdev mac_hid lpc_ich snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd soundcore sg crypto_user ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 fscrypto sr_mod cdrom sd_mod serio_raw atkbd libps2 ahci libahci libata crc32c_intel scsi_mod ehci_pci ehci_hcd i8042 serio i915 kvmgt vfio_mdev mdev vfio_iommu_type1 vfio kvm irqbypass intel_gtt i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm agpgart
CR2: ffffa3cbd0292000
---[ end trace d4928b857469e250 ]---
RIP: 0010:__memmove+0x81/0x1a0
Code: 4c 89 4f 10 4c 89 47 18 48 8d 7f 20 73 d4 48 83 c2 20 e9 a2 00 00 00 66 90 48 89 d1 4c 8b 5c 16 f8 4c 8d 54 17 f8 48 c1 e9 03 <f3> 48 a5 4d 89 1a e9 0c 01 00 00 0f 1f 40 00 48 89 d1 4c 8b 1e 49
RSP: 0018:ffffb5b880c53d08 EFLAGS: 00010202
RAX: ffffa3cbd024a131 RBX: ffffffff92cc4080 RCX: 00000b8678546528
RDX: 00005c33c2a7a808 RSI: ffffa3cbd0291ff9 RDI: ffffa3cbd0291ff9
RBP: ffffa3cbd024a131 R08: 00007fff8dc0ff30 R09: 00000000fffff73b
R10: ffffffff92cc4931 R11: 00505b1b004d5b1b R12: 0000000000000000
R13: ffffa3cbd024a12b R14: 0000000000000009 R15: ffffa3cbd01b2800
FS:  00007f666736e540(0000) GS:ffffa3cbdb100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffa3cbd0292000 CR3: 0000000119bb6001 CR4: 00000000000606e0

Found on two computers under Arch Linux:
Gigabyte H61M-S2PV with Intel(R) Celeron(R) CPU G530,
MSI MS-7808 with Intel(R) Pentium(R) CPU G2010.