mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
![]() -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEESH4wyp42V4tXvYsjUqAMR0iAlPIFAmflMGMACgkQUqAMR0iA lPKHhg/8DjxkQ3tvUpW53pfABBdKELJWOl4hH+IMvGcdh2dZrcFf6OkEB4JeXXVn duSODaefalrdU0jV21LChYpEkG40wZqStmamH9im+VbyCc8JwMwvWckrw45RNmjO AC4oVh0K9SJcrTj7XWsFSeS38KmQKhtp2zTHpSqCW9FZkfn8si11E8Xzue2kTtEH 7CESq6N0SMahVfiNkLI1n0x0mUyWiTE43hQ3e+tmmBgtmv3gU4FpQqeTGc/MQUxy B6AaI1vChovLmfNhw4KM8GvyPCTIn4xRQ09WXZRbK2ZzAxgFfm7QXGL3E93ra929 juSoIWnNwzw81RB3apzclOHFTbctHJWL+85KEefqCjrCuEbaoLNGoLkVqNuj0U+D LmLqmm6NfEtPzDVBY232KepjFUoIb890eKRF3Wq1NnHonaVxmUSMEMRSdlKeHpSo uImBhr5XhXDJLHt4+lAa4m0JSm3RH2AK83xIrdJq/YUcKscCzJMHLqqsp8pCa7mb L7iOhHFKs2r6GJCt5kLEw1jkNEg5Lpk08fY5AekjScvNcxXWXF8E8Jl9DnBBoz+5 e15mvqsiQtcAGHyR1Ohmw8UPYnWY2fSZTmru9aClwHCvC0q+cyCxIZgcqLxFYFIr TKIgQ6zSepA+j7SzI1SaDY4Z9cNWMTU+9GqrNO3xO4ddpKrp5C8= =ggzJ -----END PGP SIGNATURE----- Merge tag 'livepatching-for-6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching Pull livepatching updates from Petr Mladek: - Add a selftest for tracing of a livepatched function - Skip a selftest when kprobes are not using ftrace - Some documentation clean up * tag 'livepatching-for-6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching: selftests: livepatch: test if ftrace can trace a livepatched function selftests: livepatch: add new ftrace helpers functions selftest/livepatch: Only run test-kprobe with CONFIG_KPROBES_ON_FTRACE docs: livepatch: move text out of code block livepatch: Add comment to clarify klp_add_nops() |
||
---|---|---|
.. | ||
test_modules | ||
.gitignore | ||
config | ||
functions.sh | ||
Makefile | ||
README | ||
settings | ||
test-callbacks.sh | ||
test-ftrace.sh | ||
test-kprobe.sh | ||
test-livepatch.sh | ||
test-shadow-vars.sh | ||
test-state.sh | ||
test-syscall.sh | ||
test-sysfs.sh | ||
test_klp-call_getpid.c |
==================== Livepatch Self Tests ==================== This is a small set of sanity tests for the kernel livepatching. The test suite loads and unloads several test kernel modules to verify livepatch behavior. Debug information is logged to the kernel's message buffer and parsed for expected messages. (Note: the tests will compare the message buffer for only the duration of each individual test.) Config ------ Set CONFIG_LIVEPATCH=y option and it's prerequisites. Building the tests ------------------ To only build the tests without running them, run: % make -C tools/testing/selftests/livepatch The command above will compile all test modules and test programs, making them ready to be packaged if so desired. Running the tests ----------------- Test kernel modules are built before running the livepatch selftests. The modules are located under test_modules directory, and are built as out-of-tree modules. This is specially useful since the same sources can be built and tested on systems with different kABI, ensuring they the tests are backwards compatible. The modules will be loaded by the test scripts using insmod. To run the livepatch selftests, from the top of the kernel source tree: % make -C tools/testing/selftests TARGETS=livepatch run_tests or % make kselftest TARGETS=livepatch Adding tests ------------ See the common functions.sh file for the existing collection of utility functions, most importantly setup_config(), start_test() and check_result(). The latter function greps the kernel's ring buffer for "livepatch:" and "test_klp" strings, so tests be sure to include one of those strings for result comparison. Other utility functions include general module loading and livepatch loading helpers (waiting for patch transitions, sysfs entries, etc.)