# git rev-parse -q --verify 87caef42200cd44f8b808ec2f8ac2257f3e0a8c1^{commit} 87caef42200cd44f8b808ec2f8ac2257f3e0a8c1 already have revision, skipping fetch # git checkout -q -f -B kisskb 87caef42200cd44f8b808ec2f8ac2257f3e0a8c1 # git clean -qxdf # < git log -1 # commit 87caef42200cd44f8b808ec2f8ac2257f3e0a8c1 # Merge: 92f74f7f4083 6d305cbef1aa # Author: Linus Torvalds # Date: Mon May 13 14:14:05 2024 -0700 # # Merge tag 'hardening-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux # # Pull hardening updates from Kees Cook: # "The bulk of the changes here are related to refactoring and expanding # the KUnit tests for string helper and fortify behavior. # # Some trivial strncpy replacements in fs/ were carried in my tree. Also # some fixes to SCSI string handling were carried in my tree since the # helper for those was introduce here. Beyond that, just little fixes # all around: objtool getting confused about LKDTM+KCFI, preparing for # future refactors (constification of sysctl tables, additional # __counted_by annotations), a Clang UBSAN+i386 crash fix, and adding # more options in the hardening.config Kconfig fragment. # # Summary: # # - selftests: Add str*cmp tests (Ivan Orlov) # # - __counted_by: provide UAPI for _le/_be variants (Erick Archer) # # - Various strncpy deprecation refactors (Justin Stitt) # # - stackleak: Use a copy of soon-to-be-const sysctl table (Thomas # Weißschuh) # # - UBSAN: Work around i386 -regparm=3 bug with Clang prior to # version 19 # # - Provide helper to deal with non-NUL-terminated string copying # # - SCSI: Fix older string copying bugs (with new helper) # # - selftests: Consolidate string helper behavioral tests # # - selftests: add memcpy() fortify tests # # - string: Add additional __realloc_size() annotations for "dup" # helpers # # - LKDTM: Fix KCFI+rodata+objtool confusion # # - hardening.config: Enable KCFI" # # * tag 'hardening-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: (29 commits) # uapi: stddef.h: Provide UAPI macros for __counted_by_{le, be} # stackleak: Use a copy of the ctl_table argument # string: Add additional __realloc_size() annotations for "dup" helpers # kunit/fortify: Fix replaced failure path to unbreak __alloc_size # hardening: Enable KCFI and some other options # lkdtm: Disable CFI checking for perms functions # kunit/fortify: Add memcpy() tests # kunit/fortify: Do not spam logs with fortify WARNs # kunit/fortify: Rename tests to use recommended conventions # init: replace deprecated strncpy with strscpy_pad # kunit/fortify: Fix mismatched kvalloc()/vfree() usage # scsi: qla2xxx: Avoid possible run-time warning with long model_num # scsi: mpi3mr: Avoid possible run-time warning with long manufacturer strings # scsi: mptfusion: Avoid possible run-time warning with long manufacturer strings # fs: ecryptfs: replace deprecated strncpy with strscpy # hfsplus: refactor copy_name to not use strncpy # reiserfs: replace deprecated strncpy with scnprintf # virt: acrn: replace deprecated strncpy with strscpy # ubsan: Avoid i386 UBSAN handler crashes with Clang # ubsan: Remove 1-element array usage in debug reporting # ... # < /opt/cross/kisskb/x86-64--glibc--bleeding-edge-2022.08-1/bin/x86_64-linux-gcc --version # < /opt/cross/kisskb/x86-64--glibc--bleeding-edge-2022.08-1/bin/x86_64-linux-ld --version # < git log --format=%s --max-count=1 87caef42200cd44f8b808ec2f8ac2257f3e0a8c1 # make -s -j 32 ARCH=um O=/kisskb/build/linus_allmodconfig_um-x86_64-gcc12 CROSS_COMPILE=/opt/cross/kisskb/x86-64--glibc--bleeding-edge-2022.08-1/bin/x86_64-linux- SUBARCH=x86_64 allmodconfig # Added to kconfig CONFIG_STANDALONE=y # Added to kconfig CONFIG_KCOV=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_GCC_PLUGIN_STRUCTLEAK=n # Added to kconfig CONFIG_GCC_PLUGIN_RANDSTRUCT=n # Added to kconfig CONFIG_UML_NET=n # Added to kconfig CONFIG_UML_NET_ETHERTAP=n # Added to kconfig CONFIG_UML_NET_TUNTAP=n # Added to kconfig CONFIG_UML_NET_SLIP=n # Added to kconfig CONFIG_UML_NET_DAEMON=n # Added to kconfig CONFIG_UML_NET_VDE=n # Added to kconfig CONFIG_UML_NET_MCAST=n # Added to kconfig CONFIG_UML_NET_PCAP=n # Added to kconfig CONFIG_UML_NET_SLIRP=n # Added to kconfig CONFIG_GCOV_KERNEL=n # Added to kconfig CONFIG_DEBUG_INFO_BTF=n # Added to kconfig CONFIG_BPF_PRELOAD=n # Added to kconfig CONFIG_SPI_STM32_QSPI=n # < make -s -j 32 ARCH=um O=/kisskb/build/linus_allmodconfig_um-x86_64-gcc12 CROSS_COMPILE=/opt/cross/kisskb/x86-64--glibc--bleeding-edge-2022.08-1/bin/x86_64-linux- SUBARCH=x86_64 help # make -s -j 32 ARCH=um O=/kisskb/build/linus_allmodconfig_um-x86_64-gcc12 CROSS_COMPILE=/opt/cross/kisskb/x86-64--glibc--bleeding-edge-2022.08-1/bin/x86_64-linux- SUBARCH=x86_64 olddefconfig .config:14254:warning: override: reassigning to symbol GCC_PLUGIN_LATENT_ENTROPY .config:14258:warning: override: reassigning to symbol UML_NET_ETHERTAP .config:14260:warning: override: reassigning to symbol UML_NET_SLIP .config:14265:warning: override: reassigning to symbol UML_NET_SLIRP # make -s -j 32 ARCH=um O=/kisskb/build/linus_allmodconfig_um-x86_64-gcc12 CROSS_COMPILE=/opt/cross/kisskb/x86-64--glibc--bleeding-edge-2022.08-1/bin/x86_64-linux- SUBARCH=x86_64 /kisskb/src/arch/x86/um/user-offsets.c:17:6: warning: no previous prototype for ‘foo’ [-Wmissing-prototypes] 17 | void foo(void) | ^~~ In file included from /kisskb/src/arch/um/kernel/asm-offsets.c:1: /kisskb/src/arch/x86/um/shared/sysdep/kernel-offsets.h:9:6: error: no previous prototype for ‘foo’ [-Werror=missing-prototypes] 9 | void foo(void) | ^~~ cc1: all warnings being treated as errors make[3]: *** [/kisskb/src/scripts/Makefile.build:117: arch/um/kernel/asm-offsets.s] Error 1 make[2]: *** [/kisskb/src/Makefile:1197: prepare0] Error 2 make[1]: *** [/kisskb/src/Makefile:240: __sub-make] Error 2 make: *** [Makefile:240: __sub-make] Error 2 Command 'make -s -j 32 ARCH=um O=/kisskb/build/linus_allmodconfig_um-x86_64-gcc12 CROSS_COMPILE=/opt/cross/kisskb/x86-64--glibc--bleeding-edge-2022.08-1/bin/x86_64-linux- SUBARCH=x86_64 ' returned non-zero exit status 2. # rm -rf /kisskb/build/linus_allmodconfig_um-x86_64-gcc12 # Build took: 0:00:08.920086