Re: [PATCH 6/8] livepatch: Remove Nop structures when unused

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 23, 2018 at 01:00:26PM +0100, Petr Mladek wrote:
> Replaced patches are removed from the stack when the transition is
> finished. It means that Nop structures will never be needed again
> and can be removed. Why should we care?

Warning, grammar pedantry ahead.

"Nop" isn't a proper noun, so it shouldn't be capitalized (here and in
the patch subject).

Also, "NOP", used elsewhere, might be confused with x86 NOP
instructions.  I would vote for "nop" everywhere.

> @@ -146,6 +155,21 @@ static void klp_complete_transition(void)
>  	if (!klp_forced && klp_target_state == KLP_UNPATCHED)
>  		module_put(klp_transition_patch->mod);
>  
> +	if (klp_transition_patch->replace && klp_target_state == KLP_PATCHED) {
> +		/*
> +		 * We do not need to wait until the objects are really freed.
> +		 * We will never need them again because the patch must be on
> +		 * the bottom of the stack now.
> +		 */
> +		klp_free_objects_dynamic(klp_transition_patch);
> +		/*
> +		 * Replace behavior will not longer be needed. Avoid the related
> +		 * code when disabling and enabling again.

"not longer" -> "no longer"

-- 
Josh
--
To unsubscribe from this list: send the line "unsubscribe live-patching" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux