# git rev-parse -q --verify 06af8679449d4ed282df13191fc52d5ba28ec536^{commit} 06af8679449d4ed282df13191fc52d5ba28ec536 already have revision, skipping fetch # git checkout -q -f -B kisskb 06af8679449d4ed282df13191fc52d5ba28ec536 # git clean -qxdf # < git log -1 # commit 06af8679449d4ed282df13191fc52d5ba28ec536 # Author: Eric W. Biederman # Date: Thu Jun 10 15:11:11 2021 -0500 # # coredump: Limit what can interrupt coredumps # # Olivier Langlois has been struggling with coredumps being incompletely written in # processes using io_uring. # # Olivier Langlois writes: # > io_uring is a big user of task_work and any event that io_uring made a # > task waiting for that occurs during the core dump generation will # > generate a TIF_NOTIFY_SIGNAL. # > # > Here are the detailed steps of the problem: # > 1. io_uring calls vfs_poll() to install a task to a file wait queue # > with io_async_wake() as the wakeup function cb from io_arm_poll_handler() # > 2. wakeup function ends up calling task_work_add() with TWA_SIGNAL # > 3. task_work_add() sets the TIF_NOTIFY_SIGNAL bit by calling # > set_notify_signal() # # The coredump code deliberately supports being interrupted by SIGKILL, # and depends upon prepare_signal to filter out all other signals. Now # that signal_pending includes wake ups for TIF_NOTIFY_SIGNAL this hack # in dump_emitted by the coredump code no longer works. # # Make the coredump code more robust by explicitly testing for all of # the wakeup conditions the coredump code supports. This prevents # new wakeup conditions from breaking the coredump code, as well # as fixing the current issue. # # The filesystem code that the coredump code uses already limits # itself to only aborting on fatal_signal_pending. So it should # not develop surprising wake-up reasons either. # # v2: Don't remove the now unnecessary code in prepare_signal. # # Cc: stable@vger.kernel.org # Fixes: 12db8b690010 ("entry: Add support for TIF_NOTIFY_SIGNAL") # Reported-by: Olivier Langlois # Signed-off-by: "Eric W. Biederman" # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/mips-linux/bin/mips-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/mips-linux/bin/mips-linux-ld --version # < git log --format=%s --max-count=1 06af8679449d4ed282df13191fc52d5ba28ec536 # < make -s -j 160 ARCH=mips O=/kisskb/build/linus_mips-defconfig_mips-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/mips-linux/bin/mips-linux- defconfig # < make -s -j 160 ARCH=mips O=/kisskb/build/linus_mips-defconfig_mips-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/mips-linux/bin/mips-linux- help # make -s -j 160 ARCH=mips O=/kisskb/build/linus_mips-defconfig_mips-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/mips-linux/bin/mips-linux- olddefconfig # make -s -j 160 ARCH=mips O=/kisskb/build/linus_mips-defconfig_mips-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/mips-linux/bin/mips-linux- FIT description: Linux 5.13.0-rc5-g06af8679449d Created: Sat Jul 17 20:00:07 2021 Image 0 (kernel) Description: Linux 5.13.0-rc5-g06af8679449d Created: Sat Jul 17 20:00:07 2021 Type: Kernel Image Compression: gzip compressed Data Size: 5333958 Bytes = 5208.94 KiB = 5.09 MiB Architecture: MIPS OS: Linux Load Address: 0x80100000 Entry Point: 0x809cee2c Hash algo: sha1 Hash value: b1c4464983392e0699f7f5ddb2f4b3930d2bd0de Image 1 (fdt-boston) Description: img,boston Device Tree Created: Sat Jul 17 20:00:07 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 3793 Bytes = 3.70 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 4799f50d688573234da6e9d7701234d394759ef4 Image 2 (fdt-ni169445) Description: NI 169445 device tree Created: Sat Jul 17 20:00:07 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 1871 Bytes = 1.83 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 51b89b31605ee62038c8468c429af091dfc75ec7 Image 3 (fdt-ocelot_pcb123) Description: MSCC Ocelot PCB123 Device Tree Created: Sat Jul 17 20:00:07 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 4659 Bytes = 4.55 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 5bcb6e4f21e8e5372544aa130b3bd097355a9050 Image 4 (fdt-ocelot_pcb120) Description: MSCC Ocelot PCB120 Device Tree Created: Sat Jul 17 20:00:07 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 5418 Bytes = 5.29 KiB = 0.01 MiB Architecture: MIPS Hash algo: sha1 Hash value: 93d882f2009a217e0fa9dab94788535ed2be8476 Image 5 (fdt-xilfpga) Description: MIPSfpga (xilfpga) Device Tree Created: Sat Jul 17 20:00:07 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 2708 Bytes = 2.64 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 63d058b780f65e22da30f0a183433765f1807f1d Default Configuration: 'conf-default' Configuration 0 (conf-default) Description: Generic Linux kernel Kernel: kernel Configuration 1 (conf-boston) Description: Boston Linux kernel Kernel: kernel FDT: fdt-boston Configuration 2 (conf-ni169445) Description: NI 169445 Linux Kernel Kernel: kernel FDT: fdt-ni169445 Configuration 3 (conf-ocelot_pcb123) Description: Ocelot Linux kernel Kernel: kernel FDT: fdt-ocelot_pcb123 Configuration 4 (conf-ocelot_pcb120) Description: Ocelot Linux kernel Kernel: kernel FDT: fdt-ocelot_pcb120 Configuration 5 (conf-xilfpga) Description: MIPSfpga Linux kernel Kernel: kernel FDT: fdt-xilfpga Completed OK # rm -rf /kisskb/build/linus_mips-defconfig_mips-gcc8 # Build took: 0:00:38.962646