Commit 51ab33fc authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'livepatching-for-6.19' of...

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()
parents 02baaa67 5cb55753
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -88,8 +88,14 @@ static struct klp_func *klp_find_func(struct klp_object *obj,
	struct klp_func *func;

	klp_for_each_func(obj, func) {
		/*
		 * Besides identical old_sympos, also consider old_sympos
		 * of 0 and 1 are identical.
		 */
		if ((strcmp(old_func->old_name, func->old_name) == 0) &&
		    (old_func->old_sympos == func->old_sympos)) {
		    ((old_func->old_sympos == func->old_sympos) ||
		     (old_func->old_sympos == 0 && func->old_sympos == 1) ||
		     (old_func->old_sympos == 1 && func->old_sympos == 0))) {
			return func;
		}
	}
+5 −1
Original line number Diff line number Diff line
@@ -10,7 +10,11 @@ SYSFS_KERNEL_DIR="/sys/kernel"
SYSFS_KLP_DIR="$SYSFS_KERNEL_DIR/livepatch"
SYSFS_DEBUG_DIR="$SYSFS_KERNEL_DIR/debug"
SYSFS_KPROBES_DIR="$SYSFS_DEBUG_DIR/kprobes"
if [[ -e /sys/kernel/tracing/trace ]]; then
	SYSFS_TRACING_DIR="$SYSFS_KERNEL_DIR/tracing"
else
	SYSFS_TRACING_DIR="$SYSFS_DEBUG_DIR/tracing"
fi

# Kselftest framework requirement - SKIP code is 4
ksft_skip=4