# git rev-parse -q --verify 7b55851367136b1efd84d98fea81ba57a98304cf^{commit} 7b55851367136b1efd84d98fea81ba57a98304cf already have revision, skipping fetch # git checkout -q -f -B kisskb 7b55851367136b1efd84d98fea81ba57a98304cf # git clean -qxdf # < git log -1 # commit 7b55851367136b1efd84d98fea81ba57a98304cf # Author: David Herrmann # Date: Tue Jan 8 13:58:52 2019 +0100 # # fork: record start_time late # # This changes the fork(2) syscall to record the process start_time after # initializing the basic task structure but still before making the new # process visible to user-space. # # Technically, we could record the start_time anytime during fork(2). But # this might lead to scenarios where a start_time is recorded long before # a process becomes visible to user-space. For instance, with # userfaultfd(2) and TLS, user-space can delay the execution of fork(2) # for an indefinite amount of time (and will, if this causes network # access, or similar). # # By recording the start_time late, it much closer reflects the point in # time where the process becomes live and can be observed by other # processes. # # Lastly, this makes it much harder for user-space to predict and control # the start_time they get assigned. Previously, user-space could fork a # process and stall it in copy_thread_tls() before its pid is allocated, # but after its start_time is recorded. This can be misused to later-on # cycle through PIDs and resume the stalled fork(2) yielding a process # that has the same pid and start_time as a process that existed before. # This can be used to circumvent security systems that identify processes # by their pid+start_time combination. # # Even though user-space was always aware that start_time recording is # flaky (but several projects are known to still rely on start_time-based # identification), changing the start_time to be recorded late will help # mitigate existing attacks and make it much harder for user-space to # control the start_time a process gets assigned. # # Reported-by: Jann Horn # Signed-off-by: Tom Gundersen # Signed-off-by: David Herrmann # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/gcc-4.6.3-nolibc/mips-linux/bin/mips-linux-gcc --version # < /opt/cross/kisskb/gcc-4.6.3-nolibc/mips-linux/bin/mips-linux-ld --version # < git log --format=%s --max-count=1 7b55851367136b1efd84d98fea81ba57a98304cf # < make -s -j 8 ARCH=mips O=/kisskb/build/linus_mips-allmodconfig_mips CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/mips-linux/bin/mips-linux- allmodconfig # Added to kconfig CONFIG_BUILD_DOCSRC=n # Added to kconfig CONFIG_MODULE_SIG=n # Added to kconfig CONFIG_SAMPLES=n # Added to kconfig CONFIG_MIPS_CPS_NS16550_BASE=0x1b0003f8 # Added to kconfig CONFIG_MIPS_CPS_NS16550_SHIFT=0 # yes \n | make -s -j 8 ARCH=mips O=/kisskb/build/linus_mips-allmodconfig_mips CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/mips-linux/bin/mips-linux- oldconfig yes: standard output: Broken pipe # make -s -j 8 ARCH=mips O=/kisskb/build/linus_mips-allmodconfig_mips CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/mips-linux/bin/mips-linux- /kisskb/src/arch/mips/vdso/Makefile:38: MIPS VDSO requires binutils >= 2.25 /kisskb/src/arch/mips/boot/dts/xilfpga/nexys4ddr.dts:109.16-112.8: Warning (i2c_bus_reg): /i2c@10A00000/ad7420@4B: I2C bus unit address format error, expected "4b" /kisskb/src/scripts/mod/empty.c:1:0: warning: -ffunction-sections disabled; it makes profiling impossible [enabled by default] /kisskb/src/scripts/mod/devicetable-offsets.c:1:0: warning: -ffunction-sections disabled; it makes profiling impossible [enabled by default] /kisskb/src/kernel/bounds.c:1:0: warning: -ffunction-sections disabled; it makes profiling impossible [enabled by default] /kisskb/src/arch/mips/kernel/asm-offsets.c:1:0: warning: -ffunction-sections disabled; it makes profiling impossible [enabled by default] /kisskb/src/init/main.c:1:0: warning: -ffunction-sections disabled; it makes profiling impossible [enabled by default] /kisskb/src/init/do_mounts.c:1:0: warning: -ffunction-sections disabled; it makes profiling impossible [enabled by default] /kisskb/src/init/do_mounts_initrd.c:1:0: warning: -ffunction-sections disabled; it makes profiling impossible [enabled by default] /kisskb/src/init/initramfs.c:1:0: warning: -ffunction-sections disabled; it makes profiling impossible [enabled by default] /kisskb/src/arch/mips/generic/init.c:1:0: error: -ffunction-sections disabled; it makes profiling impossible [-Werror] cc1: all warnings being treated as errors make[3]: *** [/kisskb/src/scripts/Makefile.build:277: arch/mips/generic/init.o] Error 1 make[2]: *** [/kisskb/src/scripts/Makefile.build:492: arch/mips/generic] Error 2 make[1]: *** [/kisskb/src/Makefile:1042: arch/mips] Error 2 make[1]: *** Waiting for unfinished jobs.... /kisskb/src/init/calibrate.c:1:0: warning: -ffunction-sections disabled; it makes profiling impossible [enabled by default] /kisskb/src/init/init_task.c:1:0: warning: -ffunction-sections disabled; it makes profiling impossible [enabled by default] /kisskb/src/init/version.c:1:0: warning: -ffunction-sections disabled; it makes profiling impossible [enabled by default] make: *** [Makefile:152: sub-make] Error 2 Command 'make -s -j 8 ARCH=mips O=/kisskb/build/linus_mips-allmodconfig_mips CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/mips-linux/bin/mips-linux- ' returned non-zero exit status 2 # rm -rf /kisskb/build/linus_mips-allmodconfig_mips # Build took: 0:00:09.514033