Greeting, FYI, we noticed WARNING:at_security/security.c:#append_ordered_lsm due to commit (built with gcc-11): commit: 98221e36622f4dde4afa923518706bd2c8870f00 ("[PATCH v5 2/8] LSM: Maintain a table of LSM attribute data") url: https://github.com/intel-lab-lkp/linux/commits/Casey-Schaufler/LSM-Maintain-a-table-of-LSM-attribute-data/20230110-030739 base: https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git 0ecc518e5c1a83fbfc6262d20d0df289eafc2207 patch link: https://lore.kernel.org/all/20230109180717.58855-3-casey@schaufler-ca.com/ patch subject: [PATCH v5 2/8] LSM: Maintain a table of LSM attribute data in testcase: boot 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): [ 0.472992][ T0] ------------[ cut here ]------------ [ 0.472996][ T0] builtin: out of LSM slots!? [ 0.474006][ T0] WARNING: CPU: 0 PID: 0 at security/security.c:173 append_ordered_lsm (security/security.c:173 (discriminator 1)) [ 0.474995][ T0] Modules linked in: [ 0.476300][ T0] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.2.0-rc1-00014-g98221e36622f #1 [ 0.477324][ T0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-debian-1.16.0-5 04/01/2014 [ 0.478996][ T0] RIP: 0010:append_ordered_lsm (security/security.c:173 (discriminator 1)) [ 0.480366][ T0] Code: 89 f5 53 48 89 fb e8 de fe ff ff 84 c0 75 79 48 63 05 54 76 13 00 83 f8 03 75 13 48 89 ee 48 c7 c7 4d e8 67 82 e8 66 97 55 fe <0f> 0b eb 5a 48 83 7b 18 00 75 08 48 c7 43 18 28 df a3 83 8d 50 01 All code ======== 0: 89 f5 mov %esi,%ebp 2: 53 push %rbx 3: 48 89 fb mov %rdi,%rbx 6: e8 de fe ff ff callq 0xfffffffffffffee9 b: 84 c0 test %al,%al d: 75 79 jne 0x88 f: 48 63 05 54 76 13 00 movslq 0x137654(%rip),%rax # 0x13766a 16: 83 f8 03 cmp $0x3,%eax 19: 75 13 jne 0x2e 1b: 48 89 ee mov %rbp,%rsi 1e: 48 c7 c7 4d e8 67 82 mov $0xffffffff8267e84d,%rdi 25: e8 66 97 55 fe callq 0xfffffffffe559790 2a:* 0f 0b ud2 <-- trapping instruction 2c: eb 5a jmp 0x88 2e: 48 83 7b 18 00 cmpq $0x0,0x18(%rbx) 33: 75 08 jne 0x3d 35: 48 c7 43 18 28 df a3 movq $0xffffffff83a3df28,0x18(%rbx) 3c: 83 3d: 8d 50 01 lea 0x1(%rax),%edx Code starting with the faulting instruction =========================================== 0: 0f 0b ud2 2: eb 5a jmp 0x5e 4: 48 83 7b 18 00 cmpq $0x0,0x18(%rbx) 9: 75 08 jne 0x13 b: 48 c7 43 18 28 df a3 movq $0xffffffff83a3df28,0x18(%rbx) 12: 83 13: 8d 50 01 lea 0x1(%rax),%edx [ 0.481996][ T0] RSP: 0000:ffffffff82e03e90 EFLAGS: 00010286 [ 0.483388][ T0] RAX: 0000000000000000 RBX: ffffffff83ae7938 RCX: c0000000ffff7fff [ 0.484995][ T0] RDX: 0000000000000000 RSI: 0000000000027ffb RDI: 0000000000000001 [ 0.486542][ T0] RBP: ffffffff8265f33d R08: 0000000000000000 R09: 00000000ffff7fff [ 0.487490][ T0] R10: ffffffff82e03d40 R11: ffffffff831d66e8 R12: ffff888100188bd3 [ 0.488517][ T0] R13: ffff888100188ba0 R14: 0000000000000001 R15: 0000000000000000 [ 0.489495][ T0] FS: 0000000000000000(0000) GS:ffff88842fc00000(0000) knlGS:0000000000000000 [ 0.490529][ T0] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 0.491364][ T0] CR2: ffff88843ffff000 CR3: 0000000002e0a000 CR4: 00000000000406b0 [ 0.492997][ T0] Call Trace: [ 0.494012][ T0] [ 0.494774][ T0] ordered_lsm_parse (security/security.c:307) [ 0.495996][ T0] ordered_lsm_init (security/security.c:379) [ 0.496996][ T0] security_init (security/security.c:461) [ 0.498304][ T0] start_kernel (init/main.c:1129) [ 0.499310][ T0] secondary_startup_64_no_verify (arch/x86/kernel/head_64.S:358) [ 0.500222][ T0] [ 0.501166][ T0] ---[ end trace 0000000000000000 ]--- If you fix the issue, kindly add following tag | Reported-by: kernel test robot | Link: https://lore.kernel.org/oe-lkp/202301110957.4f3cd38e-yujie.liu@intel.com To reproduce: # build kernel cd linux cp config-6.2.0-rc1-00014-g98221e36622f .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= modules_install cd 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 -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://github.com/intel/lkp-tests