[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.21.2004281118160.27039@pobox.suse.cz>
Date: Tue, 28 Apr 2020 11:20:13 +0200 (CEST)
From: Miroslav Benes <mbenes@...e.cz>
To: Josh Poimboeuf <jpoimboe@...hat.com>
cc: live-patching@...r.kernel.org, linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Jessica Yu <jeyu@...nel.org>,
Joe Lawrence <joe.lawrence@...hat.com>
Subject: Re: [PATCH v3 02/10] livepatch: Apply vmlinux-specific KLP relocations
early
> @@ -738,18 +765,23 @@ static int klp_init_object_loaded(struct klp_patch *patch,
> int ret;
>
> mutex_lock(&text_mutex);
> -
> module_disable_ro(patch->mod);
> - ret = klp_write_object_relocations(patch->mod, obj);
> - if (ret) {
> - module_enable_ro(patch->mod, true);
> - mutex_unlock(&text_mutex);
> - return ret;
> +
> + if (klp_is_module(obj)) {
> + /*
> + * Only write module-specific relocations here
> + * (.klp.rela.{module}.*). vmlinux-specific relocations were
> + * written earlier during the initialization of the klp module
> + * itself.
> + */
> + ret = klp_apply_object_relocs(patch, obj);
> + if (ret)
+ module_enable_ro(patch->mod, true);
+ mutex_unlock(&text_mutex);
is missing here, I think. Probably lost during rebase. It is fine after
the next patch.
> + return ret;
> }
>
> arch_klp_init_object_loaded(patch, obj);
> - module_enable_ro(patch->mod, true);
>
> + module_enable_ro(patch->mod, true);
> mutex_unlock(&text_mutex);
Miroslav
Powered by blists - more mailing lists