tools/testing/selftests/bpf/prog_tests/livepatch_trampoline.c

Source file repositories/reference/linux-study-clean/tools/testing/selftests/bpf/prog_tests/livepatch_trampoline.c

File Facts

System
Linux kernel
Corpus path
tools/testing/selftests/bpf/prog_tests/livepatch_trampoline.c
Extension
.c
Size
2856 bytes
Lines
124
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: implementation source
Status
source implementation candidate

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

if (err == -ENOENT) {
			test__skip();
			return;
		}

		if (retry_cnt) {
			ASSERT_OK(1, "load_livepatch");
			goto out;
		}
		/*
		 * Something else (previous run of the same test?) loaded
		 * the KLP module. Unload the KLP module and retry.
		 */
		unload_livepatch();
		retry_cnt++;
		goto retry;
	}

	if (test__start_subtest("fentry_first"))
		__test_livepatch_trampoline(false);

	if (test__start_subtest("fexit_first"))
		__test_livepatch_trampoline(true);
out:
	unload_livepatch();
}

Annotation

Implementation Notes