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>] [day] [month] [year] [list]
Message-ID: <20190725095028.GA3640@shao2-debian>
Date:   Thu, 25 Jul 2019 17:50:28 +0800
From:   kernel test robot <rong.a.chen@...el.com>
To:     Jeff Layton <jlayton@...nel.org>
Cc:     Alexander Viro <viro@...iv.linux.org.uk>,
        Luis Henriques <lhenriques@...e.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Jeff Layton <jlayton@...hat.com>, lkp@...org
Subject: [mm]  [confidence: ] e49f335ded:
 BUG:sleeping_function_called_from_invalid_context_at_mm/util.c

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

commit: e49f335dedc18a2ee0ac7791134b282abd9c857f ("mm: check for sleepable context in kvfree")
https://kernel.googlesource.com/pub/scm/linux/kernel/git/jlayton/linux.git mm-5.4

in testcase: xfstests
with following parameters:

	disk: 4HDD
	fs: f2fs
	test: generic-quick3

test-description: xfstests is a regression test suite for xfs and other files ystems.
test-url: git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git


on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 2G

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


+----------------------------------------------------------------+------------+------------+
|                                                                | 7b5cf701ea | e49f335ded |
+----------------------------------------------------------------+------------+------------+
| boot_successes                                                 | 67         | 0          |
| boot_failures                                                  | 96         | 100        |
| WARNING:at_arch/x86/kernel/rtc.c:#mach_get_cmos_time           | 4          |            |
| RIP:mach_get_cmos_time                                         | 4          |            |
| BUG:kernel_reboot-without-warning_in_test_stage                | 55         |            |
| INFO:rcu_sched_self-detected_stall_on_CPU                      | 1          |            |
| RIP:__memcpy                                                   | 1          |            |
| BUG:kernel_hang_in_boot_stage                                  | 2          |            |
| BUG:kernel_NULL_pointer_dereference,address                    | 35         |            |
| Oops:#[##]                                                     | 35         |            |
| RIP:dma_direct_max_mapping_size                                | 35         |            |
| Kernel_panic-not_syncing:Fatal_exception                       | 35         |            |
| BUG:sleeping_function_called_from_invalid_context_at_mm/util.c | 0          | 100        |
+----------------------------------------------------------------+------------+------------+


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


[   24.662886] BUG: sleeping function called from invalid context at mm/util.c:485
[   24.665429] in_atomic(): 1, irqs_disabled(): 1, pid: 1466, name: mount
[   24.667323] CPU: 1 PID: 1466 Comm: mount Not tainted 5.3.0-rc1-00057-ge49f335dedc18a #1
[   24.669343] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014
[   24.671642] Call Trace:
[   24.673336]  dump_stack+0x5c/0x7b
[   24.674753]  ___might_sleep+0xf1/0x110
[   24.676063]  kvfree+0x61/0x80
[   24.677374]  f2fs_build_node_manager+0x5f7/0x720 [f2fs]
[   24.678973]  f2fs_fill_super+0xeb8/0x1e30 [f2fs]
[   24.680544]  ? f2fs_commit_super+0x190/0x190 [f2fs]
[   24.682097]  mount_bdev+0x173/0x1b0
[   24.683321]  legacy_get_tree+0x27/0x40
[   24.684820]  vfs_get_tree+0x25/0xf0
[   24.686029]  do_mount+0x691/0x9c0
[   24.687412]  ksys_mount+0x80/0xd0
[   24.688667]  __x64_sys_mount+0x21/0x30
[   24.689889]  do_syscall_64+0x5b/0x1f0
[   24.691325]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[   24.692824] RIP: 0033:0x7f9b2f22c48a
[   24.694212] Code: 48 8b 0d 11 fa 2a 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d de f9 2a 00 f7 d8 64 89 01 48
[   24.698836] RSP: 002b:00007ffd44d022b8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
[   24.700896] RAX: ffffffffffffffda RBX: 000055d6197fd080 RCX: 00007f9b2f22c48a
[   24.702940] RDX: 000055d6197fd260 RSI: 000055d6197fd2e0 RDI: 000055d6197fd2c0
[   24.704928] RBP: 0000000000000000 R08: 000055d6197fd280 R09: 000000000000002f
[   24.706866] R10: 00000000c0ed0001 R11: 0000000000000246 R12: 000055d6197fd2c0
[   24.708988] R13: 000055d6197fd260 R14: 00007ffd44d02438 R15: 000055d6197fd2c0
[   24.719635] F2FS-fs (vdd): Need to recover fsync data, but write access unavailable
[   24.867539] F2FS-fs (vdd): recover fsync data on readonly fs
[   24.873295] F2FS-fs (vdd): Mounted with checkpoint version = 23c9d0ea
[   24.991834] F2FS-fs (vdd): recover fsync data on readonly fs
[   24.999918] F2FS-fs (vdd): Mounted with checkpoint version = 23c9d0ea
[   25.125365] run fstests generic/051 at 2019-07-24 16:42:56
[   25.261578] result_service=inn:/result, RESULT_MNT=/inn/result, RESULT_ROOT=/inn/result/xfstests/4HDD-f2fs-generic-quick3/vm-snb-2G/debian-x86_64-2018-04-03.cgz/x86_64-rhel-7.6/gcc-7/e49f335dedc18a2ee0ac7791134b282abd9c857f/3
[   25.261581] 
[   25.270070] mount.nfs: try 1 time... mount.nfs -o vers=3 inn:/result /inn/result
[   25.270074] 
[   25.279356] run-job /lkp/jobs/scheduled/vm-snb-2G-3631a88de49b/xfstests-4HDD-f2fs-generic-quick3-debian-x86_64-2018-04-03.cgz-e49f3-20190724-6050-17o56r9-1.yaml
[   25.279358] 
[   25.347888] F2FS-fs (vda): Found nat_bits in checkpoint
[   25.512446] F2FS-fs (vda): Mounted with checkpoint version = 58eca5b1
[   26.041459] F2FS-fs (vdd): Found nat_bits in checkpoint
[   26.208391] F2FS-fs (vdd): Mounted with checkpoint version = 7f40f917
[   26.749255] F2FS-fs (vdd): Found nat_bits in checkpoint
[   26.907409] F2FS-fs (vdd): Mounted with checkpoint version = 2d85b69f
[   27.917438] /usr/bin/wget -q --timeout=1800 --tries=1 --local-encoding=UTF-8 http://inn:80/~lkp/cgi-bin/lkp-jobfile-append-var?job_file=/lkp/jobs/scheduled/vm-snb-2G-3631a88de49b/xfstests-4HDD-f2fs-generic-quick3-debian-x86_64-2018-04-03.cgz-e49f3-20190724-6050-17o56r9-1.yaml&job_state=running -O /dev/null
[   27.917441] 
[   27.925520] target ucode: 
[   27.925522] 
[   27.932165] 2019-07-24 16:42:45 dmsetup remove_all
[   27.932168] 
[   27.940098] 2019-07-24 16:42:45 wipefs -a --force /dev/vda
[   27.940102] 
[   27.944768] 2019-07-24 16:42:45 wipefs -a --force /dev/vdb
[   27.944771] 
[   27.949325] 2019-07-24 16:42:45 wipefs -a --force /dev/vdc
[   27.949327] 
[   27.954154] 2019-07-24 16:42:45 wipefs -a --force /dev/vdd
[   27.954156] 
[   27.959379] 2019-07-24 16:42:45 mkfs -t f2fs /dev/vdc
[   27.959381] 
[   27.963492] 2019-07-24 16:42:45 mkfs -t f2fs /dev/vda
[   27.963494] 
[   27.967545] 2019-07-24 16:42:45 mkfs -t f2fs /dev/vdd
[   27.967547] 
[   27.971238] 2019-07-24 16:42:45 mkfs -t f2fs /dev/vdb
[   27.971240] 
[   27.973770] 
[   27.977245] 	F2FS-tools: mkfs.f2fs Ver: 1.12.0 (2019-05-20)
[   27.977247] 
[   27.979883] 
[   27.982161] Info: Disable heap-based policy
[   27.982162] 
[   27.985739] Info: Debug level = 0
[   27.985741] 
[   27.988669] Info: Trim is enabled
[   27.988672] 
[   27.991478] Info: Segments per section = 1
[   27.991480] 
[   27.994821] Info: Sections per zone = 1
[   27.994823] 
[   27.997439] Info: sector size = 512
[   27.997441] 
[   28.000862] Info: total sectors = 536870912 (262144 MB)
[   28.000864] 
[   28.004563] Info: zone aligned segment0 blkaddr: 512
[   28.004565] 
[   28.007679] Info: format version with
[   28.007681] 
[   28.013886]   "Linux version 5.3.0-rc1-00057-ge49f335dedc18a (kbuild@...c9eb08fcc) (gcc version 7.4.0 (Debian 7.4.0-10)) #1 SMP Wed Jul 24 03:51:28 CST 2019"
[   28.013888] 
[   28.023110] Info: [/dev/vda] Discarding device
[   28.023112] 
[   28.027786] Info: This device doesn't support BLKSECDISCARD
[   28.027789] 
[   28.037600] Info: This device doesn't support BLKDISCARD
[   28.037603] 
[   28.042607] Info: Overprovision ratio = 0.390%
[   28.042609] 
[   28.046632] Info: Overprovision segments = 1027 (GC reserved = 520)
[   28.046634] 


To reproduce:

        # build kernel
	cd linux
	cp config-5.3.0-rc1-00057-ge49f335dedc18a .config
	make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 olddefconfig prepare modules_prepare bzImage modules
	make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 INSTALL_MOD_PATH=<mod-install-dir> modules_install
	cd <mod-install-dir>
	find lib/ | cpio -o -H newc --quiet | gzip > modules.cgz


        git clone https://github.com/intel/lkp-tests.git
        cd lkp-tests
        bin/lkp qemu -k <bzImage> -m modules.cgz job-script # job-script is attached in this email



Thanks,
Rong Chen


View attachment "config-5.3.0-rc1-00057-ge49f335dedc18a" of type "text/plain" (199602 bytes)

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ