# git rev-parse -q --verify ae085d7f9365de7da27ab5c0d16b12d51ea7fca9^{commit} ae085d7f9365de7da27ab5c0d16b12d51ea7fca9 already have revision, skipping fetch # git checkout -q -f -B kisskb ae085d7f9365de7da27ab5c0d16b12d51ea7fca9 # git clean -qxdf # < git log -1 # commit ae085d7f9365de7da27ab5c0d16b12d51ea7fca9 # Author: Muchun Song # Date: Sun Mar 27 13:18:52 2022 +0800 # # mm: kfence: fix missing objcg housekeeping for SLAB # # The objcg is not cleared and put for kfence object when it is freed, # which could lead to memory leak for struct obj_cgroup and wrong # statistics of NR_SLAB_RECLAIMABLE_B or NR_SLAB_UNRECLAIMABLE_B. # # Since the last freed object's objcg is not cleared, # mem_cgroup_from_obj() could return the wrong memcg when this kfence # object, which is not charged to any objcgs, is reallocated to other # users. # # A real word issue [1] is caused by this bug. # # Link: https://lore.kernel.org/all/000000000000cabcb505dae9e577@google.com/ [1] # Reported-by: syzbot+f8c45ccc7d5d45fc5965@syzkaller.appspotmail.com # Fixes: d3fb45f370d9 ("mm, kfence: insert KFENCE hooks for SLAB") # Signed-off-by: Muchun Song # Cc: Dmitry Vyukov # Cc: Marco Elver # Cc: Andrew Morton # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux-ld --version # < git log --format=%s --max-count=1 ae085d7f9365de7da27ab5c0d16b12d51ea7fca9 # < make -s -j 8 ARCH=x86_64 O=/kisskb/build/linus-rand_x86_64-randconfig_x86_64-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux- randconfig # Added to kconfig CONFIG_STANDALONE=y # Added to kconfig CONFIG_PREVENT_FIRMWARE_BUILD=y # Added to kconfig CONFIG_CC_STACKPROTECTOR_STRONG=n # Added to kconfig CONFIG_GCC_PLUGINS=n # Added to kconfig CONFIG_GCC_PLUGIN_CYC_COMPLEXITY=n # Added to kconfig CONFIG_GCC_PLUGIN_SANCOV=n # Added to kconfig CONFIG_GCC_PLUGIN_LATENT_ENTROPY=n # Added to kconfig CONFIG_BPF_PRELOAD=n # Added to kconfig # < make -s -j 8 ARCH=x86_64 O=/kisskb/build/linus-rand_x86_64-randconfig_x86_64-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux- help # make -s -j 8 ARCH=x86_64 O=/kisskb/build/linus-rand_x86_64-randconfig_x86_64-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux- olddefconfig .config:6066:warning: override: reassigning to symbol STANDALONE .config:6069:warning: override: reassigning to symbol GCC_PLUGINS .config:6073:warning: override: reassigning to symbol BPF_PRELOAD # make -s -j 8 ARCH=x86_64 O=/kisskb/build/linus-rand_x86_64-randconfig_x86_64-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux- vmlinux.o: warning: objtool: vmx_vcpu_enter_exit()+0x25: call to context_tracking_enabled_this_cpu() leaves .noinstr.text section vmlinux.o: warning: objtool: svm_vcpu_enter_exit()+0x93: call to context_tracking_enabled_this_cpu() leaves .noinstr.text section vmlinux.o: warning: objtool: enter_from_user_mode()+0x18: call to __kcsan_check_access() leaves .noinstr.text section vmlinux.o: warning: objtool: syscall_enter_from_user_mode()+0x1d: call to __kcsan_check_access() leaves .noinstr.text section vmlinux.o: warning: objtool: syscall_enter_from_user_mode_prepare()+0x18: call to __kcsan_check_access() leaves .noinstr.text section vmlinux.o: warning: objtool: irqentry_enter_from_user_mode()+0x18: call to __kcsan_check_access() leaves .noinstr.text section /opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux-ld: /opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux-ld: DWARF error: could not find abbrev number 4566 drivers/platform/x86/amd-pmc.o: in function `amd_pmc_remove': amd-pmc.c:(.text+0x2e): undefined reference to `acpi_unregister_lps0_dev' /opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux-ld: drivers/platform/x86/amd-pmc.o: in function `amd_pmc_probe': amd-pmc.c:(.text+0xf5a): undefined reference to `acpi_register_lps0_dev' make[1]: *** [/kisskb/src/Makefile:1154: vmlinux] Error 1 make: *** [Makefile:219: __sub-make] Error 2 Command 'make -s -j 8 ARCH=x86_64 O=/kisskb/build/linus-rand_x86_64-randconfig_x86_64-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux- ' returned non-zero exit status 2 # rm -rf /kisskb/build/linus-rand_x86_64-randconfig_x86_64-gcc11 # Build took: 0:11:06.630108