#!/bin/bash # SPDX-License-Identifier: GPL-2.0 # Copyright (C) 2019 Joe Lawrence <joe.lawrence@redhat.com>
. $(dirname $0)/functions.sh
MOD_LIVEPATCH=test_klp_livepatch
setup_config
# - turn ftrace_enabled OFF and verify livepatches can't load # - turn ftrace_enabled ON and verify livepatch can load # - verify that ftrace_enabled can't be turned OFF while a livepatch is loaded
start_test "livepatch interaction with ftrace_enabled sysctl"
set_ftrace_enabled 1
load_lp $MOD_LIVEPATCH if [[ "$(cat /proc/cmdline)" != "$MOD_LIVEPATCH: this has been live patched" ]] ; then echo -e "FAIL\n\n"
die "livepatch kselftest(s) failed" fi
# Check that ftrace could not get disabled when a livepatch is enabled
set_ftrace_enabled --fail 0 if [[ "$(cat /proc/cmdline)" != "$MOD_LIVEPATCH: this has been live patched" ]] ; then echo -e "FAIL\n\n"
die "livepatch kselftest(s) failed" fi
disable_lp $MOD_LIVEPATCH
unload_lp $MOD_LIVEPATCH
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.