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:   Mon, 22 Mar 2021 21:36:03 +0800
From:   kernel test robot <oliver.sang@...el.com>
To:     Mike Kravetz <mike.kravetz@...cle.com>
Cc:     0day robot <lkp@...el.com>, LKML <linux-kernel@...r.kernel.org>,
        lkp@...ts.01.org, ltp@...ts.linux.it, linux-mm@...ck.org,
        Michal Hocko <mhocko@...e.com>,
        Shakeel Butt <shakeelb@...gle.com>,
        Oscar Salvador <osalvador@...e.de>,
        David Hildenbrand <david@...hat.com>,
        Muchun Song <songmuchun@...edance.com>,
        David Rientjes <rientjes@...gle.com>,
        Miaohe Lin <linmiaohe@...wei.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Matthew Wilcox <willy@...radead.org>,
        HORIGUCHI NAOYA <naoya.horiguchi@....com>,
        "Aneesh Kumar K . V" <aneesh.kumar@...ux.ibm.com>,
        Waiman Long <longman@...hat.com>, Peter Xu <peterx@...hat.com>,
        Mina Almasry <almasrymina@...gle.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Mike Kravetz <mike.kravetz@...cle.com>
Subject: [hugetlb]  cd190f60f9:
 BUG:sleeping_function_called_from_invalid_context_at_mm/hugetlb.c



Greeting,

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

commit: cd190f60f91cdd03f61aa8f52b2013ecfbb206be ("[RFC PATCH 6/8] hugetlb: make free_huge_page irq safe")
url: https://github.com/0day-ci/linux/commits/Mike-Kravetz/make-hugetlb-put_page-safe-for-all-calling-contexts/20210320-064419
base: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git a74e6a014c9d4d4161061f770c9b4f98372ac778

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

	disk: 1HDD
	fs: btrfs
	test: syscalls-03
	ucode: 0xe2

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 Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz with 32G 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>


[  101.462202] BUG: sleeping function called from invalid context at mm/hugetlb.c:2723
[  101.464721]
[  101.469409] in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 4012, name: memfd_create03
[  101.469411] CPU: 1 PID: 4012 Comm: memfd_create03 Tainted: G          I       5.12.0-rc2-00302-gcd190f60f91c #1
[  101.469413] Hardware name: Dell Inc. OptiPlex 7040/0Y7WYT, BIOS 1.1.1 10/07/2015
[  101.477871] fcntl20     0  TINFO  :  Enter block 7
[  101.478536] Call Trace:
[  101.487043]
[  101.497105] dump_stack (kbuild/src/consumer/lib/dump_stack.c:122) 
[  101.505403] fcntl20     0  TINFO  :  Test block 7: PASSED
[  101.509261] ___might_sleep.cold (kbuild/src/consumer/kernel/sched/core.c:8331 kbuild/src/consumer/kernel/sched/core.c:8288) 
[  101.511708]
[  101.513204] __nr_hugepages_store_common (kbuild/src/consumer/include/linux/sched.h:1893 kbuild/src/consumer/mm/hugetlb.c:2723 kbuild/src/consumer/mm/hugetlb.c:2813) 
[  101.517317] fcntl20     0  TINFO  :  Exit block 7
[  101.521893] ? __do_proc_doulongvec_minmax (kbuild/src/consumer/kernel/sysctl.c:1181) 
[  101.525987]
[  101.527473] hugetlb_sysctl_handler_common (kbuild/src/consumer/mm/hugetlb.c:3437) 
[  101.527475] ? alloc_huge_page (kbuild/src/consumer/mm/hugetlb.c:3445) 
[  101.532918] <<<execution_status>>>
[  101.537131] proc_sys_call_handler (kbuild/src/consumer/fs/proc/proc_sysctl.c:591) 
[  101.542265]
[  101.543750] new_sync_write (kbuild/src/consumer/fs/read_write.c:519 (discriminator 1)) 
[  101.549244] initiation_status="ok"
[  101.552890] vfs_write (kbuild/src/consumer/fs/read_write.c:605) 
[  101.552892] ksys_write (kbuild/src/consumer/fs/read_write.c:658) 
[  101.556286]
[  101.560714] do_syscall_64 (kbuild/src/consumer/arch/x86/entry/common.c:46) 
[  101.560717] entry_SYSCALL_64_after_hwframe (kbuild/src/consumer/arch/x86/entry/entry_64.S:112) 
[  101.563498] duration=0 termination_type=exited termination_id=0 corefile=no
[  101.566024] RIP: 0033:0x7f85fdfd5504
[ 101.566026] Code: 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b3 0f 1f 80 00 00 00 00 48 8d 05 f9 61 0d 00 8b 00 85 c0 75 13 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c3 0f 1f 00 41 54 49 89 d4 55 48 89 f5 53
All code
========
   0:	00 f7                	add    %dh,%bh
   2:	d8 64 89 02          	fsubs  0x2(%rcx,%rcx,4)
   6:	48 c7 c0 ff ff ff ff 	mov    $0xffffffffffffffff,%rax
   d:	eb b3                	jmp    0xffffffffffffffc2
   f:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
  16:	48 8d 05 f9 61 0d 00 	lea    0xd61f9(%rip),%rax        # 0xd6216
  1d:	8b 00                	mov    (%rax),%eax
  1f:	85 c0                	test   %eax,%eax
  21:	75 13                	jne    0x36
  23:	b8 01 00 00 00       	mov    $0x1,%eax
  28:	0f 05                	syscall 
  2a:*	48 3d 00 f0 ff ff    	cmp    $0xfffffffffffff000,%rax		<-- trapping instruction
  30:	77 54                	ja     0x86
  32:	c3                   	retq   
  33:	0f 1f 00             	nopl   (%rax)
  36:	41 54                	push   %r12
  38:	49 89 d4             	mov    %rdx,%r12
  3b:	55                   	push   %rbp
  3c:	48 89 f5             	mov    %rsi,%rbp
  3f:	53                   	push   %rbx

Code starting with the faulting instruction
===========================================
   0:	48 3d 00 f0 ff ff    	cmp    $0xfffffffffffff000,%rax
   6:	77 54                	ja     0x5c
   8:	c3                   	retq   
   9:	0f 1f 00             	nopl   (%rax)
   c:	41 54                	push   %r12
   e:	49 89 d4             	mov    %rdx,%r12
  11:	55                   	push   %rbp
  12:	48 89 f5             	mov    %rsi,%rbp
  15:	53                   	push   %rbx
[  101.569418]
[  101.572809] RSP: 002b:00007ffcae478b38 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[  101.572811] RAX: ffffffffffffffda RBX: 00007ffcae478b50 RCX: 00007f85fdfd5504
[  101.576476] cutime=0 cstime=0
[  101.577602] RDX: 0000000000000001 RSI: 00007ffcae478b50 RDI: 0000000000000004
[  101.577603] RBP: 0000000000000004 R08: 0000000000000202 R09: 00007ffcae4788d7
[  101.577604] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002
[  101.577605] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[  101.578709] LTP: starting copy_file_range01
[  101.581170]
[  101.581474] <<<test_end>>>
[  101.587387] loop0: detected capacity change from 0 to 524288
[  101.593161]
[  101.593496] <<<test_start>>>
[  101.678564]
[  101.683480] tag=fcntl26 stime=1616295196
[  101.683481]
[  101.689244] cmdline="fcntl26"
[  101.689245]
[  101.693951] contacts=""
[  101.693952]
[  101.698181] analysis=exit
[  101.698182]
[  101.702676] <<<test_output>>>
[  101.702678]
[  101.708492] fcntl26     1  TPASS  :  fcntl(tfile_2939, F_SETLEASE, F_WRLCK)
[  101.708494]
[  101.711416] /dev/zero: Can't open blockdev
[  101.715981] <<<execution_status>>>
[  101.721025]
[  101.726375] initiation_status="ok"
[  101.726377]
[  101.732715] duration=0 termination_type=exited termination_id=0 corefile=no
[  101.732717]
[  101.741509] cutime=0 cstime=0
[  101.741511]
[  101.746229] <<<test_end>>>
[  101.746231]
[  101.750790] <<<test_start>>>
[  101.750792]
[  101.755874] tag=fcntl28_64 stime=1616295196
[  101.755875]
[  101.761964] cmdline="fcntl28_64"
[  101.761965]
[  101.766947] contacts=""
[  101.766948]
[  101.771137] analysis=exit
[  101.771138]
[  101.775575] <<<test_output>>>
[  101.775576]
[  101.781346] fcntl28     1  TPASS  :  fcntl(fd, F_SETLEASE, F_RDLCK) succeeded
[  101.781348]
[  101.790401] <<<execution_status>>>
[  101.790402]
[  101.795772] initiation_status="ok"
[  101.795773]
[  101.801964] duration=0 termination_type=exited termination_id=0 corefile=no
[  101.801965]
[  101.810823] cutime=0 cstime=0
[  101.810824]
[  101.815561] <<<test_end>>>
[  101.815562]
[  101.820074] <<<test_start>>>
[  101.820075]
[  101.825040] tag=fcntl31 stime=1616295196
[  101.825042]
[  101.830861] cmdline="fcntl31"
[  101.830863]
[  101.835560] contacts=""
[  101.835561]
[  101.839799] analysis=exit
[  101.839800]
[  101.844243] <<<test_output>>>
[  101.844244]
[  101.849900] fcntl31     0  TINFO  :  default io events signal is SIGIO
[  101.849902]
[  101.859476] fcntl31     1  TPASS  :  fcntl test F_GETOWN, F_SETOWN for process ID success
[  101.859478]
[  101.870302] fcntl31     0  TINFO  :  default io events signal is SIGIO
[  101.870303]
[  101.880058] fcntl31     2  TPASS  :  fcntl test F_GETOWN, F_SETOWN for process group ID success
[  101.880060]
[  101.891388] fcntl31     0  TINFO  :  default io events signal is SIGIO
[  101.891390]
[  101.901069] fcntl31     3  TPASS  :  fcntl test F_GETOWN_EX, F_SETOWN_EX for thread ID success
[  101.901070]


To reproduce:

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



---
0DAY/LKP+ Test Infrastructure                   Open Source Technology Center
https://lists.01.org/hyperkitty/list/lkp@lists.01.org       Intel Corporation

Thanks,
Oliver Sang


View attachment "config-5.12.0-rc2-00302-gcd190f60f91c" of type "text/plain" (172899 bytes)

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

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

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

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ