FYI, we noticed the following commit (built with gcc-7):
commit: d4f7b87e55fb41849e9da958718134d2a34d3355 ("[PATCH V3 6/6] IMA: Allow profiles
to define the desired IMA template")
url:
https://github.com/0day-ci/linux/commits/Matthew-Garrett/IMA-Support-aski...
base:
https://git.kernel.org/cgit/linux/kernel/git/zohar/linux-integrity.git
next-integrity
in testcase: trinity
with following parameters:
runtime: 300s
test-description: Trinity is a linux system call fuzz tester.
test-url:
http://codemonkey.org.uk/projects/trinity/
on test machine: qemu-system-i386 -enable-kvm -cpu SandyBridge -smp 2 -m 2G
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
+------------------------------------------------------------------------------------+------------+------------+
| |
b0b4536f16 | d4f7b87e55 |
+------------------------------------------------------------------------------------+------------+------------+
| boot_successes | 6
| 0 |
| boot_failures | 0
| 4 |
| WARNING:suspicious_RCU_usage | 0
| 4 |
| include/linux/rcupdate.h:#Illegal_context_switch_in_RCU_read-side_critical_section | 0
| 4 |
| BUG:sleeping_function_called_from_invalid_context_at_mm/slab.h | 0
| 4 |
+------------------------------------------------------------------------------------+------------+------------+
If you fix the issue, kindly add following tag
Reported-by: kernel test robot <lkp(a)intel.com>
[ 361.266989] WARNING: suspicious RCU usage
[ 361.274571] 5.1.0-rc2-00031-gd4f7b87 #1 Tainted: G T
[ 361.285514] -----------------------------
[ 361.293501] include/linux/rcupdate.h:268 Illegal context switch in RCU read-side
critical section!
[ 361.312409]
[ 361.312409] other info that might help us debug this:
[ 361.312409]
[ 361.322783]
[ 361.322783] rcu_scheduler_active = 2, debug_locks = 1
[ 361.332527] 1 lock held by swapper/1:
[ 361.338036] #0: d45d28b0 (rcu_read_lock){....}, at: lookup_template_desc+0x5/0x86
[ 361.349181]
[ 361.349181] stack backtrace:
[ 361.354855] CPU: 0 PID: 1 Comm: swapper Tainted: G T
5.1.0-rc2-00031-gd4f7b87 #1
[ 361.366652] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1
04/01/2014
[ 361.377484] Call Trace:
[ 361.382585] dump_stack+0x16/0x18
[ 361.388906] lockdep_rcu_suspicious+0x8f/0x9a
[ 361.395500] rcu_preempt_sleep_check+0x3e/0x40
[ 361.402590] ___might_sleep+0x16/0x19b
[ 361.408184] __might_sleep+0x69/0x70
[ 361.414046] ? __fs_reclaim_release+0x1c/0x1e
[ 361.421146] slab_pre_alloc_hook+0x34/0x52
[ 361.429702] __kmalloc+0x4e/0xce
[ 361.433419] ? template_desc_init_fields+0x135/0x16e
[ 361.440154] template_desc_init_fields+0x135/0x16e
[ 361.445803] ? kvm_sched_clock_read+0x9/0x18
[ 361.450404] ? lookup_template_desc+0x5/0x86
[ 361.455865] template_desc_init_fields+0x1d/0x20
[ 361.461323] lookup_template_desc+0x5d/0x86
[ 361.468040] ima_template_desc_current+0x20/0x32
[ 361.473911] hash_setup+0x18/0x109
[ 361.477425] ? hash_setup+0x109/0x109
[ 361.482667] init_ima+0x22/0xde
[ 361.487190] ? hash_setup+0x109/0x109
[ 361.491590] do_one_initcall+0x12e/0x312
[ 361.496145] ? rcu_read_lock_sched_held+0x47/0x4f
[ 361.500046] ? trace_initcall_level+0x5a/0x83
[ 361.503716] kernel_init_freeable+0x156/0x227
[ 361.507287] ? rest_init+0x96/0x96
[ 361.510157] kernel_init+0xd/0xd5
[ 361.513147] ret_from_fork+0x2e/0x38
[ 361.516143] BUG: sleeping function called from invalid context at mm/slab.h:417
[ 361.522899] in_atomic(): 1, irqs_disabled(): 0, pid: 1, name: swapper
[ 361.528723] 1 lock held by swapper/1:
[ 361.531230] #0: d45d28b0 (rcu_read_lock){....}, at: lookup_template_desc+0x5/0x86
[ 361.538251] CPU: 0 PID: 1 Comm: swapper Tainted: G T
5.1.0-rc2-00031-gd4f7b87 #1
[ 361.547940] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1
04/01/2014
[ 361.557169] Call Trace:
[ 361.560239] dump_stack+0x16/0x18
[ 361.565114] ___might_sleep+0x187/0x19b
[ 361.571819] __might_sleep+0x69/0x70
[ 361.578949] ? __fs_reclaim_release+0x1c/0x1e
[ 361.583895] slab_pre_alloc_hook+0x34/0x52
[ 361.588664] __kmalloc+0x4e/0xce
[ 361.592271] ? template_desc_init_fields+0x135/0x16e
[ 361.598572] template_desc_init_fields+0x135/0x16e
[ 361.604810] ? kvm_sched_clock_read+0x9/0x18
[ 361.609842] ? lookup_template_desc+0x5/0x86
[ 361.614891] template_desc_init_fields+0x1d/0x20
[ 361.623218] lookup_template_desc+0x5d/0x86
[ 361.630492] ima_template_desc_current+0x20/0x32
[ 361.637302] hash_setup+0x18/0x109
[ 361.642723] ? hash_setup+0x109/0x109
[ 361.646881] init_ima+0x22/0xde
[ 361.650262] ? hash_setup+0x109/0x109
[ 361.653602] do_one_initcall+0x12e/0x312
[ 361.657291] ? rcu_read_lock_sched_held+0x47/0x4f
[ 361.662532] ? trace_initcall_level+0x5a/0x83
[ 361.666753] kernel_init_freeable+0x156/0x227
[ 361.671714] ? rest_init+0x96/0x96
[ 361.675634] kernel_init+0xd/0xd5
[ 361.679397] ret_from_fork+0x2e/0x38
[ 361.688284] ima: No TPM chip found, activating TPM-bypass!
[ 361.696993] ima: Allocated hash algorithm: sha1
[ 361.704162] No architecture policies found
[ 361.772839] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[ 361.817671] 8021q: adding VLAN 0 to HW filter on device eth0
[ 361.829581] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 361.859124] Sending DHCP requests ., OK
[ 361.885160] IP-Config: Got DHCP answer from 10.0.2.2, my address is 10.0.2.15
[ 361.899013] IP-Config: Complete:
[ 361.904753] device=eth0, hwaddr=52:54:00:12:34:56, ipaddr=10.0.2.15,
mask=255.255.255.0, gw=10.0.2.2
[ 361.927790] host=vm-snb-yocto-i386-317, domain=, nis-domain=(none)
[ 361.942511] bootserver=10.0.2.2, rootserver=10.0.2.2, rootpath=
[ 361.942528] nameserver0=10.0.2.3
[ 361.976726] Bluetooth: Starting self testing
[ 361.983847] Bluetooth: Finished self testing
[ 362.102727] Freeing unused kernel image memory: 1292K
[ 362.120228] Write protecting kernel text and read-only data: 17360k
[ 362.133838] Run /init as init process
[ 362.186986] mount (143) used greatest stack depth: 6968 bytes left
[ 362.390143] cat (159) used greatest stack depth: 6800 bytes left
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/lkp/lkp/src/bin
/ #
[ 363.611091] process 224 (wget) attempted a POSIX timer syscall while
CONFIG_POSIX_TIMERS is not set
[ 363.677034] Kernel tests: Boot OK!
[ 363.677034] /lkp/lkp/src/bin/run-lkp
[ 363.677034]
RESULT_ROOT=/result/trinity/300s/vm-snb-yocto-i386/yocto-tiny-i386-2016-04-22.cgz/i386-randconfig-sb0-05181754/gcc-7/d4f7b87e55fb41849e9da958718134d2a34d3355/3
[ 363.677034]
job=/lkp/jobs/scheduled/vm-snb-yocto-i386-317/trinity-300s-yocto-tiny-i386-2016-04-22.cgz-d4f7b87e55fb4184-20190519-6838-84cphy-1.yaml
[ 363.677034] run-job
/lkp/jobs/scheduled/vm-snb-yocto-i386-317/trinity-300s-yocto-tiny-i386-2016-04-22.cgz-d4f7b87e55fb4184-20190519-6838-84cphy-1.yaml
[ 363.677034] /usr/bin/wget -q
http://inn:80/~lkp/cgi-bin/lkp-jobfile-append-var?job_file=/lkp/jobs/sche...
-O /dev/null
[ 366.803023] /lkp/lkp/src/monitors/heartbeat: line 9: vmstat: not found
[ 366.803023] /lkp/lkp/src/monitors/heartbeat: exec: line 23: vmstat: not found
[ 366.816173] target ucode:
[ 368.829982] Seeding trinity based on i386-randconfig-sb0-05181754
[ 368.829982] 2019-05-18 22:25:36 trinity -q -q -l off -s 1047496 -x get_robust_list -x
remap_file_pages -N 999999999 -X
[ 368.829982] Trinity v1.9-1-g865d3fc2 Dave Jones <davej(a)codemonkey.org.uk>
[ 368.829982] shm:0xb7689000-0xc3e35e14 (4 pages)
[ 368.829982] [main] Marking syscall get_robust_list (312) as to be disabled.
[ 368.829982] [main] Marking syscall remap_file_pages (257) as to be disabled.
[ 368.829982] Error getting nobody pwent (No such file or directory)
Elapsed time: 310
qemu-img create -f qcow2 disk-vm-snb-yocto-i386-317-0 256G
qemu-img create -f qcow2 disk-vm-snb-yocto-i386-317-1 256G
kvm=(
qemu-system-i386
-enable-kvm
-cpu SandyBridge
-kernel $kernel
-initrd initrd-vm-snb-yocto-i386-317
-m 2048
-smp 2
-device e1000,netdev=net0
-netdev user,id=net0
-boot order=nc
-no-reboot
-watchdog i6300esb
-watchdog-action debug
-rtc base=localtime
-drive file=disk-vm-snb-yocto-i386-317-0,media=disk,if=virtio
-drive file=disk-vm-snb-yocto-i386-317-1,media=disk,if=virtio
-serial stdio
-display none
-monitor null
)
append=(
ip=::::vm-snb-yocto-i386-317::dhcp
root=/dev/ram0
To reproduce:
# build kernel
cd linux
cp config-5.1.0-rc2-00031-gd4f7b87 .config
make HOSTCC=gcc-7 CC=gcc-7 ARCH=i386 olddefconfig
make HOSTCC=gcc-7 CC=gcc-7 ARCH=i386 prepare
make HOSTCC=gcc-7 CC=gcc-7 ARCH=i386 modules_prepare
make HOSTCC=gcc-7 CC=gcc-7 ARCH=i386 SHELL=/bin/bash
make HOSTCC=gcc-7 CC=gcc-7 ARCH=i386 bzImage
git clone
https://github.com/intel/lkp-tests.git
cd lkp-tests
bin/lkp qemu -k <bzImage> job-script # job-script is attached in this email
Thanks,
lkp