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: <202410251648.683b17b1-lkp@intel.com>
Date: Fri, 25 Oct 2024 16:29:40 +0800
From: kernel test robot <oliver.sang@...el.com>
To: Peter Zijlstra <peterz@...radead.org>
CC: <oe-lkp@...ts.linux.dev>, <lkp@...el.com>,
	<linux-perf-users@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<oliver.sang@...el.com>
Subject: [peterz-queue:perf/pmu-unregister] [perf] d4700c3ee4:
 WARNING:at_kernel/jump_label.c:#static_key_dec_not_one



Hello,

kernel test robot noticed "WARNING:at_kernel/jump_label.c:#static_key_dec_not_one" on:

commit: d4700c3ee4c19fc8ff8925709b3227ddb9b64b1a ("perf: Simplify perf_event_alloc() error path")
https://git.kernel.org/cgit/linux/kernel/git/peterz/queue.git perf/pmu-unregister

in testcase: trinity
version: trinity-x86_64-ba2360ed-1_20240923
with following parameters:

	runtime: 300s
	group: group-02
	nr_groups: 5



config: x86_64-randconfig-073-20241023
compiler: gcc-11
test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G

(please refer to attached dmesg/kmsg for entire log/backtrace)


+--------------------------------------------------------+------------+------------+
|                                                        | 07dec8f2ff | d4700c3ee4 |
+--------------------------------------------------------+------------+------------+
| WARNING:at_kernel/jump_label.c:#static_key_dec_not_one | 0          | 5          |
| RIP:static_key_dec_not_one                             | 0          | 5          |
+--------------------------------------------------------+------------+------------+


If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <oliver.sang@...el.com>
| Closes: https://lore.kernel.org/oe-lkp/202410251648.683b17b1-lkp@intel.com


[  287.833484][ T3554] ------------[ cut here ]------------
[ 287.834530][ T3554] WARNING: CPU: 0 PID: 3554 at kernel/jump_label.c:282 static_key_dec_not_one (kernel/jump_label.c:282 (discriminator 1)) 
[  287.836443][ T3554] Modules linked in: crc32_pclmul ghash_clmulni_intel sha512_ssse3 rapl intel_agp intel_gtt psmouse agpgart tiny_power_button button input_leds fuse configfs dmi_sysfs qemu_fw_cfg aesni_intel
[  287.839884][ T3554] CPU: 0 UID: 65534 PID: 3554 Comm: trinity-main Not tainted 6.12.0-rc2-00019-gd4700c3ee4c1 #1
[  287.841724][ T3554] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
[ 287.843605][ T3554] RIP: 0010:static_key_dec_not_one (kernel/jump_label.c:282 (discriminator 1)) 
[ 287.844669][ T3554] Code: 83 c0 03 38 d0 7c 0c 84 d2 74 08 4c 89 ff e8 1d b5 0e 00 41 8b 07 4d 8d 74 24 e0 41 89 44 24 e0 85 c0 79 04 0f 0b eb 40 75 07 <0f> 0b 41 b0 01 eb 3a 83 f8 01 74 32 44 8d 68 ff be 04 00 00 00 4c
All code
========
   0:	83 c0 03             	add    $0x3,%eax
   3:	38 d0                	cmp    %dl,%al
   5:	7c 0c                	jl     0x13
   7:	84 d2                	test   %dl,%dl
   9:	74 08                	je     0x13
   b:	4c 89 ff             	mov    %r15,%rdi
   e:	e8 1d b5 0e 00       	call   0xeb530
  13:	41 8b 07             	mov    (%r15),%eax
  16:	4d 8d 74 24 e0       	lea    -0x20(%r12),%r14
  1b:	41 89 44 24 e0       	mov    %eax,-0x20(%r12)
  20:	85 c0                	test   %eax,%eax
  22:	79 04                	jns    0x28
  24:	0f 0b                	ud2
  26:	eb 40                	jmp    0x68
  28:	75 07                	jne    0x31
  2a:*	0f 0b                	ud2		<-- trapping instruction
  2c:	41 b0 01             	mov    $0x1,%r8b
  2f:	eb 3a                	jmp    0x6b
  31:	83 f8 01             	cmp    $0x1,%eax
  34:	74 32                	je     0x68
  36:	44 8d 68 ff          	lea    -0x1(%rax),%r13d
  3a:	be 04 00 00 00       	mov    $0x4,%esi
  3f:	4c                   	rex.WR

Code starting with the faulting instruction
===========================================
   0:	0f 0b                	ud2
   2:	41 b0 01             	mov    $0x1,%r8b
   5:	eb 3a                	jmp    0x41
   7:	83 f8 01             	cmp    $0x1,%eax
   a:	74 32                	je     0x3e
   c:	44 8d 68 ff          	lea    -0x1(%rax),%r13d
  10:	be 04 00 00 00       	mov    $0x4,%esi
  15:	4c                   	rex.WR
[  287.848166][ T3554] RSP: 0018:ffffc90001c9fbd8 EFLAGS: 00010246
[  287.849416][ T3554] RAX: 0000000000000000 RBX: 1ffff92000393f7b RCX: fffffbfff0a1eb45
[  287.850773][ T3554] RDX: fffffbfff0a1eb00 RSI: 0000000000000004 RDI: ffffffff850f5a20
[  287.852296][ T3554] RBP: ffffc90001c9fc40 R08: fffffbfff0a1eb45 R09: 0000000000000000
[  287.853673][ T3554] R10: ffffffff8145e5ac R11: ffffffff850f5a23 R12: ffffc90001c9fc18
[  287.855035][ T3554] R13: dffffc0000000000 R14: ffffc90001c9fbf8 R15: ffffffff850f5a20
[  287.856516][ T3554] FS:  00007f77a3aed740(0000) GS:ffffffff834fe000(0000) knlGS:0000000000000000
[  287.858053][ T3554] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  287.859312][ T3554] CR2: 00005597f0734028 CR3: 0000000116316000 CR4: 00000000000406f0
[  287.860753][ T3554] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  287.862184][ T3554] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  287.863597][ T3554] Call Trace:
[  287.864232][ T3554]  <TASK>
[ 287.864777][ T3554] ? show_regs (arch/x86/kernel/dumpstack.c:479) 
[ 287.865664][ T3554] ? static_key_dec_not_one (kernel/jump_label.c:282 (discriminator 1)) 
[ 287.866597][ T3554] ? __warn (kernel/panic.c:748) 
[ 287.867328][ T3554] ? static_key_dec_not_one (kernel/jump_label.c:282 (discriminator 1)) 
[ 287.868300][ T3554] ? report_bug (lib/bug.c:201 lib/bug.c:219) 
[ 287.869181][ T3554] ? handle_bug (arch/x86/kernel/traps.c:285) 
[ 287.869961][ T3554] ? exc_invalid_op (arch/x86/kernel/traps.c:309 (discriminator 1)) 
[ 287.870811][ T3554] ? asm_exc_invalid_op (arch/x86/include/asm/idtentry.h:621) 
[ 287.871907][ T3554] ? static_key_dec_not_one (arch/x86/include/asm/atomic.h:23 include/linux/atomic/atomic-arch-fallback.h:457 include/linux/atomic/atomic-instrumented.h:33 kernel/jump_label.c:268) 
[ 287.872864][ T3554] ? static_key_dec_not_one (kernel/jump_label.c:282 (discriminator 1)) 
[ 287.873795][ T3554] ? static_key_dec_not_one (arch/x86/include/asm/atomic.h:23 include/linux/atomic/atomic-arch-fallback.h:457 include/linux/atomic/atomic-instrumented.h:33 kernel/jump_label.c:268) 
[ 287.874700][ T3554] ? static_key_set_mod (kernel/jump_label.c:254) 
[ 287.875732][ T3554] __static_key_slow_dec_cpuslocked (kernel/jump_label.c:297) 
[ 287.876874][ T3554] static_key_slow_dec (kernel/jump_label.c:337 (discriminator 3)) 
[ 287.877765][ T3554] sw_perf_event_destroy (kernel/events/core.c:10232 (discriminator 3) kernel/events/core.c:10245 (discriminator 3) kernel/events/core.c:10305 (discriminator 3)) 
[ 287.878723][ T3554] __free_event (kernel/events/core.c:5338) 
[ 287.879557][ T3554] perf_event_alloc (include/linux/err.h:41 kernel/events/core.c:12393) 
[ 287.880509][ T3554] __do_sys_perf_event_open (kernel/events/core.c:12802) 
[ 287.881560][ T3554] ? perf_remove_from_context (kernel/events/core.c:12696) 
[ 287.882663][ T3554] ? rcu_read_unlock (include/linux/rcupdate.h:347 (discriminator 9) include/linux/rcupdate.h:880 (discriminator 9)) 
[ 287.883569][ T3554] ? __this_cpu_preempt_check (lib/smp_processor_id.c:67) 
[ 287.884565][ T3554] ? lock_release (kernel/locking/lockdep.c:467 kernel/locking/lockdep.c:5848) 
[ 287.885498][ T3554] __x64_sys_perf_event_open (kernel/events/core.c:12693) 
[ 287.886445][ T3554] x64_sys_call (kbuild/obj/consumer/x86_64-randconfig-073-20241023/./arch/x86/include/generated/asm/syscalls_64.h:299) 
[ 287.887311][ T3554] do_syscall_64 (arch/x86/entry/common.c:52 arch/x86/entry/common.c:83) 
[ 287.888193][ T3554] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) 
[  287.889316][ T3554] RIP: 0033:0x7f77a3bf1719
[ 287.890122][ T3554] Code: 08 89 e8 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d b7 06 0d 00 f7 d8 64 89 01 48
All code
========
   0:	08 89 e8 5b 5d c3    	or     %cl,-0x3ca2a418(%rcx)
   6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
   d:	00 00 00 
  10:	90                   	nop
  11:	48 89 f8             	mov    %rdi,%rax
  14:	48 89 f7             	mov    %rsi,%rdi
  17:	48 89 d6             	mov    %rdx,%rsi
  1a:	48 89 ca             	mov    %rcx,%rdx
  1d:	4d 89 c2             	mov    %r8,%r10
  20:	4d 89 c8             	mov    %r9,%r8
  23:	4c 8b 4c 24 08       	mov    0x8(%rsp),%r9
  28:	0f 05                	syscall
  2a:*	48 3d 01 f0 ff ff    	cmp    $0xfffffffffffff001,%rax		<-- trapping instruction
  30:	73 01                	jae    0x33
  32:	c3                   	ret
  33:	48 8b 0d b7 06 0d 00 	mov    0xd06b7(%rip),%rcx        # 0xd06f1
  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                   	ret
   9:	48 8b 0d b7 06 0d 00 	mov    0xd06b7(%rip),%rcx        # 0xd06c7
  10:	f7 d8                	neg    %eax
  12:	64 89 01             	mov    %eax,%fs:(%rcx)
  15:	48                   	rex.W


The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20241025/202410251648.683b17b1-lkp@intel.com



-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ