# git rev-parse -q --verify c36c04c2e132fc39f6b658bf607aed4425427fd7^{commit} c36c04c2e132fc39f6b658bf607aed4425427fd7 already have revision, skipping fetch # git checkout -q -f -B kisskb c36c04c2e132fc39f6b658bf607aed4425427fd7 # git clean -qxdf # < git log -1 # commit c36c04c2e132fc39f6b658bf607aed4425427fd7 # Author: John Hubbard # Date: Tue Feb 1 19:23:17 2022 -0800 # # Revert "mm/gup: small refactoring: simplify try_grab_page()" # # This reverts commit 54d516b1d62ff8f17cee2da06e5e4706a0d00b8a # # That commit did a refactoring that effectively combined fast and slow # gup paths (again). And that was again incorrect, for two reasons: # # a) Fast gup and slow gup get reference counts on pages in different # ways and with different goals: see Linus' writeup in commit # cd1adf1b63a1 ("Revert "mm/gup: remove try_get_page(), call # try_get_compound_head() directly""), and # # b) try_grab_compound_head() also has a specific check for # "FOLL_LONGTERM && !is_pinned(page)", that assumes that the caller # can fall back to slow gup. This resulted in new failures, as # recently report by Will McVicker [1]. # # But (a) has problems too, even though they may not have been reported # yet. So just revert this. # # Link: https://lore.kernel.org/r/20220131203504.3458775-1-willmcvicker@google.com [1] # Fixes: 54d516b1d62f ("mm/gup: small refactoring: simplify try_grab_page()") # Reported-and-tested-by: Will McVicker # Cc: Christoph Hellwig # Cc: Minchan Kim # Cc: Matthew Wilcox # Cc: Christian Borntraeger # Cc: Heiko Carstens # Cc: Vasily Gorbik # Cc: stable@vger.kernel.org # 5.15 # Signed-off-by: John Hubbard # 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 c36c04c2e132fc39f6b658bf607aed4425427fd7 # < make -s -j 48 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 48 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 48 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:6224:warning: override: reassigning to symbol STANDALONE .config:6225:warning: override: reassigning to symbol PREVENT_FIRMWARE_BUILD .config:6227:warning: override: reassigning to symbol GCC_PLUGINS # make -s -j 48 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- kernel/trace/ring_buffer.o: warning: objtool: check_buffer.cold.30()+0xf4: sibling call from callable instruction with modified stack frame vmlinux.o: warning: objtool: __wrgsbase_inactive()+0x33: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: __rdgsbase_inactive()+0x33: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: fixup_bad_iret()+0x72: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: noist_exc_debug()+0x35: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: exc_nmi()+0xe0: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: poke_int3_handler()+0x43: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: mce_check_crashing_cpu()+0x13: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: do_machine_check()+0x4f: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: exc_machine_check()+0x61: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: __sev_get_ghcb.isra.11()+0x1b: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: __sev_put_ghcb.isra.12()+0x18: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: __sev_es_ist_exit()+0x2b: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: kernel_exc_vmm_communication()+0x35: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: irqentry_nmi_enter()+0x45: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: irqentry_nmi_exit()+0x3c: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: enter_from_user_mode()+0x31: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: syscall_enter_from_user_mode()+0x37: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: syscall_enter_from_user_mode_prepare()+0x31: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: irqentry_enter_from_user_mode()+0x31: call to ftrace_likely_update() leaves .noinstr.text section vmlinux.o: warning: objtool: irqentry_exit()+0x28: call to ftrace_likely_update() leaves .noinstr.text section Completed OK # rm -rf /kisskb/build/linus-rand_x86_64-randconfig_x86_64-gcc8 # Build took: 0:05:21.055852