From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0661C15800A for ; Sat, 2 Sep 2023 09:55:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4BB552BC01A; Sat, 2 Sep 2023 09:55:50 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 29EF72BC01A for ; Sat, 2 Sep 2023 09:55:50 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2DE03335D27 for ; Sat, 2 Sep 2023 09:55:49 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 81FB010E2 for ; Sat, 2 Sep 2023 09:55:47 +0000 (UTC) From: "Mike Pagano" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Pagano" Message-ID: <1693648537.8f4f9ecc0aab883f69fd21d1be936a91c1e70fb7.mpagano@gentoo> Subject: [gentoo-commits] proj/linux-patches:6.4 commit in: / X-VCS-Repository: proj/linux-patches X-VCS-Files: 0000_README 1013_linux-6.4.14.patch X-VCS-Directories: / X-VCS-Committer: mpagano X-VCS-Committer-Name: Mike Pagano X-VCS-Revision: 8f4f9ecc0aab883f69fd21d1be936a91c1e70fb7 X-VCS-Branch: 6.4 Date: Sat, 2 Sep 2023 09:55:47 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c557bc5e-bc59-4732-b766-77ec076b21d8 X-Archives-Hash: 3a200fb4fba2062f556e29b5beebb37c commit: 8f4f9ecc0aab883f69fd21d1be936a91c1e70fb7 Author: Mike Pagano gentoo org> AuthorDate: Sat Sep 2 09:55:37 2023 +0000 Commit: Mike Pagano gentoo org> CommitDate: Sat Sep 2 09:55:37 2023 +0000 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=8f4f9ecc Linux patch 6.4.14 Signed-off-by: Mike Pagano gentoo.org> 0000_README | 4 + 1013_linux-6.4.14.patch | 326 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 330 insertions(+) diff --git a/0000_README b/0000_README index 38b60f4b..8a165dad 100644 --- a/0000_README +++ b/0000_README @@ -95,6 +95,10 @@ Patch: 1012_linux-6.4.13.patch From: https://www.kernel.org Desc: Linux 6.4.13 +Patch: 1013_linux-6.4.14.patch +From: https://www.kernel.org +Desc: Linux 6.4.14 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1013_linux-6.4.14.patch b/1013_linux-6.4.14.patch new file mode 100644 index 00000000..428e62bd --- /dev/null +++ b/1013_linux-6.4.14.patch @@ -0,0 +1,326 @@ +diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt +index 7323911931828..2b0cea8be7408 100644 +--- a/Documentation/admin-guide/kernel-parameters.txt ++++ b/Documentation/admin-guide/kernel-parameters.txt +@@ -6240,10 +6240,6 @@ + -1: disable all critical trip points in all thermal zones + : override all critical trip points + +- thermal.nocrt= [HW,ACPI] +- Set to disable actions on ACPI thermal zone +- critical and hot trip points. +- + thermal.off= [HW,ACPI] + 1: disable ACPI thermal control + +diff --git a/Makefile b/Makefile +index 900e515b87cf8..97611fe99c8f0 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 4 +-SUBLEVEL = 13 ++SUBLEVEL = 14 + EXTRAVERSION = + NAME = Hurr durr I'ma ninja sloth + +diff --git a/arch/arm/kernel/module-plts.c b/arch/arm/kernel/module-plts.c +index f5a43fd8c1639..da2ee8d6ef1a7 100644 +--- a/arch/arm/kernel/module-plts.c ++++ b/arch/arm/kernel/module-plts.c +@@ -251,7 +251,7 @@ int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, + /* sort by type and symbol index */ + sort(rels, numrels, sizeof(Elf32_Rel), cmp_rel, NULL); + +- if (strncmp(secstrings + dstsec->sh_name, ".init", 5) != 0) ++ if (!module_init_layout_section(secstrings + dstsec->sh_name)) + core_plts += count_plts(syms, dstsec->sh_addr, rels, + numrels, s->sh_info); + else +diff --git a/arch/arm64/kernel/module-plts.c b/arch/arm64/kernel/module-plts.c +index 543493bf924d2..bd69a4e7cd605 100644 +--- a/arch/arm64/kernel/module-plts.c ++++ b/arch/arm64/kernel/module-plts.c +@@ -7,6 +7,7 @@ + #include + #include + #include ++#include + #include + + static struct plt_entry __get_adrp_add_pair(u64 dst, u64 pc, +@@ -338,7 +339,7 @@ int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, + if (nents) + sort(rels, nents, sizeof(Elf64_Rela), cmp_rela, NULL); + +- if (!str_has_prefix(secstrings + dstsec->sh_name, ".init")) ++ if (!module_init_layout_section(secstrings + dstsec->sh_name)) + core_plts += count_plts(syms, rels, numrels, + sechdrs[i].sh_info, dstsec); + else +diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c +index 39acccabf2ede..9915062d5243c 100644 +--- a/arch/parisc/kernel/sys_parisc.c ++++ b/arch/parisc/kernel/sys_parisc.c +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + /* + * Construct an artificial page offset for the mapping based on the physical +@@ -339,7 +340,7 @@ asmlinkage long parisc_fallocate(int fd, int mode, u32 offhi, u32 offlo, + ((u64)lenhi << 32) | lenlo); + } + +-long parisc_personality(unsigned long personality) ++asmlinkage long parisc_personality(unsigned long personality) + { + long err; + +diff --git a/arch/x86/include/asm/sections.h b/arch/x86/include/asm/sections.h +index a6e8373a5170f..3fa87e5e11aba 100644 +--- a/arch/x86/include/asm/sections.h ++++ b/arch/x86/include/asm/sections.h +@@ -2,8 +2,6 @@ + #ifndef _ASM_X86_SECTIONS_H + #define _ASM_X86_SECTIONS_H + +-#define arch_is_kernel_initmem_freed arch_is_kernel_initmem_freed +- + #include + #include + +@@ -18,20 +16,4 @@ extern char __end_of_kernel_reserve[]; + + extern unsigned long _brk_start, _brk_end; + +-static inline bool arch_is_kernel_initmem_freed(unsigned long addr) +-{ +- /* +- * If _brk_start has not been cleared, brk allocation is incomplete, +- * and we can not make assumptions about its use. +- */ +- if (_brk_start) +- return 0; +- +- /* +- * After brk allocation is complete, space between _brk_end and _end +- * is available for allocation. +- */ +- return addr >= _brk_end && addr < (unsigned long)&_end; +-} +- + #endif /* _ASM_X86_SECTIONS_H */ +diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c +index 4720a3649a61b..dd89c28fa7368 100644 +--- a/drivers/acpi/thermal.c ++++ b/drivers/acpi/thermal.c +@@ -59,10 +59,6 @@ static int tzp; + module_param(tzp, int, 0444); + MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds."); + +-static int nocrt; +-module_param(nocrt, int, 0); +-MODULE_PARM_DESC(nocrt, "Set to take no action upon ACPI thermal zone critical trips points."); +- + static int off; + module_param(off, int, 0); + MODULE_PARM_DESC(off, "Set to disable ACPI thermal support."); +@@ -1143,7 +1139,7 @@ static int thermal_act(const struct dmi_system_id *d) { + static int thermal_nocrt(const struct dmi_system_id *d) { + pr_notice("%s detected: disabling all critical thermal trip point actions.\n", + d->ident); +- nocrt = 1; ++ crt = -1; + return 0; + } + static int thermal_tzp(const struct dmi_system_id *d) { +diff --git a/drivers/thunderbolt/tmu.c b/drivers/thunderbolt/tmu.c +index d9544600b3867..49146f97bb16e 100644 +--- a/drivers/thunderbolt/tmu.c ++++ b/drivers/thunderbolt/tmu.c +@@ -416,6 +416,7 @@ int tb_switch_tmu_disable(struct tb_switch *sw) + * mode. + */ + ret = tb_switch_tmu_rate_write(sw, TB_SWITCH_TMU_RATE_OFF); ++ if (ret) + return ret; + + tb_port_tmu_time_sync_disable(up); +diff --git a/include/linux/moduleloader.h b/include/linux/moduleloader.h +index 03be088fb4396..001b2ce83832e 100644 +--- a/include/linux/moduleloader.h ++++ b/include/linux/moduleloader.h +@@ -42,6 +42,11 @@ bool module_init_section(const char *name); + */ + bool module_exit_section(const char *name); + ++/* Describes whether within_module_init() will consider this an init section ++ * or not. This behaviour changes with CONFIG_MODULE_UNLOAD. ++ */ ++bool module_init_layout_section(const char *sname); ++ + /* + * Apply the given relocation to the (simplified) ELF. Return -error + * or 0. +diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c +index 4874508bb950e..7c3882b9133c8 100644 +--- a/kernel/kallsyms.c ++++ b/kernel/kallsyms.c +@@ -188,16 +188,13 @@ static bool cleanup_symbol_name(char *s) + + static int compare_symbol_name(const char *name, char *namebuf) + { +- int ret; +- +- ret = strcmp(name, namebuf); +- if (!ret) +- return ret; +- +- if (cleanup_symbol_name(namebuf) && !strcmp(name, namebuf)) +- return 0; +- +- return ret; ++ /* The kallsyms_seqs_of_names is sorted based on names after ++ * cleanup_symbol_name() (see scripts/kallsyms.c) if clang lto is enabled. ++ * To ensure correct bisection in kallsyms_lookup_names(), do ++ * cleanup_symbol_name(namebuf) before comparing name and namebuf. ++ */ ++ cleanup_symbol_name(namebuf); ++ return strcmp(name, namebuf); + } + + static unsigned int get_symbol_seq(int index) +diff --git a/kernel/kallsyms_selftest.c b/kernel/kallsyms_selftest.c +index a2e3745d15c47..e05ddc33a7529 100644 +--- a/kernel/kallsyms_selftest.c ++++ b/kernel/kallsyms_selftest.c +@@ -196,7 +196,7 @@ static bool match_cleanup_name(const char *s, const char *name) + if (!IS_ENABLED(CONFIG_LTO_CLANG)) + return false; + +- p = strchr(s, '.'); ++ p = strstr(s, ".llvm."); + if (!p) + return false; + +@@ -344,27 +344,6 @@ static int test_kallsyms_basic_function(void) + goto failed; + } + +- /* +- * The first '.' may be the initial letter, in which case the +- * entire symbol name will be truncated to an empty string in +- * cleanup_symbol_name(). Do not test these symbols. +- * +- * For example: +- * cat /proc/kallsyms | awk '{print $3}' | grep -E "^\." | head +- * .E_read_words +- * .E_leading_bytes +- * .E_trailing_bytes +- * .E_write_words +- * .E_copy +- * .str.292.llvm.12122243386960820698 +- * .str.24.llvm.12122243386960820698 +- * .str.29.llvm.12122243386960820698 +- * .str.75.llvm.12122243386960820698 +- * .str.99.llvm.12122243386960820698 +- */ +- if (IS_ENABLED(CONFIG_LTO_CLANG) && !namebuf[0]) +- continue; +- + lookup_addr = kallsyms_lookup_name(namebuf); + + memset(stat, 0, sizeof(*stat)); +diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c +index 4dfd2f3e09b2e..c6fd60ceb04aa 100644 +--- a/kernel/locking/lockdep.c ++++ b/kernel/locking/lockdep.c +@@ -817,34 +817,26 @@ static int very_verbose(struct lock_class *class) + * Is this the address of a static object: + */ + #ifdef __KERNEL__ +-/* +- * Check if an address is part of freed initmem. After initmem is freed, +- * memory can be allocated from it, and such allocations would then have +- * addresses within the range [_stext, _end]. +- */ +-#ifndef arch_is_kernel_initmem_freed +-static int arch_is_kernel_initmem_freed(unsigned long addr) +-{ +- if (system_state < SYSTEM_FREEING_INITMEM) +- return 0; +- +- return init_section_contains((void *)addr, 1); +-} +-#endif +- + static int static_obj(const void *obj) + { +- unsigned long start = (unsigned long) &_stext, +- end = (unsigned long) &_end, +- addr = (unsigned long) obj; ++ unsigned long addr = (unsigned long) obj; + +- if (arch_is_kernel_initmem_freed(addr)) +- return 0; ++ if (is_kernel_core_data(addr)) ++ return 1; ++ ++ /* ++ * keys are allowed in the __ro_after_init section. ++ */ ++ if (is_kernel_rodata(addr)) ++ return 1; + + /* +- * static variable? ++ * in initdata section and used during bootup only? ++ * NOTE: On some platforms the initdata section is ++ * outside of the _stext ... _end range. + */ +- if ((addr >= start) && (addr < end)) ++ if (system_state < SYSTEM_FREEING_INITMEM && ++ init_section_contains((void *)addr, 1)) + return 1; + + /* +diff --git a/kernel/module/decompress.c b/kernel/module/decompress.c +index 8a5d6d63b06cb..87440f714c0ca 100644 +--- a/kernel/module/decompress.c ++++ b/kernel/module/decompress.c +@@ -241,7 +241,7 @@ static ssize_t module_zstd_decompress(struct load_info *info, + } + + wksp_size = zstd_dstream_workspace_bound(header.windowSize); +- wksp = kmalloc(wksp_size, GFP_KERNEL); ++ wksp = vmalloc(wksp_size); + if (!wksp) { + retval = -ENOMEM; + goto out; +@@ -284,7 +284,7 @@ static ssize_t module_zstd_decompress(struct load_info *info, + retval = new_size; + + out: +- kfree(wksp); ++ vfree(wksp); + return retval; + } + #else +diff --git a/kernel/module/main.c b/kernel/module/main.c +index 4e2cf784cf8ce..f1facc898a646 100644 +--- a/kernel/module/main.c ++++ b/kernel/module/main.c +@@ -1491,7 +1491,7 @@ long module_get_offset_and_type(struct module *mod, enum mod_mem_type type, + return offset | mask; + } + +-static bool module_init_layout_section(const char *sname) ++bool module_init_layout_section(const char *sname) + { + #ifndef CONFIG_MODULE_UNLOAD + if (module_exit_section(sname))