Greeting, FYI, we noticed the following commit (built with clang-14): commit: 6cb78e41ce2e36d6f9fee21cecfc020c441328fe ("mm: percpu: use kmemleak_ignore_phys() instead of kmemleak_free()") https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable-rc.git linux-5.19.y in testcase: boot on test machine: qemu-system-i386 -enable-kvm -cpu SandyBridge -smp 2 -m 4G caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace): +--------------------------------------+------------+------------+ | | 7974b2039c | 6cb78e41ce | +--------------------------------------+------------+------------+ | WARNING:at_mm/slab.h:#cache_from_obj | 0 | 22 | | EIP:cache_from_obj | 0 | 22 | +--------------------------------------+------------+------------+ If you fix the issue, kindly add following tag Reported-by: kernel test robot Link: https://lore.kernel.org/r/202209151655.8e951e08-oliver.sang@intel.com [ 33.972489][ T0] ------------[ cut here ]------------ [ 33.973249][ T0] virt_to_cache: Object is not a Slab page! [ 33.974070][ T0] WARNING: CPU: 0 PID: 0 at mm/slab.h:644 cache_from_obj (slub.c:?) [ 33.975133][ T0] Modules linked in: [ 33.975666][ T0] CPU: 0 PID: 0 Comm: swapper Not tainted 5.19.1-00817-g6cb78e41ce2e #1 019fa4f662a1abbc4e7189ef459bce98e8100749 [ 33.977308][ T0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-debian-1.16.0-4 04/01/2014 [ 33.978857][ T0] EIP: cache_from_obj (slub.c:?) [ 33.979618][ T0] Code: c4 04 b8 98 91 64 c4 ba 01 00 00 00 31 c9 6a 01 e8 20 7d f3 ff 83 c4 04 68 63 e0 72 c3 68 d1 ff 99 c3 e8 4e 96 e0 ff 83 c4 08 <0f> 0b b8 b0 91 64 c4 ba 01 00 00 00 31 c9 6a 01 eb 0b b8 80 91 64 All code ======== 0: c4 (bad) 1: 04 b8 add $0xb8,%al 3: 98 cwtl 4: 91 xchg %eax,%ecx 5: 64 c4 fs (bad) 7: ba 01 00 00 00 mov $0x1,%edx c: 31 c9 xor %ecx,%ecx e: 6a 01 pushq $0x1 10: e8 20 7d f3 ff callq 0xfffffffffff37d35 15: 83 c4 04 add $0x4,%esp 18: 68 63 e0 72 c3 pushq $0xffffffffc372e063 1d: 68 d1 ff 99 c3 pushq $0xffffffffc399ffd1 22: e8 4e 96 e0 ff callq 0xffffffffffe09675 27: 83 c4 08 add $0x8,%esp 2a:* 0f 0b ud2 <-- trapping instruction 2c: b8 b0 91 64 c4 mov $0xc46491b0,%eax 31: ba 01 00 00 00 mov $0x1,%edx 36: 31 c9 xor %ecx,%ecx 38: 6a 01 pushq $0x1 3a: eb 0b jmp 0x47 3c: b8 .byte 0xb8 3d: 80 .byte 0x80 3e: 91 xchg %eax,%ecx 3f: 64 fs Code starting with the faulting instruction =========================================== 0: 0f 0b ud2 2: b8 b0 91 64 c4 mov $0xc46491b0,%eax 7: ba 01 00 00 00 mov $0x1,%edx c: 31 c9 xor %ecx,%ecx e: 6a 01 pushq $0x1 10: eb 0b jmp 0x1d 12: b8 .byte 0xb8 13: 80 .byte 0x80 14: 91 xchg %eax,%ecx 15: 64 fs [ 33.982587][ T0] EAX: 00000029 EBX: c52cc701 ECX: 00000000 EDX: c3f8bdb0 [ 33.983654][ T0] ESI: 00000001 EDI: 00000000 EBP: c3f8be48 ESP: c3f8be34 [ 33.984676][ T0] DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068 EFLAGS: 00210092 [ 33.985787][ T0] CR0: 80050033 CR2: ffcb1000 CR3: 048d2000 CR4: 00040690 [ 33.986896][ T0] Call Trace: [ 33.987423][ T0] kmem_cache_free (fbdev.c:?) [ 33.988108][ T0] ? startup_32_smp (??:?) [ 33.988909][ T0] create_object (kmemleak.c:?) [ 33.989570][ T0] kmemleak_alloc_percpu (fbdev.c:?) [ 33.990326][ T0] pcpu_alloc+0x5bf/0x740 [ 33.990946][ T0] __kmem_cache_create (fbdev.c:?) [ 33.991662][ T0] create_boot_cache (fbdev.c:?) [ 33.992315][ T0] kmem_cache_init (fbdev.c:?) [ 33.992946][ T0] mm_init (main.c:?) [ 33.993501][ T0] start_kernel (fbdev.c:?) [ 33.994190][ T0] i386_start_kernel (fbdev.c:?) [ 33.994908][ T0] startup_32_smp (??:?) [ 33.995622][ T0] irq event stamp: 0 [ 33.996183][ T0] hardirqs last enabled at (0): 0x0 [ 33.997151][ T0] hardirqs last disabled at (0): 0x0 [ 33.998135][ T0] softirqs last enabled at (0): 0x0 [ 33.999061][ T0] softirqs last disabled at (0): 0x0 [ 33.999992][ T0] ---[ end trace 0000000000000000 ]--- [ 34.000809][ T0] kmemleak: Cannot insert 0xe59f8d78 into the object search tree (overlaps existing) [ 34.002187][ T0] CPU: 0 PID: 0 Comm: swapper Tainted: G W 5.19.1-00817-g6cb78e41ce2e #1 019fa4f662a1abbc4e7189ef459bce98e8100749 [ 34.004143][ T0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-debian-1.16.0-4 04/01/2014 [ 34.005533][ T0] Call Trace: [ 34.005967][ T0] dump_stack_lvl (fbdev.c:?) [ 34.006717][ T0] ? _printk (fbdev.c:?) [ 34.007444][ T0] create_object (kmemleak.c:?) [ 34.008136][ T0] kmemleak_alloc_percpu (fbdev.c:?) [ 34.008916][ T0] pcpu_alloc+0x5bf/0x740 [ 34.009571][ T0] __kmem_cache_create (fbdev.c:?) [ 34.010344][ T0] create_boot_cache (fbdev.c:?) [ 34.011053][ T0] kmem_cache_init (fbdev.c:?) [ 34.011741][ T0] mm_init (main.c:?) [ 34.012311][ T0] start_kernel (fbdev.c:?) [ 34.012970][ T0] i386_start_kernel (fbdev.c:?) [ 34.013745][ T0] startup_32_smp (??:?) [ 34.014464][ T0] kmemleak: Object 0xe59e0000 (size 131072): [ 34.015329][ T0] kmemleak: comm "swapper", pid 0, jiffies 4294937296 [ 34.016310][ T0] kmemleak: min_count = -1 [ 34.016911][ T0] kmemleak: count = 0 [ 34.017491][ T0] kmemleak: flags = 0x1 [ 34.018066][ T0] kmemleak: checksum = 0 [ 34.018694][ T0] kmemleak: backtrace: [ 34.019313][ T0] kmemleak_free_part_phys (fbdev.c:?) [ 34.020165][ T0] memblock_phys_free (fbdev.c:?) [ 34.020923][ T0] memblock_free (fbdev.c:?) [ 34.021697][ T0] pcpu_embed_first_chunk (fbdev.c:?) [ 34.022547][ T0] setup_per_cpu_areas (fbdev.c:?) [ 34.023334][ T0] start_kernel (fbdev.c:?) [ 34.024061][ T0] i386_start_kernel (fbdev.c:?) [ 34.024856][ T0] startup_32_smp (??:?) [ 34.026443][ T0] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1 [ 34.028285][ T0] [ 34.028623][ T0] ********************************************************** [ 34.029672][ T0] ** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE ** [ 34.030703][ T0] ** ** [ 34.031657][ T0] ** trace_printk() being used. Allocating extra memory. ** [ 34.032660][ T0] ** ** [ 34.033657][ T0] ** This means that this is a DEBUG kernel and it is ** [ 34.034668][ T0] ** unsafe for production use. ** [ 34.035789][ T0] ** ** [ 34.036837][ T0] ** If you see this message and you are not debugging ** [ 34.037857][ T0] ** the kernel, report this immediately to your vendor! ** [ 34.038919][ T0] ** ** [ 34.039972][ T0] ** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE ** [ 34.040984][ T0] ********************************************************** [ 34.043003][ T0] trace event string verifier disabled [ 34.044122][ T0] Running RCU self tests [ 34.044678][ T0] rcu: Hierarchical RCU implementation. [ 34.045392][ T0] rcu: RCU lockdep checking is enabled. [ 34.046159][ T0] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2. [ 34.047130][ T0] rcu: RCU callback double-/use-after-free debug is enabled. [ 34.048105][ T0] RCU CPU stall warnings timeout set to 100 (rcu_cpu_stall_timeout). [ 34.049266][ T0] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies. [ 34.050372][ T0] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2 [ 34.073269][ T0] NR_IRQS: 2304, nr_irqs: 440, preallocated irqs: 16 [ 34.074623][ T0] rcu: srcu_init: Setting srcu_struct sizes based on contention. [ 34.083755][ T0] Console: colour VGA+ 80x25 [ 34.196595][ T0] printk: console [tty0] enabled [ 34.197672][ T0] printk: console [ttyS0] enabled [ 34.199362][ T0] printk: bootconsole [earlyser0] disabled [ 34.201285][ T0] serial port 0 not yet initialized [ 34.206228][ T0] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar [ 34.208032][ T0] ... MAX_LOCKDEP_SUBCLASSES: 8 [ 34.209064][ T0] ... MAX_LOCK_DEPTH: 48 [ 34.210073][ T0] ... MAX_LOCKDEP_KEYS: 8192 [ 34.211155][ T0] ... CLASSHASH_SIZE: 4096 [ 34.212250][ T0] ... MAX_LOCKDEP_ENTRIES: 32768 [ 34.213341][ T0] ... MAX_LOCKDEP_CHAINS: 65536 [ 34.214439][ T0] ... CHAINHASH_SIZE: 32768 [ 34.215605][ T0] memory used by lock dependency info: 3805 kB [ 34.216929][ T0] memory used for stack traces: 2112 kB [ 34.218063][ T0] per task-struct memory footprint: 1344 bytes [ 34.219565][ T0] ACPI: Core revision 20220331 [ 34.221210][ T0] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604467 ns [ 34.223424][ T0] APIC: Switch to symmetric I/O mode setup [ 34.224641][ T0] Enabling APIC mode: Flat. Using 1 I/O APICs [ 34.225950][ T0] masked ExtINT on CPU#0 [ 34.227852][ T0] ENABLING IO-APIC IRQs [ 34.228798][ T0] init IO_APIC IRQs [ 34.229669][ T0] apic 0 pin 0 not connected [ 34.230706][ T0] IOAPIC[0]: Preconfigured routing entry (0-1 -> IRQ 1 Level:0 ActiveLow:0) [ 34.232756][ T0] IOAPIC[0]: Preconfigured routing entry (0-2 -> IRQ 0 Level:0 ActiveLow:0) [ 34.234664][ T0] IOAPIC[0]: Preconfigured routing entry (0-3 -> IRQ 3 Level:0 ActiveLow:0) To reproduce: # build kernel cd linux cp config-5.19.1-00817-g6cb78e41ce2e .config make HOSTCC=clang-14 CC=clang-14 ARCH=i386 olddefconfig prepare modules_prepare bzImage modules make HOSTCC=clang-14 CC=clang-14 ARCH=i386 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://01.org/lkp