All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <oliver.sang@intel.com>
To: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com>
Cc: <oe-lkp@lists.linux.dev>, <lkp@intel.com>,
	<apparmor@lists.ubuntu.com>, <linux-kernel@vger.kernel.org>,
	<john.johansen@canonical.com>, <paul@paul-moore.com>,
	<jmorris@namei.org>, <serge@hallyn.com>,
	<linux-security-module@vger.kernel.org>, <gautham.shenoy@amd.com>,
	<Santosh.Shukla@amd.com>, <Ananth.Narayan@amd.com>,
	<Raghavendra.KodsaraThimmappa@amd.com>, <paulmck@kernel.org>,
	<boqun.feng@gmail.com>, <vinicius.gomes@intel.com>,
	<mjguzik@gmail.com>, <dennis@kernel.org>, <tj@kernel.org>,
	<cl@linux.com>, <linux-mm@kvack.org>, <rcu@vger.kernel.org>,
	<oliver.sang@intel.com>
Subject: Re: [RFC 6/6] apparmor: Switch labels to percpu ref managed mode
Date: Wed, 18 Sep 2024 13:44:21 +0800	[thread overview]
Message-ID: <202409181358.c07681be-oliver.sang@intel.com> (raw)
In-Reply-To: <20240916050811.473556-7-Neeraj.Upadhyay@amd.com>



Hello,

kernel test robot noticed "WARNING:at_lib/percpu-refcount.c:#__percpu_ref_switch_to_managed" on:

commit: 59b177cbdc4908a728329b8eec742969a2285979 ("[RFC 6/6] apparmor: Switch labels to percpu ref managed mode")
url: https://github.com/intel-lab-lkp/linux/commits/Neeraj-Upadhyay/percpu-refcount-Add-managed-mode-for-RCU-released-objects/20240916-131210
base: https://git.kernel.org/cgit/linux/kernel/git/akpm/mm.git mm-nonmm-unstable
patch link: https://lore.kernel.org/all/20240916050811.473556-7-Neeraj.Upadhyay@amd.com/
patch subject: [RFC 6/6] apparmor: Switch labels to percpu ref managed mode

in testcase: boot

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

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


+------------------------------------------------------------------+------------+------------+
|                                                                  | 124f137c55 | 59b177cbdc |
+------------------------------------------------------------------+------------+------------+
| WARNING:at_lib/percpu-refcount.c:#__percpu_ref_switch_to_managed | 0          | 13         |
| RIP:__percpu_ref_switch_to_managed                               | 0          | 13         |
+------------------------------------------------------------------+------------+------------+


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@intel.com>
| Closes: https://lore.kernel.org/oe-lkp/202409181358.c07681be-oliver.sang@intel.com


[   13.041399][    T0] ------------[ cut here ]------------
[   13.042302][    T0] Percpu ref is already managed
[ 13.042302][ T0] WARNING: CPU: 0 PID: 0 at lib/percpu-refcount.c:151 __percpu_ref_switch_to_managed (lib/percpu-refcount.c:151 (discriminator 3)) 
[   13.042302][    T0] Modules linked in:
[   13.042302][    T0] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.11.0-rc6-00143-g59b177cbdc49 #12
[   13.042302][    T0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
[ 13.042302][ T0] RIP: 0010:__percpu_ref_switch_to_managed (lib/percpu-refcount.c:151 (discriminator 3)) 
[ 13.042302][ T0] Code: 03 75 58 65 48 ff 08 e8 c1 7c ee fe eb b1 80 3d 5d a2 ca 03 00 75 c5 48 c7 c7 c0 61 8f 91 c6 05 4d a2 ca 03 01 e8 03 af ce fe <0f> 0b eb ae 31 f6 48 89 df e8 05 f7 ff ff e9 54 fe ff ff e8 4b aa
All code
========
   0:	03 75 58             	add    0x58(%rbp),%esi
   3:	65 48 ff 08          	decq   %gs:(%rax)
   7:	e8 c1 7c ee fe       	callq  0xfffffffffeee7ccd
   c:	eb b1                	jmp    0xffffffffffffffbf
   e:	80 3d 5d a2 ca 03 00 	cmpb   $0x0,0x3caa25d(%rip)        # 0x3caa272
  15:	75 c5                	jne    0xffffffffffffffdc
  17:	48 c7 c7 c0 61 8f 91 	mov    $0xffffffff918f61c0,%rdi
  1e:	c6 05 4d a2 ca 03 01 	movb   $0x1,0x3caa24d(%rip)        # 0x3caa272
  25:	e8 03 af ce fe       	callq  0xfffffffffeceaf2d
  2a:*	0f 0b                	ud2    		<-- trapping instruction
  2c:	eb ae                	jmp    0xffffffffffffffdc
  2e:	31 f6                	xor    %esi,%esi
  30:	48 89 df             	mov    %rbx,%rdi
  33:	e8 05 f7 ff ff       	callq  0xfffffffffffff73d
  38:	e9 54 fe ff ff       	jmpq   0xfffffffffffffe91
  3d:	e8                   	.byte 0xe8
  3e:	4b aa                	rex.WXB stos %al,%es:(%rdi)

Code starting with the faulting instruction
===========================================
   0:	0f 0b                	ud2    
   2:	eb ae                	jmp    0xffffffffffffffb2
   4:	31 f6                	xor    %esi,%esi
   6:	48 89 df             	mov    %rbx,%rdi
   9:	e8 05 f7 ff ff       	callq  0xfffffffffffff713
   e:	e9 54 fe ff ff       	jmpq   0xfffffffffffffe67
  13:	e8                   	.byte 0xe8
  14:	4b aa                	rex.WXB stos %al,%es:(%rdi)
[   13.042302][    T0] RSP: 0000:ffffffff92407e00 EFLAGS: 00010082
[   13.042302][    T0] RAX: 0000000000000000 RBX: ffff8881008a6500 RCX: 1ffffffff24a3780
[   13.042302][    T0] RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000001
[   13.042302][    T0] RBP: ffff8881008a6508 R08: 0000000000000000 R09: fffffbfff24a3780
[   13.042302][    T0] R10: ffffffff9251bc03 R11: 0000000000000001 R12: ffff8881001f3500
[   13.042302][    T0] R13: ffff8881001f3500 R14: 0000000000000005 R15: 00000000000147b0
[   13.042302][    T0] FS:  0000000000000000(0000) GS:ffff8883a8400000(0000) knlGS:0000000000000000
[   13.042302][    T0] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   13.042302][    T0] CR2: ffff88843ffff000 CR3: 00000003b6e62000 CR4: 00000000000006f0
[   13.042302][    T0] Call Trace:
[   13.042302][    T0]  <TASK>
[ 13.042302][ T0] ? __warn (kernel/panic.c:741) 
[ 13.042302][ T0] ? __percpu_ref_switch_to_managed (lib/percpu-refcount.c:151 (discriminator 3)) 
[ 13.042302][ T0] ? report_bug (lib/bug.c:180 lib/bug.c:219) 
[ 13.042302][ T0] ? handle_bug (arch/x86/kernel/traps.c:239) 
[ 13.042302][ T0] ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1)) 
[ 13.042302][ T0] ? asm_exc_invalid_op (arch/x86/include/asm/idtentry.h:621) 
[ 13.042302][ T0] ? __percpu_ref_switch_to_managed (lib/percpu-refcount.c:151 (discriminator 3)) 
[ 13.042302][ T0] percpu_ref_switch_to_managed (include/linux/spinlock.h:406 lib/percpu-refcount.c:182) 
[ 13.042302][ T0] aa_alloc_root_ns (security/apparmor/policy_ns.c:383) 
[ 13.042302][ T0] ? aa_setup_dfa_engine (security/apparmor/lsm.c:2194) 
[ 13.042302][ T0] apparmor_init (security/apparmor/lsm.c:2235) 
[ 13.042302][ T0] initialize_lsm (security/security.c:263 (discriminator 3)) 
[ 13.042302][ T0] ordered_lsm_init (security/security.c:422 (discriminator 3)) 
[ 13.042302][ T0] security_init (security/security.c:475) 
[ 13.042302][ T0] start_kernel (init/main.c:1085) 
[ 13.042302][ T0] x86_64_start_reservations (arch/x86/kernel/head64.c:495) 
[ 13.042302][ T0] x86_64_start_kernel (arch/x86/kernel/head64.c:437 (discriminator 17)) 
[ 13.042302][ T0] common_startup_64 (arch/x86/kernel/head_64.S:421) 
[   13.042302][    T0]  </TASK>
[   13.042302][    T0] ---[ end trace 0000000000000000 ]---
[   13.044823][    T0] AppArmor: AppArmor initialized
[   13.062176][    T0] Mount-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[   13.065846][    T0] Mountpoint-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)



The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20240918/202409181358.c07681be-oliver.sang@intel.com



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


      reply	other threads:[~2024-09-18  5:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-16  5:08 [RFC 0/6] Managed Percpu Refcount Neeraj Upadhyay
2024-09-16  5:08 ` [RFC 1/6] percpu-refcount: Add managed mode for RCU released objects Neeraj Upadhyay
2024-09-16  5:08 ` [RFC 2/6] percpu-refcount: Add torture test for percpu refcount Neeraj Upadhyay
2024-09-19  0:47   ` kernel test robot
2024-09-16  5:08 ` [RFC 3/6] percpu-refcount: Extend managed mode to allow runtime switching Neeraj Upadhyay
2024-09-16 12:04   ` kernel test robot
2024-09-16 19:07   ` kernel test robot
2024-09-16  5:08 ` [RFC 4/6] percpu-refcount-torture: Extend test with runtime mode switches Neeraj Upadhyay
2024-09-19  2:11   ` kernel test robot
2024-09-16  5:08 ` [RFC 5/6] apparmor: Switch labels to percpu refcount in atomic mode Neeraj Upadhyay
2024-09-16  5:08 ` [RFC 6/6] apparmor: Switch labels to percpu ref managed mode Neeraj Upadhyay
2024-09-18  5:44   ` kernel test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202409181358.c07681be-oliver.sang@intel.com \
    --to=oliver.sang@intel.com \
    --cc=Ananth.Narayan@amd.com \
    --cc=Neeraj.Upadhyay@amd.com \
    --cc=Raghavendra.KodsaraThimmappa@amd.com \
    --cc=Santosh.Shukla@amd.com \
    --cc=apparmor@lists.ubuntu.com \
    --cc=boqun.feng@gmail.com \
    --cc=cl@linux.com \
    --cc=dennis@kernel.org \
    --cc=gautham.shenoy@amd.com \
    --cc=jmorris@namei.org \
    --cc=john.johansen@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mjguzik@gmail.com \
    --cc=oe-lkp@lists.linux.dev \
    --cc=paul@paul-moore.com \
    --cc=paulmck@kernel.org \
    --cc=rcu@vger.kernel.org \
    --cc=serge@hallyn.com \
    --cc=tj@kernel.org \
    --cc=vinicius.gomes@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.