[ 135.385724] livepatch: kernel.ftrace_enabled = 1 [ 135.390161] ===== TEST: system state modification ===== [ 135.399023] % modprobe test_klp_state [ 135.403630] livepatch: enabling patch 'test_klp_state' [ 135.404735] livepatch: 'test_klp_state': initializing patching transition [ 135.404775] test_klp_state: pre_patch_callback: vmlinux [ 135.405928] test_klp_state: allocate_loglevel_state: allocating space to store console_loglevel [ 135.407647] livepatch: 'test_klp_state': starting patching transition [ 136.385919] livepatch: 'test_klp_state': completing patching transition [ 136.386042] test_klp_state: post_patch_callback: vmlinux [ 136.387281] test_klp_state: fix_console_loglevel: fixing console_loglevel [ 136.388808] livepatch: 'test_klp_state': patching complete [ 136.447384] % echo 0 > /sys/kernel/livepatch/test_klp_state/enabled [ 136.448891] livepatch: 'test_klp_state': initializing unpatching transition [ 136.450318] test_klp_state: pre_unpatch_callback: vmlinux [ 136.451410] test_klp_state: restore_console_loglevel: restoring console_loglevel [ 136.452867] livepatch: 'test_klp_state': starting unpatching transition [ 137.409819] livepatch: 'test_klp_state': completing unpatching transition [ 137.409933] test_klp_state: post_unpatch_callback: vmlinux [ 137.411162] test_klp_state: free_loglevel_state: freeing space for the stored console_loglevel [ 137.412935] livepatch: 'test_klp_state': unpatching complete [ 137.474742] % rmmod test_klp_state [ 137.495606] ===== TEST: taking over system state modification ===== [ 137.504419] % modprobe test_klp_state [ 137.508874] livepatch: enabling patch 'test_klp_state' [ 137.509929] livepatch: 'test_klp_state': initializing patching transition [ 137.509975] test_klp_state: pre_patch_callback: vmlinux [ 137.511188] test_klp_state: allocate_loglevel_state: allocating space to store console_loglevel [ 137.512996] livepatch: 'test_klp_state': starting patching transition [ 137.514484] livepatch: 'test_klp_state': completing patching transition [ 137.514503] test_klp_state: post_patch_callback: vmlinux [ 137.515568] test_klp_state: fix_console_loglevel: fixing console_loglevel [ 137.516908] livepatch: 'test_klp_state': patching complete [ 137.528710] % modprobe test_klp_state2 [ 137.533273] livepatch: enabling patch 'test_klp_state2' [ 137.534353] livepatch: 'test_klp_state2': initializing patching transition [ 137.535743] test_klp_state2: pre_patch_callback: vmlinux [ 137.536811] test_klp_state2: allocate_loglevel_state: space to store console_loglevel already allocated [ 137.538695] livepatch: 'test_klp_state2': starting patching transition [ 138.369614] livepatch: 'test_klp_state2': completing patching transition [ 138.371036] test_klp_state2: post_patch_callback: vmlinux [ 138.372128] test_klp_state2: fix_console_loglevel: taking over the console_loglevel change [ 138.373771] livepatch: 'test_klp_state2': patching complete [ 138.478998] % rmmod test_klp_state [ 138.489326] % echo 0 > /sys/kernel/livepatch/test_klp_state2/enabled [ 138.490680] livepatch: 'test_klp_state2': initializing unpatching transition [ 138.492134] test_klp_state2: pre_unpatch_callback: vmlinux [ 138.493239] test_klp_state2: restore_console_loglevel: restoring console_loglevel [ 138.494715] livepatch: 'test_klp_state2': starting unpatching transition [ 139.393671] livepatch: 'test_klp_state2': completing unpatching transition [ 139.393791] test_klp_state2: post_unpatch_callback: vmlinux [ 139.394952] test_klp_state2: free_loglevel_state: freeing space for the stored console_loglevel [ 139.396827] livepatch: 'test_klp_state2': unpatching complete [ 139.415428] % rmmod test_klp_state2 [ 139.439868] ===== TEST: compatible cumulative livepatches ===== [ 139.449107] % modprobe test_klp_state2 [ 139.454675] livepatch: enabling patch 'test_klp_state2' [ 139.455752] livepatch: 'test_klp_state2': initializing patching transition [ 139.455801] test_klp_state2: pre_patch_callback: vmlinux [ 139.456995] test_klp_state2: allocate_loglevel_state: allocating space to store console_loglevel [ 139.458754] livepatch: 'test_klp_state2': starting patching transition [ 139.460279] livepatch: 'test_klp_state2': completing patching transition [ 139.460315] test_klp_state2: post_patch_callback: vmlinux [ 139.461413] test_klp_state2: fix_console_loglevel: fixing console_loglevel [ 139.462850] livepatch: 'test_klp_state2': patching complete [ 139.474690] % modprobe test_klp_state3 [ 139.479182] livepatch: enabling patch 'test_klp_state3' [ 139.480401] livepatch: 'test_klp_state3': initializing patching transition [ 139.481817] test_klp_state3: pre_patch_callback: vmlinux [ 139.482910] test_klp_state3: allocate_loglevel_state: space to store console_loglevel already allocated [ 139.484781] livepatch: 'test_klp_state3': starting patching transition [ 140.417689] livepatch: 'test_klp_state3': completing patching transition [ 140.419672] test_klp_state3: post_patch_callback: vmlinux [ 140.420899] test_klp_state3: fix_console_loglevel: taking over the console_loglevel change [ 140.422728] livepatch: 'test_klp_state3': patching complete [ 140.427955] % rmmod test_klp_state2 [ 140.449532] % modprobe test_klp_state2 [ 140.454579] livepatch: enabling patch 'test_klp_state2' [ 140.455786] livepatch: 'test_klp_state2': initializing patching transition [ 140.457350] test_klp_state2: pre_patch_callback: vmlinux [ 140.458542] test_klp_state2: allocate_loglevel_state: space to store console_loglevel already allocated [ 140.460617] livepatch: 'test_klp_state2': starting patching transition [ 140.462268] livepatch: 'test_klp_state2': completing patching transition [ 140.463818] test_klp_state2: post_patch_callback: vmlinux [ 140.465040] test_klp_state2: fix_console_loglevel: taking over the console_loglevel change [ 140.466877] livepatch: 'test_klp_state2': patching complete [ 140.471458] % echo 0 > /sys/kernel/livepatch/test_klp_state2/enabled [ 140.472983] livepatch: 'test_klp_state2': initializing unpatching transition [ 140.474603] test_klp_state2: pre_unpatch_callback: vmlinux [ 140.475835] test_klp_state2: restore_console_loglevel: restoring console_loglevel [ 140.477492] livepatch: 'test_klp_state2': starting unpatching transition [ 140.479124] livepatch: 'test_klp_state2': completing unpatching transition [ 140.479156] test_klp_state2: post_unpatch_callback: vmlinux [ 140.480402] test_klp_state2: free_loglevel_state: freeing space for the stored console_loglevel [ 140.482340] livepatch: 'test_klp_state2': unpatching complete [ 140.485696] % rmmod test_klp_state2 [ 140.498984] % rmmod test_klp_state3 [ 140.522452] ===== TEST: incompatible cumulative livepatches ===== [ 140.531980] % modprobe test_klp_state2 [ 140.536963] livepatch: enabling patch 'test_klp_state2' [ 140.538183] livepatch: 'test_klp_state2': initializing patching transition [ 140.538219] test_klp_state2: pre_patch_callback: vmlinux [ 140.539524] test_klp_state2: allocate_loglevel_state: allocating space to store console_loglevel [ 140.541466] livepatch: 'test_klp_state2': starting patching transition [ 140.543129] livepatch: 'test_klp_state2': completing patching transition [ 140.543147] test_klp_state2: post_patch_callback: vmlinux [ 140.544356] test_klp_state2: fix_console_loglevel: fixing console_loglevel [ 140.545881] livepatch: 'test_klp_state2': patching complete [ 140.550480] % modprobe test_klp_state [ 140.555521] livepatch: Livepatch patch (test_klp_state) is not compatible with the already installed livepatches. [ 140.570232] modprobe: ERROR: could not insert 'test_klp_state': Invalid argument [ 140.571991] % echo 0 > /sys/kernel/livepatch/test_klp_state2/enabled [ 140.573468] livepatch: 'test_klp_state2': initializing unpatching transition [ 140.575062] test_klp_state2: pre_unpatch_callback: vmlinux [ 140.576289] test_klp_state2: restore_console_loglevel: restoring console_loglevel [ 140.577946] livepatch: 'test_klp_state2': starting unpatching transition [ 141.377609] livepatch: 'test_klp_state2': completing unpatching transition [ 141.377735] test_klp_state2: post_unpatch_callback: vmlinux [ 141.379046] test_klp_state2: free_loglevel_state: freeing space for the stored console_loglevel [ 141.380987] livepatch: 'test_klp_state2': unpatching complete [ 141.397328] % rmmod test_klp_state2