lkml.org 
[lkml]   [2018]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 6/8] livepatch: Remove Nop structures when unused
    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

    \
     
     \ /
      Last update: 2018-04-07 00:07    [W:4.585 / U:0.668 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site