Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'hardening-v6.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux

Pull hardening fixes from Kees Cook:

- Remove LTO-only suffixes from promoted global function symbols
(Yonghong Song)

- Remove unused .text..refcount section from vmlinux.lds.h (Petr Pavlu)

- Add missing __always_inline to sparc __arch_xchg() (Arnd Bergmann)

- Claim maintainership of string routines

* tag 'hardening-v6.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
sparc: mark __arch_xchg() as __always_inline
MAINTAINERS: Foolishly claim maintainership of string routines
kallsyms: strip LTO-only suffixes from promoted global functions
vmlinux.lds.h: Remove a reference to no longer used sections .text..refcount

+11 -10
+4 -1
MAINTAINERS
··· 8679 8679 F: drivers/input/touchscreen/resistive-adc-touch.c 8680 8680 8681 8681 GENERIC STRING LIBRARY 8682 + M: Kees Cook <keescook@chromium.org> 8682 8683 R: Andy Shevchenko <andy@kernel.org> 8683 - S: Maintained 8684 + L: linux-hardening@vger.kernel.org 8685 + S: Supported 8686 + T: git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/hardening 8684 8687 F: include/linux/string.h 8685 8688 F: include/linux/string_choices.h 8686 8689 F: include/linux/string_helpers.h
+1 -1
arch/sparc/include/asm/cmpxchg_32.h
··· 15 15 unsigned long __xchg_u32(volatile u32 *m, u32 new); 16 16 void __xchg_called_with_bad_pointer(void); 17 17 18 - static inline unsigned long __arch_xchg(unsigned long x, __volatile__ void * ptr, int size) 18 + static __always_inline unsigned long __arch_xchg(unsigned long x, __volatile__ void * ptr, int size) 19 19 { 20 20 switch (size) { 21 21 case 4:
+1 -1
arch/sparc/include/asm/cmpxchg_64.h
··· 87 87 return (load32 & mask) >> bit_shift; 88 88 } 89 89 90 - static inline unsigned long 90 + static __always_inline unsigned long 91 91 __arch_xchg(unsigned long x, __volatile__ void * ptr, int size) 92 92 { 93 93 switch (size) {
-1
include/asm-generic/vmlinux.lds.h
··· 578 578 *(.text.unlikely .text.unlikely.*) \ 579 579 *(.text.unknown .text.unknown.*) \ 580 580 NOINSTR_TEXT \ 581 - *(.text..refcount) \ 582 581 *(.ref.text) \ 583 582 *(.text.asan.* .text.tsan.*) \ 584 583 MEM_KEEP(init.text*) \
+2 -3
kernel/kallsyms.c
··· 174 174 * LLVM appends various suffixes for local functions and variables that 175 175 * must be promoted to global scope as part of LTO. This can break 176 176 * hooking of static functions with kprobes. '.' is not a valid 177 - * character in an identifier in C. Suffixes observed: 177 + * character in an identifier in C. Suffixes only in LLVM LTO observed: 178 178 * - foo.llvm.[0-9a-f]+ 179 - * - foo.[0-9a-f]+ 180 179 */ 181 - res = strchr(s, '.'); 180 + res = strstr(s, ".llvm."); 182 181 if (res) { 183 182 *res = '\0'; 184 183 return true;
+3 -3
scripts/kallsyms.c
··· 349 349 * ASCII[_] = 5f 350 350 * ASCII[a-z] = 61,7a 351 351 * 352 - * As above, replacing '.' with '\0' does not affect the main sorting, 353 - * but it helps us with subsorting. 352 + * As above, replacing the first '.' in ".llvm." with '\0' does not 353 + * affect the main sorting, but it helps us with subsorting. 354 354 */ 355 - p = strchr(s, '.'); 355 + p = strstr(s, ".llvm."); 356 356 if (p) 357 357 *p = '\0'; 358 358 }