# 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-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux-ld --version # < git log --format=%s --max-count=1 ae085d7f9365de7da27ab5c0d16b12d51ea7fca9 # < make -s -j 32 ARCH=x86_64 O=/kisskb/build/linus-rand_x86_64-randconfig_x86_64-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.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 32 ARCH=x86_64 O=/kisskb/build/linus-rand_x86_64-randconfig_x86_64-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux- help # make -s -j 32 ARCH=x86_64 O=/kisskb/build/linus-rand_x86_64-randconfig_x86_64-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux- olddefconfig .config:6481:warning: override: reassigning to symbol PREVENT_FIRMWARE_BUILD .config:6483:warning: override: reassigning to symbol GCC_PLUGINS # make -s -j 32 ARCH=x86_64 O=/kisskb/build/linus-rand_x86_64-randconfig_x86_64-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux- /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux-ld: warning: arch/x86/entry/vdso/vclock_gettime-x32.o: corrupt GNU_PROPERTY_TYPE (5) size: 0x10 /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux-ld: warning: arch/x86/entry/vdso/vgetcpu-x32.o: corrupt GNU_PROPERTY_TYPE (5) size: 0x10 /kisskb/src/arch/x86/kernel/traps.c: In function '__exc_control_protection': /kisskb/src/arch/x86/kernel/traps.c:249:3: error: implicit declaration of function '__warn'; did you mean 'pr_warn'? [-Werror=implicit-function-declaration] __warn(__FILE__, __LINE__, (void *)regs->ip, TAINT_WARN, regs, NULL); ^~~~~~ pr_warn cc1: some warnings being treated as errors make[3]: *** [/kisskb/src/scripts/Makefile.build:289: arch/x86/kernel/traps.o] Error 1 make[2]: *** [/kisskb/src/scripts/Makefile.build:551: arch/x86/kernel] Error 2 make[1]: *** [/kisskb/src/Makefile:1830: arch/x86] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:219: __sub-make] Error 2 Command 'make -s -j 32 ARCH=x86_64 O=/kisskb/build/linus-rand_x86_64-randconfig_x86_64-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.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-gcc8 # Build took: 0:03:24.555346