# git rev-parse -q --verify c9f016e72b5cc7d4d68fac51f8e72c8c7a69c06e^{commit} c9f016e72b5cc7d4d68fac51f8e72c8c7a69c06e already have revision, skipping fetch # git checkout -q -f -B kisskb c9f016e72b5cc7d4d68fac51f8e72c8c7a69c06e # git clean -qxdf # < git log -1 # commit c9f016e72b5cc7d4d68fac51f8e72c8c7a69c06e # Merge: 3df9427f351a a547a5880cba # Author: Linus Torvalds # Date: Sun Sep 1 14:43:08 2024 -0700 # # Merge tag 'x86-urgent-2024-09-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip # # Pull x86 fixes from Thomas Gleixner: # # - x2apic_disable() clears x2apic_state and x2apic_mode unconditionally, # even when the state is X2APIC_ON_LOCKED, which prevents the kernel to # disable it thereby creating inconsistent state. # # Reorder the logic so it actually works correctly # # - The XSTATE logic for handling LBR is incorrect as it assumes that # XSAVES supports LBR when the CPU supports LBR. In fact both # conditions need to be true. Otherwise the enablement of LBR in the # IA32_XSS MSR fails and subsequently the machine crashes on the next # XRSTORS operation because IA32_XSS is not initialized. # # Cache the XSTATE support bit during init and make the related # functions use this cached information and the LBR CPU feature bit to # cure this. # # - Cure a long standing bug in KASLR # # KASLR uses the full address space between PAGE_OFFSET and vaddr_end # to randomize the starting points of the direct map, vmalloc and # vmemmap regions. It thereby limits the size of the direct map by # using the installed memory size plus an extra configurable margin for # hot-plug memory. This limitation is done to gain more randomization # space because otherwise only the holes between the direct map, # vmalloc, vmemmap and vaddr_end would be usable for randomizing. # # The limited direct map size is not exposed to the rest of the kernel, # so the memory hot-plug and resource management related code paths # still operate under the assumption that the available address space # can be determined with MAX_PHYSMEM_BITS. # # request_free_mem_region() allocates from (1 << MAX_PHYSMEM_BITS) - 1 # downwards. That means the first allocation happens past the end of # the direct map and if unlucky this address is in the vmalloc space, # which causes high_memory to become greater than VMALLOC_START and # consequently causes iounmap() to fail for valid ioremap addresses. # # Cure this by exposing the end of the direct map via PHYSMEM_END and # use that for the memory hot-plug and resource management related # places instead of relying on MAX_PHYSMEM_BITS. In the KASLR case # PHYSMEM_END maps to a variable which is initialized by the KASLR # initialization and otherwise it is based on MAX_PHYSMEM_BITS as # before. # # - Prevent a data leak in mmio_read(). The TDVMCALL exposes the value of # an initialized variabled on the stack to the VMM. The variable is # only required as output value, so it does not have to exposed to the # VMM in the first place. # # - Prevent an array overrun in the resource control code on systems with # Sub-NUMA Clustering enabled because the code failed to adjust the # index by the number of SNC nodes per L3 cache. # # * tag 'x86-urgent-2024-09-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: # x86/resctrl: Fix arch_mbm_* array overrun on SNC # x86/tdx: Fix data leak in mmio_read() # x86/kaslr: Expose and use the end of the physical memory address space # x86/fpu: Avoid writing LBR bit to IA32_XSS unless supported # x86/apic: Make x2apic_disable() work correctly # < /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 c9f016e72b5cc7d4d68fac51f8e72c8c7a69c06e # make -s -j 40 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 40 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 40 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:14753:warning: override: reassigning to symbol GCC_PLUGIN_LATENT_ENTROPY .config:14757:warning: override: reassigning to symbol UML_NET_ETHERTAP .config:14759:warning: override: reassigning to symbol UML_NET_SLIP .config:14764:warning: override: reassigning to symbol UML_NET_SLIRP # make -s -j 40 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/lib/iomap.c:156:5: error: no previous prototype for ‘ioread64_lo_hi’ [-Werror=missing-prototypes] 156 | u64 ioread64_lo_hi(const void __iomem *addr) | ^~~~~~~~~~~~~~ /kisskb/src/lib/iomap.c:163:5: error: no previous prototype for ‘ioread64_hi_lo’ [-Werror=missing-prototypes] 163 | u64 ioread64_hi_lo(const void __iomem *addr) | ^~~~~~~~~~~~~~ /kisskb/src/lib/iomap.c:170:5: error: no previous prototype for ‘ioread64be_lo_hi’ [-Werror=missing-prototypes] 170 | u64 ioread64be_lo_hi(const void __iomem *addr) | ^~~~~~~~~~~~~~~~ /kisskb/src/lib/iomap.c:178:5: error: no previous prototype for ‘ioread64be_hi_lo’ [-Werror=missing-prototypes] 178 | u64 ioread64be_hi_lo(const void __iomem *addr) | ^~~~~~~~~~~~~~~~ /kisskb/src/lib/iomap.c:264:6: error: no previous prototype for ‘iowrite64_lo_hi’ [-Werror=missing-prototypes] 264 | void iowrite64_lo_hi(u64 val, void __iomem *addr) | ^~~~~~~~~~~~~~~ /kisskb/src/lib/iomap.c:272:6: error: no previous prototype for ‘iowrite64_hi_lo’ [-Werror=missing-prototypes] 272 | void iowrite64_hi_lo(u64 val, void __iomem *addr) | ^~~~~~~~~~~~~~~ /kisskb/src/lib/iomap.c:280:6: error: no previous prototype for ‘iowrite64be_lo_hi’ [-Werror=missing-prototypes] 280 | void iowrite64be_lo_hi(u64 val, void __iomem *addr) | ^~~~~~~~~~~~~~~~~ /kisskb/src/lib/iomap.c:288:6: error: no previous prototype for ‘iowrite64be_hi_lo’ [-Werror=missing-prototypes] 288 | void iowrite64be_hi_lo(u64 val, void __iomem *addr) | ^~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[4]: *** [/kisskb/src/scripts/Makefile.build:244: lib/iomap.o] Error 1 make[3]: *** [/kisskb/src/scripts/Makefile.build:485: lib] Error 2 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [/kisskb/src/Makefile:1925: .] Error 2 make[1]: *** [/kisskb/src/Makefile:224: __sub-make] Error 2 make: *** [Makefile:224: __sub-make] Error 2 Command 'make -s -j 40 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:10:44.320056