Messages in this thread Patch in this message | | | From | Jiri Slaby <> | Subject | [PATCH 17/21] kgr: exercise non-present function | Date | Mon, 23 Jun 2014 15:29:31 +0200 |
| |
This is to test the newly added functionality: non-fatal patching of yet unknown functions.
Signed-off-by: Jiri Slaby <jslaby@suse.cz> --- samples/kgraft/kgraft_patcher.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/samples/kgraft/kgraft_patcher.c b/samples/kgraft/kgraft_patcher.c index 5d02a908bc26..e96eef840397 100644 --- a/samples/kgraft/kgraft_patcher.c +++ b/samples/kgraft/kgraft_patcher.c @@ -63,10 +63,17 @@ static bool new_capable(int cap) } KGR_PATCHED_FUNCTION(capable, new_capable, true); +static void new_function(unsigned long data) +{ + pr_info("kgr-patcher: %s\n", __func__); +} +KGR_PATCHED_FUNCTION(unknown_function, new_function, false); + static struct kgr_patch patch = { .patches = { KGR_PATCH(SyS_iopl), KGR_PATCH(capable), + KGR_PATCH(unknown_function), KGR_PATCH_END } }; -- 2.0.0
| |