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 'livepatching-for-6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching

Pull livepatching updates from Petr Mladek:

- Support both paths where tracefs is typically mounted in selftests

- Make old_sympos 0 and 1 equal. They both are valid when there is only
one symbol with the given name.

* tag 'livepatching-for-6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching:
selftests: livepatch: use canonical ftrace path
livepatch: Match old_sympos 0 and 1 in klp_find_func()

+12 -2
+7 -1
kernel/livepatch/core.c
··· 88 88 struct klp_func *func; 89 89 90 90 klp_for_each_func(obj, func) { 91 + /* 92 + * Besides identical old_sympos, also consider old_sympos 93 + * of 0 and 1 are identical. 94 + */ 91 95 if ((strcmp(old_func->old_name, func->old_name) == 0) && 92 - (old_func->old_sympos == func->old_sympos)) { 96 + ((old_func->old_sympos == func->old_sympos) || 97 + (old_func->old_sympos == 0 && func->old_sympos == 1) || 98 + (old_func->old_sympos == 1 && func->old_sympos == 0))) { 93 99 return func; 94 100 } 95 101 }
+5 -1
tools/testing/selftests/livepatch/functions.sh
··· 10 10 SYSFS_KLP_DIR="$SYSFS_KERNEL_DIR/livepatch" 11 11 SYSFS_DEBUG_DIR="$SYSFS_KERNEL_DIR/debug" 12 12 SYSFS_KPROBES_DIR="$SYSFS_DEBUG_DIR/kprobes" 13 - SYSFS_TRACING_DIR="$SYSFS_DEBUG_DIR/tracing" 13 + if [[ -e /sys/kernel/tracing/trace ]]; then 14 + SYSFS_TRACING_DIR="$SYSFS_KERNEL_DIR/tracing" 15 + else 16 + SYSFS_TRACING_DIR="$SYSFS_DEBUG_DIR/tracing" 17 + fi 14 18 15 19 # Kselftest framework requirement - SKIP code is 4 16 20 ksft_skip=4