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: <202209130723.5b2c641a-oliver.sang@intel.com>
Date:   Tue, 13 Sep 2022 07:19:15 +0800
From:   kernel test robot <oliver.sang@...el.com>
To:     Peter Zijlstra <peterz@...radead.org>
CC:     <lkp@...ts.01.org>, <lkp@...el.com>,
        <linux-kernel@...r.kernel.org>, <x86@...nel.org>,
        <linux-perf-users@...r.kernel.org>
Subject: [perf]  f3c0eba287: WARNING:at_kernel/events/core.c:#perf_iterate_ctx


Greeting,

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

commit: f3c0eba287049237b23d1300376768293eb89e69 ("perf: Add a few assertions")
https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git perf/core

in testcase: trinity
version: trinity-i386-4d2343bd-1_20200320
with following parameters:

	runtime: 300s
	group: group-00

test-description: Trinity is a linux system call fuzz tester.
test-url: http://codemonkey.org.uk/projects/trinity/


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

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>
Link: https://lore.kernel.org/r/202209130723.5b2c641a-oliver.sang@intel.com


[   61.127651][ T3577] ------------[ cut here ]------------
[ 61.134224][ T3577] WARNING: CPU: 1 PID: 3577 at kernel/events/core.c:2233 perf_iterate_ctx (kernel/events/core.c:2233 kernel/events/core.c:2245 kernel/events/core.c:2242 kernel/events/core.c:7594) 
[   61.140456][ T3577] Modules linked in: sr_mod cdrom sg bochs drm_vram_helper ata_generic drm_ttm_helper ttm ppdev intel_rapl_msr ata_piix intel_rapl_common crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel drm_kms_helper rapl libata syscopyarea parport_pc sysfillrect joydev parport sysimgblt serio_raw fb_sys_fops i2c_piix4 ip_tables
[   61.152372][ T3577] CPU: 1 PID: 3577 Comm: trinity-main Not tainted 6.0.0-rc2-00043-gf3c0eba28704 #1
[   61.155234][ T3577] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-debian-1.16.0-4 04/01/2014
[ 61.158149][ T3577] RIP: 0010:perf_iterate_ctx (kernel/events/core.c:2233 kernel/events/core.c:2245 kernel/events/core.c:2242 kernel/events/core.c:7594) 
[ 61.160778][ T3577] Code: 0f 85 f5 02 00 00 8b 05 36 ca 75 04 85 c0 74 1c 65 8b 05 c7 5e 8c 7e 85 c0 75 11 65 8b 05 b0 5c 8c 7e 85 c0 0f 84 e7 00 00 00 <0f> 0b 49 8d be 90 00 00 00 48 89 f8 48 c1 e8 03 42 80 3c 38 00 0f
All code
========
   0:	0f 85 f5 02 00 00    	jne    0x2fb
   6:	8b 05 36 ca 75 04    	mov    0x475ca36(%rip),%eax        # 0x475ca42
   c:	85 c0                	test   %eax,%eax
   e:	74 1c                	je     0x2c
  10:	65 8b 05 c7 5e 8c 7e 	mov    %gs:0x7e8c5ec7(%rip),%eax        # 0x7e8c5ede
  17:	85 c0                	test   %eax,%eax
  19:	75 11                	jne    0x2c
  1b:	65 8b 05 b0 5c 8c 7e 	mov    %gs:0x7e8c5cb0(%rip),%eax        # 0x7e8c5cd2
  22:	85 c0                	test   %eax,%eax
  24:	0f 84 e7 00 00 00    	je     0x111
  2a:*	0f 0b                	ud2    		<-- trapping instruction
  2c:	49 8d be 90 00 00 00 	lea    0x90(%r14),%rdi
  33:	48 89 f8             	mov    %rdi,%rax
  36:	48 c1 e8 03          	shr    $0x3,%rax
  3a:	42 80 3c 38 00       	cmpb   $0x0,(%rax,%r15,1)
  3f:	0f                   	.byte 0xf

Code starting with the faulting instruction
===========================================
   0:	0f 0b                	ud2    
   2:	49 8d be 90 00 00 00 	lea    0x90(%r14),%rdi
   9:	48 89 f8             	mov    %rdi,%rax
   c:	48 c1 e8 03          	shr    $0x3,%rax
  10:	42 80 3c 38 00       	cmpb   $0x0,(%rax,%r15,1)
  15:	0f                   	.byte 0xf
[   61.167206][ T3577] RSP: 0018:ffffc90004d4f918 EFLAGS: 00010202
[   61.169972][ T3577] RAX: 0000000000000001 RBX: ffff8881500fc908 RCX: 0000000000000000
[   61.172750][ T3577] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffffffff856d5bd8
[   61.175842][ T3577] RBP: 0000000000000000 R08: ffff88814ccddbc0 R09: ffffffff871d2187
[   61.178698][ T3577] R10: fffffbfff0e3a430 R11: 0000000000000001 R12: ffffffff8177b400
[   61.181411][ T3577] R13: ffffc90004d4fac0 R14: ffff88814ccdd9a0 R15: dffffc0000000000
[   61.184115][ T3577] FS:  0000000000000000(0000) GS:ffff88839d500000(0063) knlGS:00000000f7f5cb00
[   61.186880][ T3577] CS:  0010 DS: 002b ES: 002b CR0: 0000000080050033
[   61.189515][ T3577] CR2: 0000000057939010 CR3: 00000001ca68c000 CR4: 00000000000406e0
[   61.192223][ T3577] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   61.194895][ T3577] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[   61.197565][ T3577] Call Trace:
[   61.200001][ T3577]  <TASK>
[ 61.202372][ T3577] ? lock_is_held_type (kernel/locking/lockdep.c:5407 kernel/locking/lockdep.c:5709) 
[ 61.204882][ T3577] ? perf_event_text_poke_output (kernel/events/core.c:8275) 
[ 61.207454][ T3577] perf_iterate_sb (kernel/events/core.c:7652 (discriminator 2)) 
[ 61.209949][ T3577] perf_event_mmap_event (kernel/events/core.c:8456) 
[ 61.212371][ T3577] ? perf_event_task (kernel/events/core.c:8341) 
[ 61.214770][ T3577] ? change_p4d_range (mm/mprotect.c:437 mm/mprotect.c:458) 
[ 61.217125][ T3577] perf_event_mmap (kernel/events/core.c:8593) 
[ 61.219413][ T3577] ? perf_event_namespaces (kernel/events/core.c:8562) 
[ 61.221755][ T3577] ? vma_set_page_prot (mm/mmap.c:96) 
[ 61.224070][ T3577] mprotect_fixup (mm/mprotect.c:651) 
[ 61.226264][ T3577] ? change_protection (mm/mprotect.c:541) 
[ 61.228497][ T3577] ? rwsem_down_write_slowpath (kernel/locking/rwsem.c:1561) 
[ 61.230860][ T3577] ? lock_is_held_type (kernel/locking/lockdep.c:5407 kernel/locking/lockdep.c:5709) 
[ 61.233209][ T3577] do_mprotect_pkey (mm/mprotect.c:781) 
[ 61.235473][ T3577] ? mprotect_fixup (mm/mprotect.c:663) 
[ 61.237567][ T3577] ? __lock_release (kernel/locking/lockdep.c:5342) 
[ 61.239520][ T3577] ? lock_downgrade (kernel/locking/lockdep.c:5318) 
[ 61.241497][ T3577] __ia32_sys_mprotect (mm/mprotect.c:804) 
[ 61.243442][ T3577] __do_fast_syscall_32 (arch/x86/entry/common.c:112 arch/x86/entry/common.c:178) 
[ 61.245343][ T3577] ? lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4526) 
[ 61.247271][ T3577] ? __do_fast_syscall_32 (arch/x86/entry/common.c:183) 
[ 61.249089][ T3577] ? lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4526) 
[ 61.250992][ T3577] ? __do_fast_syscall_32 (arch/x86/entry/common.c:183) 
[ 61.252846][ T3577] ? lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4526) 
[ 61.254780][ T3577] ? __do_fast_syscall_32 (arch/x86/entry/common.c:183) 
[ 61.256627][ T3577] do_fast_syscall_32 (arch/x86/entry/common.c:203) 
[ 61.258401][ T3577] entry_SYSENTER_compat_after_hwframe (arch/x86/entry/entry_64_compat.S:122) 
[   61.260235][ T3577] RIP: 0023:0xf7f61549
[ 61.261956][ T3577] Code: 03 74 c0 01 10 05 03 74 b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00
All code
========
   0:	03 74 c0 01          	add    0x1(%rax,%rax,8),%esi
   4:	10 05 03 74 b8 01    	adc    %al,0x1b87403(%rip)        # 0x1b8740d
   a:	10 06                	adc    %al,(%rsi)
   c:	03 74 b4 01          	add    0x1(%rsp,%rsi,4),%esi
  10:	10 07                	adc    %al,(%rdi)
  12:	03 74 b0 01          	add    0x1(%rax,%rsi,4),%esi
  16:	10 08                	adc    %cl,(%rax)
  18:	03 74 d8 01          	add    0x1(%rax,%rbx,8),%esi
  1c:	00 00                	add    %al,(%rax)
  1e:	00 00                	add    %al,(%rax)
  20:	00 51 52             	add    %dl,0x52(%rcx)
  23:	55                   	push   %rbp
  24:	89 e5                	mov    %esp,%ebp
  26:	0f 34                	sysenter 
  28:	cd 80                	int    $0x80
  2a:*	5d                   	pop    %rbp		<-- trapping instruction
  2b:	5a                   	pop    %rdx
  2c:	59                   	pop    %rcx
  2d:	c3                   	retq   
  2e:	90                   	nop
  2f:	90                   	nop
  30:	90                   	nop
  31:	90                   	nop
  32:	8d b4 26 00 00 00 00 	lea    0x0(%rsi,%riz,1),%esi
  39:	8d b4 26 00 00 00 00 	lea    0x0(%rsi,%riz,1),%esi

Code starting with the faulting instruction
===========================================
   0:	5d                   	pop    %rbp
   1:	5a                   	pop    %rdx
   2:	59                   	pop    %rcx
   3:	c3                   	retq   
   4:	90                   	nop
   5:	90                   	nop
   6:	90                   	nop
   7:	90                   	nop
   8:	8d b4 26 00 00 00 00 	lea    0x0(%rsi,%riz,1),%esi
   f:	8d b4 26 00 00 00 00 	lea    0x0(%rsi,%riz,1),%esi


To reproduce:

        # build kernel
	cd linux
	cp config-6.0.0-rc2-00043-gf3c0eba28704 .config
	make HOSTCC=gcc-11 CC=gcc-11 ARCH=x86_64 olddefconfig prepare modules_prepare bzImage modules
	make HOSTCC=gcc-11 CC=gcc-11 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

        # 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-6.0.0-rc2-00043-gf3c0eba28704" of type "text/plain" (168732 bytes)

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

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

View attachment "trinity" of type "text/plain" (6149 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ