[ 348.316423] livepatch: kernel.ftrace_enabled = 1 [ 348.379665] ===== TEST: system state modification ===== [ 348.497379] % modprobe test_klp_state [ 348.546673] livepatch: enabling patch 'test_klp_state' [ 348.547484] livepatch: 'test_klp_state': initializing patching transition [ 348.547624] test_klp_state: pre_patch_callback: vmlinux [ 348.548381] test_klp_state: allocate_loglevel_state: allocating space to store console_loglevel [ 348.549613] livepatch: 'test_klp_state': starting patching transition [ 348.551136] livepatch: 'test_klp_state': completing patching transition [ 348.551258] test_klp_state: post_patch_callback: vmlinux [ 348.552055] test_klp_state: fix_console_loglevel: fixing console_loglevel [ 348.553023] livepatch: 'test_klp_state': patching complete [ 348.594640] % echo 0 > /sys/kernel/livepatch/test_klp_state/enabled [ 348.596144] livepatch: 'test_klp_state': initializing unpatching transition [ 348.597244] test_klp_state: pre_unpatch_callback: vmlinux [ 348.598041] test_klp_state: restore_console_loglevel: restoring console_loglevel [ 348.599135] livepatch: 'test_klp_state': starting unpatching transition [ 348.601013] livepatch: 'test_klp_state': completing unpatching transition [ 348.601997] test_klp_state: post_unpatch_callback: vmlinux [ 348.603384] test_klp_state: free_loglevel_state: freeing space for the stored console_loglevel [ 348.604619] livepatch: 'test_klp_state': unpatching complete [ 348.751406] % rmmod test_klp_state [ 349.007380] ===== TEST: taking over system state modification ===== [ 349.114176] % modprobe test_klp_state [ 349.156355] livepatch: enabling patch 'test_klp_state' [ 349.157369] livepatch: 'test_klp_state': initializing patching transition [ 349.157456] test_klp_state: pre_patch_callback: vmlinux [ 349.159941] test_klp_state: allocate_loglevel_state: allocating space to store console_loglevel [ 349.161738] livepatch: 'test_klp_state': starting patching transition [ 349.164004] livepatch: 'test_klp_state': completing patching transition [ 349.164127] test_klp_state: post_patch_callback: vmlinux [ 349.165352] test_klp_state: fix_console_loglevel: fixing console_loglevel [ 349.166848] livepatch: 'test_klp_state': patching complete [ 349.303145] % modprobe test_klp_state2 [ 349.347616] livepatch: enabling patch 'test_klp_state2' [ 349.348399] livepatch: 'test_klp_state2': initializing patching transition [ 349.349457] test_klp_state2: pre_patch_callback: vmlinux [ 349.350213] test_klp_state2: allocate_loglevel_state: space to store console_loglevel already allocated [ 349.351508] livepatch: 'test_klp_state2': starting patching transition [ 349.353006] livepatch: 'test_klp_state2': completing patching transition [ 349.354183] test_klp_state2: post_patch_callback: vmlinux [ 349.354983] test_klp_state2: fix_console_loglevel: taking over the console_loglevel change [ 349.356127] livepatch: 'test_klp_state2': patching complete [ 349.442136] % rmmod test_klp_state [ 349.503063] % echo 0 > /sys/kernel/livepatch/test_klp_state2/enabled [ 349.505046] livepatch: 'test_klp_state2': initializing unpatching transition [ 349.506781] test_klp_state2: pre_unpatch_callback: vmlinux [ 349.507636] test_klp_state2: restore_console_loglevel: restoring console_loglevel [ 349.508719] livepatch: 'test_klp_state2': starting unpatching transition [ 349.510497] livepatch: 'test_klp_state2': completing unpatching transition [ 349.510621] test_klp_state2: post_unpatch_callback: vmlinux [ 349.511412] test_klp_state2: free_loglevel_state: freeing space for the stored console_loglevel [ 349.512682] livepatch: 'test_klp_state2': unpatching complete [ 349.538937] % rmmod test_klp_state2 [ 349.788512] ===== TEST: compatible cumulative livepatches ===== [ 349.908464] % modprobe test_klp_state2 [ 349.950750] livepatch: enabling patch 'test_klp_state2' [ 349.951565] livepatch: 'test_klp_state2': initializing patching transition [ 349.951642] test_klp_state2: pre_patch_callback: vmlinux [ 349.952602] test_klp_state2: allocate_loglevel_state: allocating space to store console_loglevel [ 349.953842] livepatch: 'test_klp_state2': starting patching transition [ 349.955366] livepatch: 'test_klp_state2': completing patching transition [ 349.955741] test_klp_state2: post_patch_callback: vmlinux [ 349.956560] test_klp_state2: fix_console_loglevel: fixing console_loglevel [ 349.957534] livepatch: 'test_klp_state2': patching complete [ 350.107389] % modprobe test_klp_state3 [ 350.152364] livepatch: enabling patch 'test_klp_state3' [ 350.153213] livepatch: 'test_klp_state3': initializing patching transition [ 350.154296] test_klp_state3: pre_patch_callback: vmlinux [ 350.155083] test_klp_state3: allocate_loglevel_state: space to store console_loglevel already allocated [ 350.156433] livepatch: 'test_klp_state3': starting patching transition [ 350.157977] livepatch: 'test_klp_state3': completing patching transition [ 350.159073] test_klp_state3: post_patch_callback: vmlinux [ 350.159874] test_klp_state3: fix_console_loglevel: taking over the console_loglevel change [ 350.161110] livepatch: 'test_klp_state3': patching complete [ 350.242610] % rmmod test_klp_state2 [ 350.416905] % modprobe test_klp_state2 [ 350.459462] livepatch: enabling patch 'test_klp_state2' [ 350.460367] livepatch: 'test_klp_state2': initializing patching transition [ 350.461637] test_klp_state2: pre_patch_callback: vmlinux [ 350.462531] test_klp_state2: allocate_loglevel_state: space to store console_loglevel already allocated [ 350.464115] livepatch: 'test_klp_state2': starting patching transition [ 350.465676] livepatch: 'test_klp_state2': completing patching transition [ 350.467120] test_klp_state2: post_patch_callback: vmlinux [ 350.467927] test_klp_state2: fix_console_loglevel: taking over the console_loglevel change [ 350.469137] livepatch: 'test_klp_state2': patching complete [ 350.518557] % echo 0 > /sys/kernel/livepatch/test_klp_state2/enabled [ 350.520027] livepatch: 'test_klp_state2': initializing unpatching transition [ 350.521140] test_klp_state2: pre_unpatch_callback: vmlinux [ 350.521932] test_klp_state2: restore_console_loglevel: restoring console_loglevel [ 350.523204] livepatch: 'test_klp_state2': starting unpatching transition [ 350.524782] livepatch: 'test_klp_state2': completing unpatching transition [ 350.524896] test_klp_state2: post_unpatch_callback: vmlinux [ 350.525729] test_klp_state2: free_loglevel_state: freeing space for the stored console_loglevel [ 350.526966] livepatch: 'test_klp_state2': unpatching complete [ 350.551409] % rmmod test_klp_state2 [ 350.649202] % rmmod test_klp_state3 [ 350.894623] ===== TEST: incompatible cumulative livepatches ===== [ 351.023952] % modprobe test_klp_state2 [ 351.075952] livepatch: enabling patch 'test_klp_state2' [ 351.076894] livepatch: 'test_klp_state2': initializing patching transition [ 351.076976] test_klp_state2: pre_patch_callback: vmlinux [ 351.077904] test_klp_state2: allocate_loglevel_state: allocating space to store console_loglevel [ 351.079352] livepatch: 'test_klp_state2': starting patching transition [ 352.234525] livepatch: 'test_klp_state2': completing patching transition [ 352.234801] test_klp_state2: post_patch_callback: vmlinux [ 352.236003] test_klp_state2: fix_console_loglevel: fixing console_loglevel [ 352.237321] livepatch: 'test_klp_state2': patching complete [ 352.353319] % modprobe test_klp_state [ 352.413527] livepatch: Livepatch patch (test_klp_state) is not compatible with the already installed livepatches. [ 352.456573] modprobe: ERROR: could not insert 'test_klp_state': Invalid argument [ 352.458818] % echo 0 > /sys/kernel/livepatch/test_klp_state2/enabled [ 352.461099] livepatch: 'test_klp_state2': initializing unpatching transition [ 352.462612] test_klp_state2: pre_unpatch_callback: vmlinux [ 352.463636] test_klp_state2: restore_console_loglevel: restoring console_loglevel [ 352.465081] livepatch: 'test_klp_state2': starting unpatching transition [ 354.218286] livepatch: 'test_klp_state2': completing unpatching transition [ 354.218736] test_klp_state2: post_unpatch_callback: vmlinux [ 354.220015] test_klp_state2: free_loglevel_state: freeing space for the stored console_loglevel [ 354.221699] livepatch: 'test_klp_state2': unpatching complete [ 354.364448] % rmmod test_klp_state2