lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 21 Jan 2021 15:45:29 -0600 From: Josh Poimboeuf <jpoimboe@...hat.com> To: Christoph Hellwig <hch@....de> Cc: Frederic Barrat <fbarrat@...ux.ibm.com>, Andrew Donnellan <ajd@...ux.ibm.com>, Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...ux.ie>, Daniel Vetter <daniel@...ll.ch>, Jessica Yu <jeyu@...nel.org>, Jiri Kosina <jikos@...nel.org>, Miroslav Benes <mbenes@...e.cz>, Petr Mladek <pmladek@...e.com>, Joe Lawrence <joe.lawrence@...hat.com>, Masahiro Yamada <masahiroy@...nel.org>, Michal Marek <michal.lkml@...kovi.net>, linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org, dri-devel@...ts.freedesktop.org, live-patching@...r.kernel.org, linux-kbuild@...r.kernel.org Subject: Re: [PATCH 04/13] livepatch: move klp_find_object_module to module.c On Thu, Jan 21, 2021 at 08:49:50AM +0100, Christoph Hellwig wrote: > @@ -820,14 +796,25 @@ static int klp_init_object(struct klp_patch *patch, struct klp_object *obj) > const char *name; > > obj->patched = false; > - obj->mod = NULL; Why was this line removed? > if (klp_is_module(obj)) { > if (strlen(obj->name) >= MODULE_NAME_LEN) > return -EINVAL; > name = obj->name; > > - klp_find_object_module(obj); > + /* > + * We do not want to block removal of patched modules and > + * therefore we do not take a reference here. The patches are > + * removed by klp_module_going() instead. > + * > + * Do not mess work of klp_module_coming() and > + * klp_module_going(). Note that the patch might still be > + * needed before klp_module_going() is called. Module functions > + * can be called even in the GOING state until mod->exit() > + * finishes. This is especially important for patches that > + * modify semantic of the functions. > + */ > + obj->mod = find_klp_module(obj->name); These comments don't make sense in this context, they should be kept with the code in find_klp_module(). -- Josh
Powered by blists - more mailing lists