[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1446263060-22175-1-git-send-email-chris.j.arges@canonical.com>
Date: Fri, 30 Oct 2015 22:44:08 -0500
From: Chris J Arges <chris.j.arges@...onical.com>
To: live-patching@...r.kernel.org
Cc: Chris J Arges <chris.j.arges@...onical.com>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Seth Jennings <sjenning@...hat.com>,
Jiri Kosina <jikos@...nel.org>,
Vojtech Pavlik <vojtech@...e.com>, linux-api@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] livepatch: old_name@..._addr scheme in livepatch sysfs directory
The following directory structure will allow for cases when the same
function name exists in a single object.
/sys/kernel/livepatch/<patch>/<object>/<function@...ress>
An example of this issue is documented here:
https://github.com/dynup/kpatch/issues/493
Signed-off-by: Chris J Arges <chris.j.arges@...onical.com>
---
Documentation/ABI/testing/sysfs-kernel-livepatch | 4 ++--
kernel/livepatch/core.c | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/Documentation/ABI/testing/sysfs-kernel-livepatch b/Documentation/ABI/testing/sysfs-kernel-livepatch
index 5bf42a8..afa0470 100644
--- a/Documentation/ABI/testing/sysfs-kernel-livepatch
+++ b/Documentation/ABI/testing/sysfs-kernel-livepatch
@@ -33,12 +33,12 @@ Description:
The object directory contains subdirectories for each function
that is patched within the object.
-What: /sys/kernel/livepatch/<patch>/<object>/<function>
+What: /sys/kernel/livepatch/<patch>/<object>/<function@...ress>
Date: Nov 2014
KernelVersion: 3.19.0
Contact: live-patching@...r.kernel.org
Description:
- The function directory contains attributes regarding the
+ The function@...ress directory contains attributes regarding the
properties and state of the patched function.
There are currently no such attributes.
diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c
index 6e53441..347cb3e 100644
--- a/kernel/livepatch/core.c
+++ b/kernel/livepatch/core.c
@@ -733,7 +733,8 @@ static int klp_init_func(struct klp_object *obj, struct klp_func *func)
func->state = KLP_DISABLED;
return kobject_init_and_add(&func->kobj, &klp_ktype_func,
- &obj->kobj, "%s", func->old_name);
+ &obj->kobj, "%s@%p", func->old_name,
+ (void *)func->old_addr);
}
/* parts of the initialization that is done only when the object is loaded */
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists