Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add-patches-section doesn't handle symbol collisions properly #53

Closed
sjenning opened this issue Mar 12, 2014 · 2 comments
Closed

add-patches-section doesn't handle symbol collisions properly #53

sjenning opened this issue Mar 12, 2014 · 2 comments

Comments

@sjenning
Copy link
Contributor

Given the following patch:

--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -2207,6 +2207,7 @@ KSM_ATTR(sleep_millisecs);
 static ssize_t pages_to_scan_show(struct kobject *kobj,
                                  struct kobj_attribute *attr, char *buf)
 {
+       printk("hello from pages_to_scan_show()!\n");
        return sprintf(buf, "%u\n", ksm_thread_pages_to_scan);
 }

running the output of create-diff-object into add-patches-section results in

found patched function pages_to_scan_show
original function at address ffffffff811a1450 (length 36)

looking at vmlinux:
13403: 0000000000000000      0 FILE    LOCAL  DEFAULT      ABS ksm.c
...
13425: ffffffff81194030     36 FUNC    LOCAL  DEFAULT        1 pages_to_scan_show
...
13723: 0000000000000000      0 FILE    LOCAL  DEFAULT      ABS huge_memory.c
...
13745: ffffffff811a1450     36 FUNC    LOCAL  DEFAULT        1 pages_to_scan_show

add-patches-section is patching the pages_to_scan_show() in huge_memory.c when it should patch the one in ksm.c.

@jpoimboe
Copy link
Member

I think this was fixed with #55

@jpoimboe
Copy link
Member

This patch still shows an issue: the resulting patch module doesn't include the changed function (pages_to_scan_show).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants