lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 28 Jun 2022 10:40:59 +0800
From:   kernel test robot <oliver.sang@...el.com>
To:     Dario Binacchi <dario.binacchi@...rulasolutions.com>
Cc:     0day robot <lkp@...el.com>, LKML <linux-kernel@...r.kernel.org>,
        linux-can@...r.kernel.org, lkp@...ts.01.org, ltp@...ts.linux.it,
        Amarula patchwork <linux-amarula@...rulasolutions.com>,
        Oliver Hartkopp <socketcan@...tkopp.net>,
        michael@...rulasolutions.com,
        Dario Binacchi <dario.binacchi@...rulasolutions.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Marc Kleine-Budde <mkl@...gutronix.de>,
        Paolo Abeni <pabeni@...hat.com>,
        Wolfgang Grandegger <wg@...ndegger.com>, netdev@...r.kernel.org
Subject: [can]  39bbbe2356:
 BUG:sleeping_function_called_from_invalid_context_at_mm/page_alloc.c



Greeting,

FYI, we noticed the following commit (built with gcc-11):

commit: 39bbbe2356a2a13ec26a8765d8a4e6dfe7ce33e9 ("[PATCH v4 05/12] can: slcan: use CAN network device driver API")
url: https://github.com/intel-lab-lkp/linux/commits/Dario-Binacchi/can-slcan-extend-supported-features/20220614-203636
patch link: https://lore.kernel.org/lkml/20220614122821.3646071-6-dario.binacchi@amarulasolutions.com

in testcase: ltp
version: ltp-x86_64-14c1f76-1_20220625
with following parameters:

	test: pty
	ucode: 0x21

test-description: The LTP testsuite contains a collection of tools for testing the Linux kernel and related features.
test-url: http://linux-test-project.github.io/


on test machine: 4 threads 1 sockets Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz with 8G memory

caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):



If you fix the issue, kindly add following tag
Reported-by: kernel test robot <oliver.sang@...el.com>


[  164.290583][ T3878] BUG: sleeping function called from invalid context at mm/page_alloc.c:5203
[  164.290589][ T3878] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 3878, name: pty03
[  164.290592][ T3878] preempt_count: 1, expected: 0
[  164.290595][ T3878] CPU: 1 PID: 3878 Comm: pty03 Tainted: G S                5.19.0-rc2-00005-g39bbbe2356a2 #1
[  164.290600][ T3878] Hardware name: Hewlett-Packard p6-1451cx/2ADA, BIOS 8.15 02/05/2013
[  164.290602][ T3878] Call Trace:
[  164.290604][ T3878]  <TASK>
[ 164.290606][ T3878] dump_stack_lvl (lib/dump_stack.c:107 (discriminator 1)) 
[ 164.290615][ T3878] __might_resched.cold (kernel/sched/core.c:9792) 
[ 164.290621][ T3878] prepare_alloc_pages+0x330/0x500 
[ 164.290628][ T3878] ? tty_set_ldisc (drivers/tty/tty_ldisc.c:555) 
[ 164.290634][ T3878] __alloc_pages (mm/page_alloc.c:5415) 
[ 164.290637][ T3878] ? __alloc_pages_slowpath+0x15c0/0x15c0 
[ 164.290641][ T3878] ? tty_set_ldisc (drivers/tty/tty_ldisc.c:555) 
[ 164.290645][ T3878] ? kasan_save_stack (mm/kasan/common.c:40) 
[ 164.290650][ T3878] ? kasan_set_track (mm/kasan/common.c:45) 
[ 164.290654][ T3878] ? __kasan_slab_free (mm/kasan/common.c:368 mm/kasan/common.c:328 mm/kasan/common.c:374) 
[ 164.290658][ T3878] ? entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:115) 
[ 164.290663][ T3878] ? do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80) 
[ 164.290668][ T3878] ? entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:115) 
[ 164.290672][ T3878] kmalloc_large_node (mm/slub.c:4432) 
[ 164.290677][ T3878] __kmalloc_node (include/asm-generic/getorder.h:41 mm/slub.c:4450) 
[ 164.290681][ T3878] kvmalloc_node (mm/util.c:619) 
[ 164.290687][ T3878] alloc_netdev_mqs (net/core/dev.c:10577) 
[ 164.290694][ T3878] ? can_get_state_str (drivers/net/can/dev/dev.c:222) can_dev
[ 164.290704][ T3878] ? _raw_spin_lock (arch/x86/include/asm/atomic.h:202 include/linux/atomic/atomic-instrumented.h:543 include/asm-generic/qspinlock.h:111 include/linux/spinlock.h:185 include/linux/spinlock_api_smp.h:134 kernel/locking/spinlock.c:154) 
[ 164.290708][ T3878] alloc_candev_mqs (drivers/net/can/dev/dev.c:262) can_dev
[ 164.290717][ T3878] slcan_open (drivers/net/can/slcan.c:531 drivers/net/can/slcan.c:584) slcan
[ 164.290723][ T3878] tty_ldisc_open (drivers/tty/tty_ldisc.c:433) 
[ 164.290728][ T3878] tty_set_ldisc (drivers/tty/tty_ldisc.c:558) 
[ 164.290733][ T3878] tty_ioctl (drivers/tty/tty_io.c:2714) 
[ 164.290736][ T3878] ? do_sys_openat2 (fs/open.c:1288) 
[ 164.290740][ T3878] ? tty_release (drivers/tty/tty_io.c:2655) 
[ 164.290744][ T3878] ? do_sys_openat2 (fs/open.c:1288) 
[ 164.290747][ T3878] ? build_open_flags (fs/open.c:1264) 
[ 164.290751][ T3878] ? __ia32_sys_stat (fs/stat.c:396) 
[ 164.290755][ T3878] ? userns_owner (kernel/user_namespace.c:371) 
[ 164.290760][ T3878] ? __fget_files (arch/x86/include/asm/atomic64_64.h:22 include/linux/atomic/atomic-arch-fallback.h:2363 include/linux/atomic/atomic-arch-fallback.h:2388 include/linux/atomic/atomic-arch-fallback.h:2404 include/linux/atomic/atomic-long.h:497 include/linux/atomic/atomic-instrumented.h:1854 fs/file.c:882 fs/file.c:913) 
[ 164.290764][ T3878] __x64_sys_ioctl (fs/ioctl.c:52 fs/ioctl.c:870 fs/ioctl.c:856 fs/ioctl.c:856) 
[ 164.290768][ T3878] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80) 
[ 164.290773][ T3878] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:115) 
[  164.290777][ T3878] RIP: 0033:0x7f86f3323cc7
[ 164.290781][ T3878] Code: 00 00 00 48 8b 05 c9 91 0c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 99 91 0c 00 f7 d8 64 89 01 48
All code
========
   0:	00 00                	add    %al,(%rax)
   2:	00 48 8b             	add    %cl,-0x75(%rax)
   5:	05 c9 91 0c 00       	add    $0xc91c9,%eax
   a:	64 c7 00 26 00 00 00 	movl   $0x26,%fs:(%rax)
  11:	48 c7 c0 ff ff ff ff 	mov    $0xffffffffffffffff,%rax
  18:	c3                   	retq   
  19:	66 2e 0f 1f 84 00 00 	nopw   %cs:0x0(%rax,%rax,1)
  20:	00 00 00 
  23:	b8 10 00 00 00       	mov    $0x10,%eax
  28:	0f 05                	syscall 
  2a:*	48 3d 01 f0 ff ff    	cmp    $0xfffffffffffff001,%rax		<-- trapping instruction
  30:	73 01                	jae    0x33
  32:	c3                   	retq   
  33:	48 8b 0d 99 91 0c 00 	mov    0xc9199(%rip),%rcx        # 0xc91d3
  3a:	f7 d8                	neg    %eax
  3c:	64 89 01             	mov    %eax,%fs:(%rcx)
  3f:	48                   	rex.W

Code starting with the faulting instruction
===========================================
   0:	48 3d 01 f0 ff ff    	cmp    $0xfffffffffffff001,%rax
   6:	73 01                	jae    0x9
   8:	c3                   	retq   
   9:	48 8b 0d 99 91 0c 00 	mov    0xc9199(%rip),%rcx        # 0xc91a9
  10:	f7 d8                	neg    %eax
  12:	64 89 01             	mov    %eax,%fs:(%rcx)
  15:	48                   	rex.W
[  164.290784][ T3878] RSP: 002b:00007fff6a8fb8b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[  164.290789][ T3878] RAX: ffffffffffffffda RBX: 00007f86f322c6c0 RCX: 00007f86f3323cc7
[  164.290792][ T3878] RDX: 000055911985c700 RSI: 0000000000005423 RDI: 000000000000000d
[  164.290795][ T3878] RBP: 000055911985c700 R08: 0000000000000000 R09: cccccccccccccccd
[  164.290797][ T3878] R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000000d
[  164.290799][ T3878] R13: 0000000000000006 R14: 000055911985c6a0 R15: 0000000000000004
[  164.290803][ T3878]  </TASK>
[  164.738226][ T3878] BUG: scheduling while atomic: pty03/3878/0x00000002
[  164.738233][ T3878] Modules linked in: slcan can_dev n_hdlc netconsole btrfs blake2b_generic xor raid6_pq zstd_compress libcrc32c sd_mod t10_pi crc64_rocksoft_generic crc64_rocksoft crc64 sg i915 intel_rapl_msr intel_gtt intel_rapl_common drm_buddy x86_pkg_temp_thermal drm_display_helper intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul crc32c_intel ahci ttm ghash_clmulni_intel rapl libahci intel_cstate ipmi_devintf drm_kms_helper intel_uncore ipmi_msghandler usb_storage mei_me syscopyarea sysfillrect libata sysimgblt mei fb_sys_fops video drm fuse ip_tables
[  164.738298][ T3878] CPU: 3 PID: 3878 Comm: pty03 Tainted: G S      W         5.19.0-rc2-00005-g39bbbe2356a2 #1
[  164.738302][ T3878] Hardware name: Hewlett-Packard p6-1451cx/2ADA, BIOS 8.15 02/05/2013
[  164.738305][ T3878] Call Trace:
[  164.738307][ T3878]  <TASK>
[ 164.738309][ T3878] dump_stack_lvl (lib/dump_stack.c:107 (discriminator 1)) 
[ 164.738318][ T3878] __schedule_bug.cold (kernel/sched/core.c:5661) 
[ 164.738323][ T3878] schedule_debug (arch/x86/include/asm/preempt.h:35 kernel/sched/core.c:5688) 
[ 164.738329][ T3878] __schedule (arch/x86/include/asm/jump_label.h:27 include/linux/jump_label.h:207 kernel/sched/features.h:40 kernel/sched/core.c:6324) 
[ 164.738335][ T3878] ? node_tag_clear (arch/x86/include/asm/bitops.h:94 include/asm-generic/bitops/instrumented-non-atomic.h:43 lib/radix-tree.c:107 lib/radix-tree.c:1000) 
[ 164.738340][ T3878] ? io_schedule_timeout (kernel/sched/core.c:6310) 
[ 164.738344][ T3878] ? idr_alloc_u32 (lib/idr.c:55) 
[ 164.738349][ T3878] ? _raw_spin_lock_irq (arch/x86/include/asm/atomic.h:202 include/linux/atomic/atomic-instrumented.h:543 include/asm-generic/qspinlock.h:111 include/linux/spinlock.h:185 include/linux/spinlock_api_smp.h:120 kernel/locking/spinlock.c:170) 
[ 164.738353][ T3878] schedule (include/linux/instrumented.h:71 (discriminator 1) include/asm-generic/bitops/instrumented-non-atomic.h:134 (discriminator 1) include/linux/thread_info.h:118 (discriminator 1) include/linux/sched.h:2196 (discriminator 1) kernel/sched/core.c:6502 (discriminator 1)) 
[ 164.738358][ T3878] rwsem_down_write_slowpath (arch/x86/include/asm/current.h:15 kernel/locking/rwsem.c:1174) 
[ 164.738362][ T3878] ? __down_timeout (kernel/locking/rwsem.c:1099) 
[ 164.738365][ T3878] ? _raw_write_lock_irq (kernel/locking/spinlock.c:153) 
[ 164.738370][ T3878] ? idr_get_free (lib/radix-tree.c:1533) 
[ 164.738373][ T3878] ? kernfs_dir_fop_release (fs/kernfs/dir.c:584) 
[ 164.738379][ T3878] down_write (kernel/locking/rwsem.c:1544) 
[ 164.738383][ T3878] ? down_write_killable (kernel/locking/rwsem.c:1540) 
[ 164.738386][ T3878] ? idr_alloc (lib/idr.c:118) 
[ 164.738389][ T3878] ? _raw_spin_lock (arch/x86/include/asm/atomic.h:202 include/linux/atomic/atomic-instrumented.h:543 include/asm-generic/qspinlock.h:111 include/linux/spinlock.h:185 include/linux/spinlock_api_smp.h:134 kernel/locking/spinlock.c:154) 
[ 164.738393][ T3878] ? __fprop_add_percpu_max (lib/idr.c:35) 
[ 164.738397][ T3878] kernfs_add_one (include/linux/kernfs.h:332 fs/kernfs/dir.c:737) 
[ 164.738402][ T3878] ? kernfs_new_node (fs/kernfs/dir.c:659) 
[ 164.738406][ T3878] ? device_remove_bin_file (drivers/base/core.c:2089) 
[ 164.738411][ T3878] __kernfs_create_file (fs/kernfs/file.c:1016) 
[ 164.738415][ T3878] sysfs_add_file_mode_ns (fs/sysfs/file.c:301) 
[ 164.738419][ T3878] ? projid_m_show (kernel/user_namespace.c:308) 
[ 164.738423][ T3878] ? _raw_write_lock_irq (kernel/locking/spinlock.c:153) 
[ 164.738427][ T3878] create_files (fs/sysfs/group.c:66 (discriminator 3)) 
[ 164.738431][ T3878] ? make_kgid (kernel/user_namespace.c:475) 
[ 164.738434][ T3878] internal_create_group (fs/sysfs/group.c:148) 
[ 164.738438][ T3878] ? down_write (arch/x86/include/asm/atomic64_64.h:34 include/linux/atomic/atomic-long.h:41 include/linux/atomic/atomic-instrumented.h:1280 kernel/locking/rwsem.c:139 kernel/locking/rwsem.c:256 kernel/locking/rwsem.c:1286 kernel/locking/rwsem.c:1296 kernel/locking/rwsem.c:1543) 
[ 164.738441][ T3878] ? create_files (fs/sysfs/group.c:109) 
[ 164.738444][ T3878] ? __cond_resched (kernel/sched/core.c:8217) 
[ 164.738448][ T3878] ? down_write (arch/x86/include/asm/atomic64_64.h:34 include/linux/atomic/atomic-long.h:41 include/linux/atomic/atomic-instrumented.h:1280 kernel/locking/rwsem.c:139 kernel/locking/rwsem.c:256 kernel/locking/rwsem.c:1286 kernel/locking/rwsem.c:1296 kernel/locking/rwsem.c:1543) 
[ 164.738452][ T3878] internal_create_groups+0x7c/0x140 
[ 164.738456][ T3878] device_add_attrs (drivers/base/core.c:2621) 
[ 164.738460][ T3878] ? klist_children_put (drivers/base/core.c:2614) 
[ 164.738464][ T3878] ? kernfs_create_link (fs/kernfs/symlink.c:48) 
[ 164.738467][ T3878] ? kernfs_put (arch/x86/include/asm/atomic.h:123 (discriminator 1) include/linux/atomic/atomic-instrumented.h:576 (discriminator 1) fs/kernfs/dir.c:521 (discriminator 1)) 
[ 164.738471][ T3878] device_add (drivers/base/core.c:3368) 
[ 164.738476][ T3878] ? device_initialize (drivers/base/core.c:3200) 
[ 164.738479][ T3878] ? __fw_devlink_link_to_suppliers (drivers/base/core.c:3299) 
[ 164.738484][ T3878] ? __hrtimer_init (kernel/time/hrtimer.c:1559) 
[ 164.738488][ T3878] netdev_register_kobject (net/core/net-sysfs.c:2014) 
[ 164.738493][ T3878] register_netdevice (net/core/dev.c:10047) 
[ 164.738498][ T3878] ? __cond_resched (kernel/sched/core.c:8217) 
[ 164.738502][ T3878] ? netdev_change_features (net/core/dev.c:9942) 
[ 164.738507][ T3878] register_netdev (net/core/dev.c:10171) 
[ 164.738511][ T3878] register_candev (drivers/net/can/dev/dev.c:460) can_dev
[ 164.738522][ T3878] ? can_set_termination (drivers/net/can/dev/dev.c:460) can_dev
[ 164.738529][ T3878] ? _raw_spin_lock (arch/x86/include/asm/atomic.h:202 include/linux/atomic/atomic-instrumented.h:543 include/asm-generic/qspinlock.h:111 include/linux/spinlock.h:185 include/linux/spinlock_api_smp.h:134 kernel/locking/spinlock.c:154) 
[ 164.738533][ T3878] ? alloc_candev_mqs (drivers/net/can/dev/dev.c:284) can_dev
[ 164.738541][ T3878] slcan_open (drivers/net/can/slcan.c:598) slcan
[ 164.738547][ T3878] tty_ldisc_open (drivers/tty/tty_ldisc.c:433) 
[ 164.738552][ T3878] tty_set_ldisc (drivers/tty/tty_ldisc.c:558) 
[ 164.738557][ T3878] tty_ioctl (drivers/tty/tty_io.c:2714) 
[ 164.738561][ T3878] ? tty_release (drivers/tty/tty_io.c:2655) 
[ 164.738565][ T3878] ? __switch_to (arch/x86/kernel/process.h:38 arch/x86/kernel/process_64.c:627) 
[ 164.738569][ T3878] ? __schedule (kernel/sched/core.c:6310) 
[ 164.738574][ T3878] ? io_schedule_timeout (kernel/sched/core.c:6310) 
[ 164.738578][ T3878] ? __fget_files (arch/x86/include/asm/atomic64_64.h:22 include/linux/atomic/atomic-arch-fallback.h:2363 include/linux/atomic/atomic-arch-fallback.h:2388 include/linux/atomic/atomic-arch-fallback.h:2404 include/linux/atomic/atomic-long.h:497 include/linux/atomic/atomic-instrumented.h:1854 fs/file.c:882 fs/file.c:913) 
[ 164.738583][ T3878] __x64_sys_ioctl (fs/ioctl.c:52 fs/ioctl.c:870 fs/ioctl.c:856 fs/ioctl.c:856) 
[ 164.738587][ T3878] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80) 
[ 164.738591][ T3878] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:115) 
[  164.738596][ T3878] RIP: 0033:0x7f86f3323cc7
[ 164.738599][ T3878] Code: 00 00 00 48 8b 05 c9 91 0c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 99 91 0c 00 f7 d8 64 89 01 48
All code
========
   0:	00 00                	add    %al,(%rax)
   2:	00 48 8b             	add    %cl,-0x75(%rax)
   5:	05 c9 91 0c 00       	add    $0xc91c9,%eax
   a:	64 c7 00 26 00 00 00 	movl   $0x26,%fs:(%rax)
  11:	48 c7 c0 ff ff ff ff 	mov    $0xffffffffffffffff,%rax
  18:	c3                   	retq   
  19:	66 2e 0f 1f 84 00 00 	nopw   %cs:0x0(%rax,%rax,1)
  20:	00 00 00 
  23:	b8 10 00 00 00       	mov    $0x10,%eax
  28:	0f 05                	syscall 
  2a:*	48 3d 01 f0 ff ff    	cmp    $0xfffffffffffff001,%rax		<-- trapping instruction
  30:	73 01                	jae    0x33
  32:	c3                   	retq   
  33:	48 8b 0d 99 91 0c 00 	mov    0xc9199(%rip),%rcx        # 0xc91d3
  3a:	f7 d8                	neg    %eax
  3c:	64 89 01             	mov    %eax,%fs:(%rcx)
  3f:	48                   	rex.W

Code starting with the faulting instruction
===========================================
   0:	48 3d 01 f0 ff ff    	cmp    $0xfffffffffffff001,%rax
   6:	73 01                	jae    0x9
   8:	c3                   	retq   
   9:	48 8b 0d 99 91 0c 00 	mov    0xc9199(%rip),%rcx        # 0xc91a9
  10:	f7 d8                	neg    %eax
  12:	64 89 01             	mov    %eax,%fs:(%rcx)
  15:	48                   	rex.W
[  164.738603][ T3878] RSP: 002b:00007fff6a8fb8b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[  164.738608][ T3878] RAX: ffffffffffffffda RBX: 00007f86f322c6c0 RCX: 00007f86f3323cc7
[  164.738611][ T3878] RDX: 000055911985c700 RSI: 0000000000005423 RDI: 000000000000000d
[  164.738613][ T3878] RBP: 000055911985c700 R08: 0000000000000000 R09: cccccccccccccccd
[  164.738616][ T3878] R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000000d
[  164.738618][ T3878] R13: 0000000000000006 R14: 000055911985c6a0 R15: 0000000000000004
[  164.738621][ T3878]  </TASK>


To reproduce:

        git clone https://github.com/intel/lkp-tests.git
        cd lkp-tests
        sudo bin/lkp install job.yaml           # job file is attached in this email
        bin/lkp split-job --compatible job.yaml # generate the yaml file for lkp run
        sudo bin/lkp run generated-yaml-file

        # if come across any failure that blocks the test,
        # please remove ~/.lkp and /lkp dir to run from a clean state.



-- 
0-DAY CI Kernel Test Service
https://01.org/lkp



View attachment "config-5.19.0-rc2-00005-g39bbbe2356a2" of type "text/plain" (167343 bytes)

View attachment "job-script" of type "text/plain" (5822 bytes)

Download attachment "dmesg.xz" of type "application/x-xz" (145188 bytes)

View attachment "ltp" of type "text/plain" (23478 bytes)

View attachment "job.yaml" of type "text/plain" (4702 bytes)

View attachment "reproduce" of type "text/plain" (17 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ